Map Children Image size very large?
-
Friday, July 27, 2012 6:59 PM
I'm placing an image/symbol on a map with code like this:
locationIcon = new Image(); locationIcon.Source = new BitmapImage(new Uri("ms-appx:///Assets/PushpinCar.png"));map1.Children.Add(locationIcon);
The png is 32x26 pixels but shows up on the map as huge -- about half the map size which is about 500x500.
Why is that and how am I supposed to add a symbol to a map?thanks,
Rick
All Replies
-
Friday, July 27, 2012 7:52 PM
Explicitly specify the size of the Image. During the layout pass we ask the control how large it wants to be and without a specific size it looks like Image does not auto size to fit.- Proposed As Answer by Kristoffer HenrikssonMicrosoft Employee Friday, July 27, 2012 7:52 PM
- Marked As Answer by Bucolic Geek Friday, July 27, 2012 10:18 PM
- Unmarked As Answer by Bucolic Geek Friday, July 27, 2012 10:18 PM
- Marked As Answer by Bucolic Geek Friday, July 27, 2012 10:18 PM
-
Friday, July 27, 2012 10:20 PM
This code seemed to work OK:
locationIcon.MaxHeight = 26; locationIcon.MaxWidth = 32;Thanks,
Rick

