google-places-api

Restrict Google Places Autocomplete to return addresses only

吃可爱长大的小学妹 提交于 2020-01-12 06:27:05
问题 autocomplete = new google.maps.places.Autocomplete(input, { types: ['geocode'] }); returns streets and cities amongst other larger areas. Is it possible to restrict to streets only? 回答1: I think what you want is { types: ['address'] } . You can see this in action with this live sample: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete (use the "Addresses" radio button). 来源: https://stackoverflow.com/questions/15071589/restrict-google-places-autocomplete

Disable select button while selecting location of anonymous location using Place picker google API in android

夙愿已清 提交于 2020-01-11 04:23:48
问题 I want to save user form information with location field. For location I want to open google map on some button click and location to be selected when user click on location over map and post-filled location into form. I found place picker as related solution, So I have used Place Picker Google API and I am able to open google map, when I move arrow over preferred location and click on Select this location (Appearing black color with now coordinates showing under that) . Confirmation box

Google Places Auto-Complete

僤鯓⒐⒋嵵緔 提交于 2020-01-10 05:00:09
问题 The input box is initialized properly but it is not generating any suggestions. Can any one point out what I am doing wrong? Here is the code. Update I have investigated the issue. The problem is in the line: types: ['(cities)', '(regions)'] when I specify only one type types: ['(cities)'] no matter region or cities it works. But two types are not working together. Although the documentation clearly says that types are Array of strings and valid values are 'establishment', 'geocode', '

Google Places Api subway and train station search in Russia stopped working

ⅰ亾dé卋堺 提交于 2020-01-10 04:44:25
问题 Till today the following query: https://maps.googleapis.com/maps/api/place/search/json?language=ru&location=55.739216,37.547965&radius=1000&sensor=false&types=subway_station|train_station&key=xxxxxxxx was result with 'Студенческая‎' , 'Studencheskaya' subway station in Moscow. Today: ZERO_RESULTS 回答1: This issue has already been reported on the Google Places API Issue Tracker here: http://code.google.com/p/gmaps-api-issues/issues/detail?id=4061 Please click the 'star' icon to be notified of

Issue parsing JSON array without key

风格不统一 提交于 2020-01-07 08:22:29
问题 I am trying to use Google Places API and I am basically trying to parse the Json without the key in a specific position in the json. I am able to parse all the data and getting the values as required. Although, I am having issues with one of the parts in that json. Here's the json sample : { "html_attributions":[], "results":[ { "geometry":{ "location":{ "lat":somelat, "lng":somelng } }, "icon":"someicon", "id":"someid", "name":"somename", "reference":"some_image_reference", "types":[ "gas

Place multiple markers on GMSMapView Swift

只谈情不闲聊 提交于 2020-01-07 05:46:10
问题 i was making an application that uses google places api to search for all the restaurants nearby user's location. So i can successfully retrieve the restaurants coordinates(lat, lng) and then i want to add a marker or a circle to each place but i am unable to do that. I can add a marker or circle to one location but when i try to add to multiple locations it does not show markers or circles. Here is the code i wrote func setUpMarkersForLibraries(locations: [CLLocationCoordinate2D]){ print(

Google API Key issues with Google Places

穿精又带淫゛_ 提交于 2020-01-06 19:57:06
问题 I'm working on an app where I need to query places from the google places API and save the nearest place to the user's google account (they sign into the app through GIDSignIN). The Places API is activated in the console and they key is correct, however, the URL might be problematic and I keep getting this error... Optional(["error_message": This IP, site or mobile application is not authorized to use this API key. Request received from IP address 2607:f598:b349:fd01:94f8:7386:d82c:1b29, with

Google API Key issues with Google Places

霸气de小男生 提交于 2020-01-06 19:56:04
问题 I'm working on an app where I need to query places from the google places API and save the nearest place to the user's google account (they sign into the app through GIDSignIN). The Places API is activated in the console and they key is correct, however, the URL might be problematic and I keep getting this error... Optional(["error_message": This IP, site or mobile application is not authorized to use this API key. Request received from IP address 2607:f598:b349:fd01:94f8:7386:d82c:1b29, with

How to stop address from populating autocomplete with google places

孤者浪人 提交于 2020-01-06 18:57:09
问题 SO I have a google maps autocomplete on a form of mine, and when it gets a place it takes the place and formats it so that all the correct information goes into different inputs on the form. The issue I'm having is before the 'place_changed' event fires the autocomplete populates the input. I want to prevent that initial population and instead populate with what I want to be there. I tried doing a change event but it doesnt seem to fire correctly. Here is my code: html: <input type="text"

Accessing Additional Results in google places search

人盡茶涼 提交于 2020-01-06 14:15:20
问题 Hi to all I am trying to get places from The Google Places API. for the first time I got the first 20 result but when I use it second time with the request "next_page_token" like this : https://maps.googleapis.com/maps/api/place/search/json?page_token=CkQ3AAAADjez7YyK689hZ1LwKAvXMEEuoMNwFn7tAHW5w4R6B9Izqo901-5lsC4Zk4lsFjwei0LIKmwknTAvSSJsEvclmhIQ8K9Ike7Yw8JCbAf83lGYvhoU80XJzsq0JhuedXnz5MhnqTDXxoQ&key=AddYourOwnKeyHere then the response I get is REQUEST_DENIED am i doing something wrong. 回答1: