MobileMapViewer - Remove All Locations

I’m hoping this is a dumb question. But, I know if I have a MapLocation as a single location or as an array of locations, I can simply add them to the map by using this routine:

Var Locations() As MapLocation
Locations = MapViewer1.LocationsFromQuery(“123 Main St, Lucky City, AK”)

And, doing something like this:


Would subsequently remove all of the locations found in “Locations” array - in this case just the one.

But, if this routine had been run several different times, reusing this routine for several independent searches for locations, thus, the array is gone and reused, how do I remove all locations on the map without closing the screen entirely?

You need to keep track of your locations yourself. As the example code in the documentation shows:

// Remove the location stored in MyHouse from MapViewer1: