Skip to content

4. Open Maps

Taras Leskiv edited this page Jul 8, 2016 · 3 revisions

Android Goodies provides simple and easy interface to open a map application (providing coordinates or address) using intent. If there is no application to handle the intent it will log an exception.


Open location with zoom level

Show the map at the given longitude and latitude at a certain zoom level. A zoom level of 1 shows the whole Earth, centered at the given lat,lng. The highest (closest) zoom level is 23.

Example:

AndroidMaps.OpenMapLocation(47.6f, -122.3f, 9);

Result:


Open location with label

Show the map at the given longitude and latitude with a certain label.

Example:

AndroidMaps.OpenMapLocationWithLabel(47.6f, -122.3f, "My Label");

Result:


Open location with address

Opens the map location with the provided address.

Example:

AndroidMaps.OpenMapLocation("1st & Pike, Seattle");

Result:

Clone this wiki locally