【问题标题】:Expo google maps Location Geocoding autocomplete [closed]世博会谷歌地图位置地理编码自动完成[关闭]
【发布时间】:2020-06-17 03:25:08
【问题描述】:
【问题讨论】:
标签:
reactjs
react-native
google-maps
google-maps-api-3
expo
【解决方案1】:
您可以使用react-native-google-places-autocomplete 来做到这一点。
有一个道具可以让你禁用 power by google 标签。
enablePoweredByContainer={false}.
import React from 'react';
import { GooglePlacesAutocomplete } from 'react-native-google-places-autocomplete';
const GooglePlacesInput = () => {
return (
<GooglePlacesAutocomplete
placeholder='Search'
onPress={(data, details = null) => {
// 'details' is provided when fetchDetails = true
console.log(data, details);
}}
query={{
key: 'YOUR API KEY',
language: 'en',
}}
enablePoweredByContainer={false}
/>
);
};
export default GooglePlacesInput;