I'm developing an App in which the map will be shown to user and I need to add around 10-12 images to the map at different GeoPoints each having 1KB of size.
I'm adding those images dynamically as per below:
Image img = new Image();
img.Height = 35;
img.Width = 35;
img.Source = new BitmapImage(new Uri("ms-appx:///Assets/myImage.png"));
img.RenderTransform = new CompositeTransform() { Rotation = item.bearing };
MapControl.SetNormalizedAnchorPoint(img, new Point(0.5, 0.5));
MapControl.SetLocation(img, new Geopoint(new BasicGeoposition() { Latitude = item.latitude, Longitude = item.longitude }));
myMap.Children.Add(img);
My Problem is
After I add those 12 images, my Map control becomes soo Laggy that while moving the map from one location to other, it hangs a lot.
So, is there any efficient way to add images to Map in windows phone 8.1 App.
Edit:
I've tried to add MapIcons
to the Map, but in that case MapIcons were disappeared at specific zoom level, but i want to keep those MapIcons visible at any zoom level.
So is there any way I can make MapIcons
visible for every zoom level?