Leonardo Amigoni
Leonardo Amigoni

Reputation: 2327

Google Places implementation radius limitation workaround

I am designing a google places implementation with google maps in my app. If I query Google Places there is a limitation of 50000m or 50 km to the search radius.

Say I am in Spain I want to search for a place in Italy. How would I get returns for that from my search?

Thanks in advance.

Upvotes: 0

Views: 862

Answers (2)

shreks7
shreks7

Reputation: 442

I guess I am trying to replicate the Google Maps search bar. So that you just type in a place and it spits out the results. Is there any way to do that with the Google Places API?

You can use Google Places AutoComplete API to do that. It uses a text based search like "Pizza in Italy"

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Pizza+in+Italy&types=geocode&language=fr&sensor=true&key=AddYourOwnKeyHere

Upvotes: 0

skarE
skarE

Reputation: 5890

You would need to set the location in your places query to be in Italy. You can use the geocoder to find convert the location to a LatLng

Upvotes: 1

Related Questions