Monday, 15 June 2015

Google geocodeing API - search in just one country -



Google geocodeing API - search in just one country -

i looking geocodes google geocode-api:

http://maps.googleapis.com/maps/api/geocode/json?address=london%c2+uk&sensor=false

the problem is, input isn't accurate (specially street) , google mixes things , ignores uk, because street has perfect match (as street , city) somewhere else. e.g. us.

now cannot solve issue (input data), wondering if there parameter, forces google search in uk , homecoming no result instead of completly wrong result.

you can add together component filters in url constraint results. in case can use:

http://maps.googleapis.com/maps/api/geocode/json?address=london%c2+uk**&components=country:uk**&sensor=false

for more info how utilize component filtering see:

https://developers.google.com/maps/documentation/geocoding/#componentfiltering

google-geocoder google-geocoding-api

No comments:

Post a Comment