简体   繁体   中英

Google Places API Autocomplete for Android With Titanium

I am trying to make an autocomplete textField for user who try to get place name in auto complete.

i know that Google Place API needs an Server Key or Browser Key for Android or iOS device. i have created a Browser Key now when i am trying get Data it shows me error in json.

[INFO] :   "error_message" : "This API project is not authorized to use this API.",
[INFO] :   "predictions" : [],
[INFO] :   "status" : "REQUEST_DENIED"

i am using this url to get following Results :

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Sai&types=geocode&language=en&sensor=true&key=#######{MY BROWSER KEY} #######

I tried Everything but these seems to doesn't work. i have Turned on Use PLACE API under API & AUTH Tab .

If your purpose is only to use the api for autocomplete, you should use the geocode api, its free and does not require key. Also it gives you complete data related to the location(including lat and lang).

here is the sample URl :

http://maps.google.com/maps/api/geocode/json?address=YOUR_ADDRESS_HERE&sensor=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM