Hi guys,
I'm trying to display an arrowhead (in the form of a marker) on one end of a line to show the direction of the line. When I add the marker to the marker overlay, I need to rotate the arrow head image to point it towards the required direction. After creating the marker object, I set the ImageRotationAngle of the marker and add the marker to the marker overlay. The marker image displays at the correct position but the image is not rotated. I've also found that setting the ImageRotationAngle of an existing marker however rotates the image. I even tried the same thing in the LabelRotateAMarker sample by setting the ImageRotationAngle of the marker on the load function but the marker image does not rotate. But it works when I set it in the Button_Click function.
// Adding a new marker
Marker marker = new Marker(-94.558, 39.078);
marker.ImageSource = new BitmapImage(new Uri("../../Theme/GREEN.png", UriKind.RelativeOrAbsolute));
marker.ImageRotationAngle += 20; // This does not rotate the image markerOverlay.Markers.Add(marker);
// Modifying existing marker
SimpleMarkerOverlay markerOverlay = Map1.Overlays["SimpleMarkerOverlay"] as SimpleMarkerOverlay;
Marker marker = markerOverlay.Markers[0];
marker.ImageRotationAngle += 20; // This rotates the image
Am I missing something here?
Thanks,
Nirish