google-places-api

How to use session tokens correctly?

淺唱寂寞╮ 提交于 2020-07-09 12:12:12
问题 I am using the Java client for the Google Places API: <dependency> <groupId>com.google.maps</groupId> <artifactId>google-maps-services</artifactId> <version>0.9.1</version> </dependency> The following is how I use the autocomplete API on my server: public List<AutocompletePrediction> searchAddress(String query) { List<AutocompletePrediction> predictions = new ArrayList<>(); try { AutocompletePrediction[] autocompletePredictions = PlacesApi .placeAutocomplete(geoApiContext, query, null)

How to use session tokens correctly?

夙愿已清 提交于 2020-07-09 12:10:34
问题 I am using the Java client for the Google Places API: <dependency> <groupId>com.google.maps</groupId> <artifactId>google-maps-services</artifactId> <version>0.9.1</version> </dependency> The following is how I use the autocomplete API on my server: public List<AutocompletePrediction> searchAddress(String query) { List<AutocompletePrediction> predictions = new ArrayList<>(); try { AutocompletePrediction[] autocompletePredictions = PlacesApi .placeAutocomplete(geoApiContext, query, null)

android: calling Google API .getPlaceById with multiple place_id's

为君一笑 提交于 2020-07-09 09:17:27
问题 In order to reduce the number of API calls, I'm trying to query place details by passing several place_ids at a time (up to 10). I haven't found any useful information beyond the docs. https://developers.google.com/android/reference/com/google/android/gms/location/places/GeoDataApi.html#getPlaceById(com.google.android.gms.common.api.GoogleApiClient, java.lang.String...) Notably, the constructor is: public abstract PendingResult<PlaceBuffer> getPlaceById (GoogleApiClient client, **String...

Restrict places autocomplete results to within COUNTRY and STATE

醉酒当歌 提交于 2020-07-03 16:21:38
问题 I'm currently using this URL to get my results restricted within Australia: https://maps.googleapis.com/maps/api/place/autocomplete/json?input=393&components=country:AUtypes=address&key=[my_api_key] But I'd like to say limit my searches to the current state let's say New South Wales. I tried this: https://maps.googleapis.com/maps/api/place/autocomplete/json?input=393&components=country:AU&state=NSW&types=address&key=[my_api_key] But it's returning the same number of results with items from

How to get address in English language only using GMSGeocoder

随声附和 提交于 2020-06-28 03:43:10
问题 I am using GMSGeocoder in my iOS app. And also I am using multiple languages(say English, Arabic). While using Arabic language I am getting an address in Arabic language. But I want to get the address in English language only. For this I used geocoder.accessibilityLanguage = "en-US" . but it didn't work. Could you help me regarding this issue func getAddressForLocation() { let geocoder = GMSGeocoder() geocoder.accessibilityLanguage = "en-US" let coordinate = CLLocationCoordinate2DMake(Double

How to get address in English language only using GMSGeocoder

天涯浪子 提交于 2020-06-28 03:43:02
问题 I am using GMSGeocoder in my iOS app. And also I am using multiple languages(say English, Arabic). While using Arabic language I am getting an address in Arabic language. But I want to get the address in English language only. For this I used geocoder.accessibilityLanguage = "en-US" . but it didn't work. Could you help me regarding this issue func getAddressForLocation() { let geocoder = GMSGeocoder() geocoder.accessibilityLanguage = "en-US" let coordinate = CLLocationCoordinate2DMake(Double

Google Places API + ReactNative

本小妞迷上赌 提交于 2020-05-13 14:29:03
问题 I'm trying to utilize Google Places API in Android app. I'm using React Native and the following package: https://github.com/FaridSafi/react-native-google-places-autocomplete API key in Google console created Restriction set to Android app (SHA1 fingerprint + package name) SHA1 fingerprint and package name values checked with: aapt dump badging app-release.apk unzip -p app-release.apk META-INF/CERT.RSA | keytool -printcert API key don't have any API usage restriction (can be used with any

Is it possible to get the “Popular times” information through the Google Places API

人走茶凉 提交于 2020-05-09 21:15:11
问题 Is it possible to get the "Popular times" information through the Google Places API or any other API? I need this information to be displayed in my application for a particular place. 回答1: I haven't managed to test it myself but this is what populartimes offers to do in Python: import populartimes populartimes.get("your-api-key", ["bar"], (48.132986, 11.566126), (48.142199, 11.580047)) More info on developer's github. 回答2: This is one of the top feature requests in Google issue tracker (more

Is it possible to get the “Popular times” information through the Google Places API

好久不见. 提交于 2020-05-09 21:07:36
问题 Is it possible to get the "Popular times" information through the Google Places API or any other API? I need this information to be displayed in my application for a particular place. 回答1: I haven't managed to test it myself but this is what populartimes offers to do in Python: import populartimes populartimes.get("your-api-key", ["bar"], (48.132986, 11.566126), (48.142199, 11.580047)) More info on developer's github. 回答2: This is one of the top feature requests in Google issue tracker (more

How to know if sessionToken was implemented properly?

余生颓废 提交于 2020-04-18 06:04:41
问题 So I'm trying to implement a simple location autocompletion with the google places api. I'm using the autocomplete service for this (see: https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service). What I'm doing right now is, creating an autocomplete token and renewing it if either 3 Minutes ran out (according to How long do the new Places API session tokens last?) or a place detail request was set (according to https://developers.google.com/places/web