MobileMapViewer.AddLocation

From Xojo Documentation

Method

MobileMapViewer.AddLocation(ParamArray locations As MapLocation)

New in 2020r2

Supported for all project types and targets.


Method

MobileMapViewer.AddLocation(locations() As MapLocation)

New in 2020r2

Supported for all project types and targets.


Adds to the map the MapLocations passed.

Notes

Map locations appear as pins on the map.

The map will automatically set the ZoomRadius to fit all add locations.

If you set the MapLocation.Icon of the MapLocation before adding it, the Picture you set as as icon will be drawn at the location rather than the default pin.

Sample Code

Add the Grand Canyon and the White House locations to MapViewer1:

Var locations() As MapLocation
locations.Add(New MapLocation(36.056595, -112.125092)) // Grand Canyon
locations.Add(New MapLocation(38.897957, -77.036560)) // White House
MapViewer1.AddLocation(locations)

See Also

MapLocation class.