google maps api 3 - Restricting geocoding to a country -


i have seen possible "static" limit scope of search area (with components restrictions), have seen in release 3.exp (will 3.14) of javascript api, new class google.maps.geocodercomponentrestrictions has appeared. have not seen anywhere how class supposed used though. have more information this?

it looks answered on @ google maps geocoding api, feature api missing in js api (?), formatting like:

geocoder.geocode(        { 'address': address, 'componentrestrictions':{'country':'gb'}},  function(results, status){ ...    }); 

the geocodercomponentrestrictions parameters passed componentrestrictions key.


Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -