Google Places API autocomplete specific city -


i have questions google places api android.

this request being called:

https://maps.googleapis.com/maps/api/place/autocomplete/json?sensor=false&key=api_key&components=country:hr&language=hr&input=lad

the issue want addresses within specific city. possible?

here quote google places api autocomplete suggests should work.

blockquote (regions) type collection instructs place service return result matching following types:

  • locality
  • sublocality
  • postal_code
  • country
  • administrative_area1
  • administrative_area2

blockquote (cities) type collection instructs place service return results match either locality or administrative_area3.

so specify citry or postal code in order filter addreses city.

--edit--

this approach doesn't work either.

maps.googleapis.com/maps/api/place/autocomplete/json?sensor=false&key=api_key&types=geocode&location=45.811093,15.974121&radius=12000&components=country:hr&language=hr&input=lad

solution

i've added city name in input string

city_name+street zagreb+fal in order streets zagreb fal* in name.

it seems working oke.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -