This example displays a map of the world. Clicking on the map displays an alert box containing the latitude and longitude of the location pressed.

Code

The tap event holds the x and y screen coordinates of the location clicked. These are converted to a latitude and longitude using the map.screenToGeo() method.