【发布时间】:2019-10-05 08:53:03
【问题描述】:
我想获取综合运动场/运动场甚至公寓,我该如何获取? 目前我在自动完成中得到的结果很少。
包名: react-native-google-places-autocomplete .
API: GooglePlacesAutocomplete
<GooglePlacesAutocomplete
query={{
// available options: https://developers.google.com/places/web-service/autocomplete
key: ,
language: "en", // language of the results
types: "address" // default: 'geocode'
}}
nearbyPlacesAPI="GooglePlacesSearch" // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch
GoogleReverseGeocodingQuery={
{
// available options for GoogleReverseGeocoding API : https://developers.google.com/maps/documentation/geocoding/intro
}
}
GooglePlacesSearchQuery={{
// available options for GooglePlacesSearch API : https://developers.google.com/places/web-service/search
rankby: "distance"
}}
filterReverseGeocodingByTypes={[
"locality",
"administrative_area_level_3"
]} // filter the reverse geocoding results by types - ['locality', 'administrative_area_level_3'] if you want to display only cities
// predefinedPlaces={[homePlace, workPlace]}
debounce={200} // debounce the requests in ms. Set to 0 to remove debounce. By default 0ms.
/>
filterReverseGeocodingByTypes 是我应该处理的事情,但我不知道如何获得所有的运动场、运动场和公寓。
如果我能得到所有的结果,就像我们在谷歌地图中得到的那样,那也很好。
示例City, Locality, Schools and everything.
【问题讨论】:
标签: google-maps google-places-api googleplacesautocomplete