What could cause the ImageSource property of a Marker to be set to null, such that when the Marker is clicked on the map, it just disappears?
I am creating Markers for the SimpleMarkerOverlay using this code:
var location =newPointShape(point.X, point.Y);var marker =newMarker(location){YOffset = symbolInfo.OffsetX,XOffset = symbolInfo.OffsetY,Opacity = symbolInfo.Opacity,ImageSource =newBitmapImage(newUri(symbolInfo.ImagePath, UriKind.RelativeOrAbsolute))};
After adding the markers, I can drag them around without any problems. I do save the marker position and image used to some sort of profile and when I restore these markers from the profile using the same code above, I can no longer drag them around. When I click on each restored marker, it disappears from the map. When I want to re-save these markers again, their ImageSource properties are all null, probably claimed by the GC.
Can anyone tell me under what conditions that Marker’s ImageSource property is set to null? I tried playing with the BitMapImage’s create and cache options but these did not help.
TIA.