Question

I have an android application that allows the user to select a default country.
Countries are held as ISO 3166 codes
Is there a way to automatically pan a Google v2 map to the chosen country using its iso3166 code?

Was it helpful?

Solution

Is there a way to automatically

Nothing is done automatically. We do everything manually so it seems automatic. ;)

pan a Google v2 map

theMap.moveCamera(CameraUpdateFactory.newLatLngBounds(...));

to the chosen country using its iso3166 code?

Parse the output of

http://maps.googleapis.com/maps/api/geocode/json?address=GB&sensor=false

to get the bounds.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top