Hi,
I wanna display shape data on the Maplayer with an image background.
How could i set the background image of xamMap MapLayer?
Thx.
Regards,
NNT
Hi Milana,
Thanks for the reply.
What i really need in this case is setting image brush to xamMpa.ViewportBackground.
But your answer is also a solution for one of my problems.
Thanks.
Hi nyinyithann,
If I understand you correctly, you want to use an image as a particular MapLayer's background. A sample approach is the following: private void mapLayer_Imported(object sender, Infragistics.Controls.Maps.MapLayerImportEventArgs e) { if (e.Action == MapLayerImportAction.End) { foreach (MapElement el in this.theMap.Layers[0].Elements) { if (el.Name == "ElementX") { ImageBrush myImg = new ImageBrush();
myImg.ImageSource = new BitmapImage(new Uri("/Images/image.jpg", UriKind.Relative));
el.Fill = myImg; } } } }Hope that helps,Milana Zhileva