I'm attempting to conform to the MVVM paradigm for my project. I'm already binding to a LocationCollection, which I use to plot points for a polygon on the map. This is working fine using the following:
I'd like to add additional information in the form of images that are dragged and dropped onto the map. I have no problem manually adding images using the following in the code behind:
I'm fine with everything in the view model up until I add the image to the information layer. The MapPolygon typed works well for my polygon, but what should I use for my images? Should I add another type under the InformationLayer section? If so, which type should I use?
<telerik:InformationLayer Name="informationLayer"> <telerik:MapPolygon Points="{Binding MyPolygon}" /></telerik:InformationLayer>I'd like to add additional information in the form of images that are dragged and dropped onto the map. I have no problem manually adding images using the following in the code behind:
RadMap map = (RadMap)e.Options.Destination;Location dropCursorLocation = Location.GetCoordinates(map, e.Options.RelativeDragPoint);Image img = new Image { Source = new BitmapImage(new Uri(@"..\Resources\MyImage.png", UriKind.Relative)) };MapLayer.SetLocation(img, dropCursorLocation);informationLayer.Items.Add(img);I'm fine with everything in the view model up until I add the image to the information layer. The MapPolygon typed works well for my polygon, but what should I use for my images? Should I add another type under the InformationLayer section? If so, which type should I use?