Glad that suggestion worked. It had unintended consequences.
Perhaps you can use
Features- Returns a list of features present in the feature collection, if any.
?
and use the information to not to completely empty the Map1.Features list but selectively delete using a loop to delete only the run time features. Something like if select list item list/index not Marker1 (the green puzzle piece that is the lowest Marker puzzle piece) remove list item list / index . Of course, cycling through the list will be slower than clearing the list, depending on how many Markers you are eliminating.
That Marker1 (assuming it is a design time object) is also cleared is a surprise but not entirely unexpected. That response appears to either be a bug or an intentional response that might be part of the Java osmdroid-library the map control uses to interface with OpenStreetMap. I expect it is intentional, so instead of emptying the List, selectively delete blocks.
If Users want to do what you want to do with the MIT Map Marker, they might have to reinstate Marker1 or or other design time features as a run time Marker following emptying the Features list. Something like call Map1.CreateMarker latitude LocationSensor.Latitude
longitude LocationSensor.Longitude and note it's real time name.
A way around this is not to use a Marker for your current geolocation but instead, in the Map component set ShowUser to true and a different icon will display at your current location. I expect emptying Features will not mess with that icon. See
ShowUser
- Shows or hides an icon indicating the user's current location on the Map. The availability and accuracy of this feature will depend on whether the user has location services enabled and which location providers are available.
Regards,
Steve