I have a MapLayer defined on my MapControl using the following:
<maps:MapControl x:Name=“MyMap”
[…]
Layers=“{x:Bind ViewModel.Layers}”>
I defined a MapElementsLayer and added it to my MapLayer.
I now programmatically create elements and add them to my MapElementsLayer. My issue is that when I add new elements, or delete the elements that are already there, they do not draw/clear on the map. The only way I have been able to get them to update, is to delete the map layer, and re-add it. This process is resource intensive and halts the UI thread for a number of seconds each time.
Is there anyway to update the contents of a MapLayer/MapElementsLayer and trigger a redraw? I have searched the documentation and cannot find a way to trigger a redraw.
Thanks, John