Monday, August 06, 2012 6:02 AM
Why in WPF Bing Map Control in MapLayer no property ParentMap? But in Silverlight there is a property = (
<m:Map x:Name="map" CredentialsProvider="key"> <m:MapLayer x:Name="mapLayer"> <m:Pushpin x:Name="pushpin" Location="0,0"/> </m:MapLayer> </m:Map>
pushpin.Parent returns MapLayer, mapLayer.Parent returns MapLayer (why not a Map?), (mapLayer.Parent as MapLayer).Parent returns null.
How to access to the Map from Pushpin?
- Edited by phoenixbk Monday, August 06, 2012 6:02 AM
Saturday, August 11, 2012 2:36 PMOwner
The WPF control uses a better architecture model which makes the MapLayers and Shapes independent of the map. This was done by design. The method used by the Silverlight control actually limits how the controls can be used. If you want to add a reference to the map to the pushpin or the map layer simply set the Tag property to the map object and then use that later as your reference.
Friday, August 17, 2012 4:21 AMThank you for the answer! =)