google-places-api

How to get country specific result with Google autocomplete place api ios sdk?

匆匆过客 提交于 2019-11-27 21:53:35
问题 I'm using below method to get autocomplete result for input string of GMSPlacesClient class: - (void)autocompleteQuery:(NSString *)query bounds:(GMSCoordinateBounds * GMS_NULLABLE_PTR)bounds filter:(GMSAutocompleteFilter * GMS_NULLABLE_PTR)filter callback:(GMSAutocompletePredictionsCallback)callback I tried to implement bounds by multiple ways but none of them worked, I wonder if there is any standard way to get country specific results with GMSCoordinateBounds? 回答1: You can get the country

retrieve points of interests (attractions/tourist places) of a place/country using google places api

可紊 提交于 2019-11-27 21:39:13
I want to retrieve points of interests of a place/country through google places api say 'points of interests in london'. I want the results to be same as I google search it like [here][1. I've used something like this 'https://maps.googleapis.com/maps/api/place/radarsearch/json?location='+str(lat)+','+str(long)+'&radius=500&type=tourist&rankby=prominence&key=API_KEY') where lat,long are respective latitude,longitude of that place/country. But the resulting json file does not retrieve points of interests of that place rather it just outputs nearby places. i also tried this 'https://maps

Google Places API - Places detail request undefined

人盡茶涼 提交于 2019-11-27 20:50:55
I'm trying to retrieve place details using the Google Places Library. When you click the place marker I want to be able to see the address, name, website etc. I'm using the following tutorial: http://code.google.com/apis/maps/documentation/javascript/places.html All seems to be going pretty well. In my marker I can display the name and the rating but the address, website and phone number all appear as 'undefined'. Is this because Google doesn't have the information I'm requesting on these places? Or have I done something wrong? Here's the code I'm using: var map; var infowindow; function

Using initMap and initAutocomplete on same html page google maps

故事扮演 提交于 2019-11-27 20:45:29
I have a webpage where I would like to use both place autocomplete as well as google map with marker. User can search for an address in place autocomplete. Lat-long data for marker comes from DB and this doesn't change. The problem is either map works or place autocomplete, but not both, and the issue is related to callbacks. From google docs, I've included both callbacks in separate API calls: <script src="https://maps.googleapis.com/maps/api/js?key=[API KEY]&signed_in=true&libraries=places&callback=initAutocomplete" async defer></script> <script async defer src="https://maps.googleapis.com

Direction api: check if a place falls in the route path between 2 places

霸气de小男生 提交于 2019-11-27 20:16:08
I am using Google Direction API to plot the route path between 2 places A and B. I am able to do this. Now, I have a requirement to check if given a place C falls in the route path of A and B. Here is the snapshot of the route path that I have generated from my code. Here is the corresponding code: function initialize() { var input = document.getElementById('searchTextFieldSource'); var input1 = document.getElementById('searchTextFieldDestination'); var autocomplete = new google.maps.places.Autocomplete(input); var autocomplete1 = new google.maps.places.Autocomplete(input1); google.maps.event

Search all places in given city name

北城余情 提交于 2019-11-27 16:50:34
问题 Right now i am using Google Places API for fetching Restaurant list in particular city, query like https://maps.googleapis.com/maps/api/place/textsearch/xml?query=restaurants+in+Sydney&sensor=true&key=AddYourOwnKeyHere But the problem here is that we can only have 20 result and with help of next_page_token in the response we can again fetch 20 more, by this we can only have 60 result. Mention on Google Places API page The maximum number of results that can be returned is 60 So is there any

Get place_id of address_components

拜拜、爱过 提交于 2019-11-27 16:14:11
I am using Google place autocomplete. And I don't know how to get place_id of address_components. In JSON there are only long_name, short_name, types. My code is here: var object_location = document.getElementById('object_location'), autoComplete = new google.maps.places.Autocomplete(object_location); autoComplete.addListener('place_changed', function() { var place = autoComplete.getPlace(); console.log('place = ', place); }); Here is my JSON (picture) I don't need place_id of my place. I need especially place_ids of address_components If you reverse geocode the result, it will return results

Google Places Autocomplete not showing up

心已入冬 提交于 2019-11-27 15:47:00
问题 I've been working on this for hours trying to figure out why the supposedly simple autocomplete wasn't showing up. It turns out that in my code, the input element is being set to autocompete="off" , and the style on the pac-container is display: none . I can change these values in DevTools, and it works fine, but I can't figure out how or why these are being set to these values. My autocomplete is set-up in an Angular Directive, like this, where loadGmaps gets the google api. template: '

Android Place Picker (PlacePicker) no longer has Search icon after updating to Google Play Services 9.0.83

两盒软妹~` 提交于 2019-11-27 14:09:40
问题 Very recently some of my users began reporting that the search icon had disappeared from the PlacePicker UI widget. I was able to isolate the issue to updating to Google Play Services 9.0.83. Has anybody found a workaround to get the search icon back again? Update: I also noticed that the setLatLngBounds() method of the PlacePicker.IntentBuilder class no longer functions properly after updating to 9.0.83. It centers the map at 0 lat, 0 long out in the Ocean off the coast of Africa. As long as

How long do the new Places API session tokens last?

走远了吗. 提交于 2019-11-27 14:04:08
I have a website that uses address autocomplete on multiple pages--address book, shipping address, billing address. With the billing changes releasing next month, we can convert the Autocomplete process to use sessions instead of individual keystrokes. ( https://cloud.google.com/maps-platform/user-guide/pricing-changes/#billing-changes ) How long is an AutocompleteSessionToken good for? The current page? An hour? Twelve? Permanently, with it counting against the limit each time it shows up in a new month? If a session token does expire, and we send that token with a request, what's the result