Using Google Places

Hi,

   I’m wondering if there is a way to use Google Places with Corona SDK? I want to use the auto-complete address feature from Google Places. Currently I’m using the requestLocation function to return the latitude and longitude of locations that my users input, but if the location is not set by Google, it can’t find the address. That’s why I would like to use Google Places to bring up a list of suggested locations as the user types. If anyone has any other suggestions on how I might be able to do this, please let me know. Thank you very much.

Google Places offers either SDK’s based on native Java/Objective C which you could do using Corona Enterprise or you can use a native.newWebView() and their JavaScript API.  I built a weather app for my Wife and I had to use Google Maps through a webView to get the radar working.

Rob

Thanks Rob. I’ll give it a try.

Don

I found out that Google Places has a RESTful API, which you can access.

https://maps.googleapis.com/maps/api/place/autocomplete/json?input="..INPUT\_VARIABLE\_GOES\_HERE.."&types=geocode&key=API\_KEY\_GOES\_HERE

I was able to use the network request to get the auto-complete suggestions.

Great!

Google Places offers either SDK’s based on native Java/Objective C which you could do using Corona Enterprise or you can use a native.newWebView() and their JavaScript API.  I built a weather app for my Wife and I had to use Google Maps through a webView to get the radar working.

Rob

Thanks Rob. I’ll give it a try.

Don

I found out that Google Places has a RESTful API, which you can access.

https://maps.googleapis.com/maps/api/place/autocomplete/json?input="..INPUT\_VARIABLE\_GOES\_HERE.."&types=geocode&key=API\_KEY\_GOES\_HERE

I was able to use the network request to get the auto-complete suggestions.

Great!