From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from MobileUIControl)

New in 2020r2

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

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


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

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")

See Also

MapLocation and MobileLocation classes.