Search code examples
windows-phone-7dictionarybing-maps

Adding Image into Bing map


I've tried adding a image via the following however it is still not working. The image type is a content.

Image image = new Image();
image.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("myimage.png", UriKind.Relative));

//Define the image display properties
image.Opacity = 1.0;
image.Stretch = Stretch.Fill;
image.Width = 40;
image.Height = 40;

// Center the image around the location specified


//Add the image to the defined map layer
phoneDetailsLayer.AddChild(image, e.Position.Location);

mapViewAll.Children.Remove(phoneDetailsLayer);
mapViewAll.Children.Add(phoneDetailsLayer);

Solution

  • /projectname;component/images/menu/lost.png
    

    Is the correct way, the rest of your answer is really not working