Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top