If you were to do a reverse lookup for a region (States or Province) and that region happen to have a city with the same name, then Google geocoder will return the information on the city instead of the region.

How would you pass parameters to Google telling it that you are indeed interested in the region and not the city?

Calling Google WebAPI would be something like this: http://maps.google.com/maps/api/geocode/json?components=administrative_area:Durango|country:MX&sensor=false

But instead, we want to call geocoder.

_geocoder = new google.maps.Geocoder();
_geocoder.geocode(request_dict, function(results, status) { ... }

How do you form the "request_dict"?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.