google-places-api

Google Places returns wrong city

余生颓废 提交于 2019-12-23 16:10:02
问题 I am building an application using google autocomplete Places API. If I use the predictive suggestion for the address "Pongal, New York, NY, United States", I get following items in the return place object: locality: Manhattan administrative_area_level_2: New York administrative_area_level_1: New York As per documentation of google Places at: https://developers.google.com/maps/documentation/geocoding/ For US, locality can be used to fetch the city or town and *administrative_area_level_1* can

How to exclude certain types/categories from Google Places API results?

依然范特西╮ 提交于 2019-12-23 15:44:52
问题 I want to exclude individual doctor's offices in my results. Most doctor's offices are in the category "doctor" and "health". I DO want to show places of category "health". How can I achieve this? If I remove "doctor" from the types parameter, but still have "health", i'll still get all the doctor's offices. Is there a way to specifically exclude type "doctor"? 回答1: There is currently no way to do this with out manually filtering them out of your results. This sounds like a great feature

Google Place API - How to retrieve opening hours

十年热恋 提交于 2019-12-23 12:44:09
问题 There a way to get the opening hours of google place? I looked for in a several forum and documentations but i didn't find nothing (perhaps only foursquare API expose that information) Google doesn't expose this information? Is there any service that expose this? (facebook place, yelp, ecc..) Thanks so much for all reply Alberto 回答1: I guess this is possible now: https://developers.google.com/places/documentation/details#PlaceDetailsResults See this gist for sample output if you don't want to

Validate Place Owner Google Places API

眉间皱痕 提交于 2019-12-23 12:38:35
问题 I am planning an application where the owners of a business can register his place. I would like to use Google Places API for fetch the information of the business. That way, when a new user registers in the app, he provides an ID of his place, and the app retrieves the information from the API. I am going to need some way to validate that the user that is registering is the actual owner of the business. Is that possible? Does anybody have any idea how to achieve this? I've been thinking that

Google Places API - Get more than 10 photos from Details Response?

北城余情 提交于 2019-12-23 12:36:28
问题 Is there any way to get more than 10 photos back in the photos array? I'm using the JavaScript API v3. Perhaps a separate service to get more photos? https://developers.google.com/maps/documentation/javascript/places#place_details_responses 回答1: No. As per the documentation, the API returns a maximum of 10 photos. Link 回答2: Take a look at this: photos[] — an array of photo objects, each containing a reference to an image. A Place Search will return at most one photo object. Performing a Place

Android Places Autocomplete set lat long bounds

落花浮王杯 提交于 2019-12-23 09:59:29
问题 I am using the Google places Autocomplete API. My application has an Autocomplete text view. Everything is working fine as I followed the example here . Only issue being I am setting LatLng bounds to that of Mountain View. private static final LatLngBounds BOUNDS_MOUNTAIN_VIEW = new LatLngBounds( new LatLng(37.398160, -122.180831), new LatLng(37.430610, -121.972090)); My GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Places.GEO_DATA_API) .build(); When I try to

Google Places Nearby Search

陌路散爱 提交于 2019-12-23 09:56:27
问题 I'm trying to fetch a local BMW repair facility for Dortmund, Germany. According to Google Maps, there is a BMW dealer nearby to location 51.48488,7.4687013. The following request matches the above mentioned dealer: maps.googleapis.com/maps/api/place/nearbysearch/json?location=51.4842556,7.474081&radius=20000&language=en&name=BMW&key=API_KEY { "name": "BMW Niederlassung Dortmund", ..., "types": [ "car_repair", "car_dealer", "store", "point_of_interest", "establishment" ], ..., "vicinity":

Google Places Nearby Search

主宰稳场 提交于 2019-12-23 09:55:59
问题 I'm trying to fetch a local BMW repair facility for Dortmund, Germany. According to Google Maps, there is a BMW dealer nearby to location 51.48488,7.4687013. The following request matches the above mentioned dealer: maps.googleapis.com/maps/api/place/nearbysearch/json?location=51.4842556,7.474081&radius=20000&language=en&name=BMW&key=API_KEY { "name": "BMW Niederlassung Dortmund", ..., "types": [ "car_repair", "car_dealer", "store", "point_of_interest", "establishment" ], ..., "vicinity":

Find when google places autocomplete returns zero results

a 夏天 提交于 2019-12-23 09:32:09
问题 I use the google places autocomplete for places suggestion. Now this is what I want: when a user types in a location that is not in google's database, that is google returns zero results, I need to be able to capture the event of zero results, and fire my custome autocomplete. How do I find when google is returning zero results? autocomplete.getPlace() will return a status if there are zero results, but this is inside place_changed event, which is fired only when user selects a suggestion

Error: java.lang.IllegalStateException: no included points

北慕城南 提交于 2019-12-23 09:14:42
问题 I am getting this error when trying to search a place on map. I tried other resolutions when searching, but no luck. java.lang.IllegalStateException: no included points on this line: LatLngBounds.Builder builder = new LatLngBounds.Builder(); The code I am using: try { JSONObject jsonObject = new JSONObject(response.body().toString()); JSONArray jsonArray = jsonObject.getJSONArray("routes"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject route = jsonArray.getJSONObject(i);