MobileMapViewer

From Xojo Documentation

Class (inherits from MobileUIControl)


New in 2020r2

A control for viewing maps loaded via a map provider like Google.

Enumerations
MapTypes TrackModes
Events
Closing Opening
LocationSelected UserLocationChanged
Properties
AccessibilityHint Left fa-lock-32.png Top fa-lock-32.png
AccessibilityLabel Longitude fa-lock-32.png TrackMode
ControlCount MapType Visible
Enabled Name fa-lock-32.png Width fa-lock-32.png
Height fa-lock-32.png Parent fa-lock-32.png ZoomRadius
Latitude fa-lock-32.png TintColor
Methods
AddConstraint ControlAt RemoveConstraint
AddControl GoToLocation RemoveControl
AddLocation LocationsFromQuery RemoveLocation
ClearFocus Refresh SetFocus

Notes

With the MobileMapViewer, you can go to a specific location, add pins that represent locations, remove those locations and search for locations by name, address, type, etc.

Sample Code

Show Hobbiton on MapViewer1:

MapViewer1.GotoLocation(-37.871826, 175.681283)

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)

Find all the McDonalds locations near the center of the map currently being displayed and add them to it:

Var locationsFound() As MapLocation
locationsFound = MapViewer1.LocationsFromQuery("McDonalds")
MapViewer1.AddLocation(locationsFound)

See Also

MapLocation and MobileLocation classes.