iPhone setting Map.Features to an empty list

On a Map full of Markers, setting Map.Features to an empty list removed the features on an Android device... on an iOS device MIT App Inventor crashes. I suggested to my students that a workaround might be to make all available Markers invisible:

Is that the only option in iOS, or is there a correct way to remove all features from a Map?

— dcp

Hmm. This seems like it could be an oversight on our part. Let us run some tests and get back to you.

I just took a look at the Features property on iOS and the implementation suggests that it should clear the features off of the map. I need to poke around the internals more to figure out what exactly is going on here.

Edit: I've found the source of the bug and have put together a fix for it.

1 Like


My experience is, on a Map full of design time Markers, setting Map.Features to an empty list removes the Markers on an Android device Map display. If the Markers are run time Markers; it does not remove the run time Markers from the map.

Thanks, Evan. Let us know!

My experience is that, on Android, setting Map.Features to an empty list removes them both from the Map and from the Map.Features list. Doing that on iOS crashes the app. I'm not sure what a runtime Marker is... one created w/ Map.CreateMarker?

yes design time markers are the numbered Marker objects; run time are created during app execution.

From what I can see, all Markers are removed from the Map when the Map.Features list is emptied (on Android).

Perhaps your case David . What does your code look like?

On my Samsung Android 8.1 the run time Markers do not disappear from the Map object screen when set Map.Features is set to emptyList although it is true the design time Markers are no longer displayed on the Map. Perhaps Evan will comment. :cry:

@SteveJG Do you have a pointer to an AIA I can try that exhibits the issue on your Android device?

@ewpatton Yes. Busy at the moment. Let me clean the example up and provide some comments. Perhaps later today.

1 Like