0
votes

I have a Bing Maps Control (Microsoft.Phone.Controls.Maps.Map) in created in the XAML in a page of my Windows Phone 8 application.

<maps:Map x:Name="map" CredentialsProvider="..." MapResolved="map_MapResolved"   ViewChangeStart="map_ViewChangeStart">
</maps:Map>

I have added a total of six MapTileLayer classes to the map. All these layers cause the map to function slightly slower than normal, but not unacceptably so.

When I run the app on two out of my three phones (Nokia Lumia 920, Nokia Lumia 1020), it works fine for about half a minute. Then, the entire phone freezes and it must be force rebooted. If I reduce the number of layers I use on the map, the frequency of this issue is reduced. However, I must have six layers. I also must be using the WP7 Bing Maps control, I cannot use the WP8 Nokia Maps control.

The app does work on my Lumia 1520, which is not surprising given that it is considerably faster than the other two.

Any ideas as to what might be causing this issue or I could go about identifying the cause?

Thank You

1
Why dont you use MAP API instead of BING MAPS " The Bing Maps control is still supported in Windows Phone 8, but is deprecated. Typically, the only time you should use the Bing Maps control is in an existing app that you have upgraded from Windows Phone OS 7.1 to Windows Phone 8." says MSDN docs..Prasanna Aarthi
Because the Nokia Maps API for Windows Phone 8 does not support MapTileLayers.msbg

1 Answers

0
votes

I suspect the source of your issue is the number of web request being made. Usually with a 1280x720 resolution screen (Lumia 920 has this) there will be at least 15 tiles loaded into view per tile layer. Every time you move the map to a new area more tiles are requested. So if you have 6 layers this is easily 90 map tiles being requested and downloaded at a time. If you are not on a WIFI connection you would likely find loading that many tiles really slow.

A possible solution that would likely speed things up a lot is to create a proxy service which combines the tiles from the layers together into a single tile. So, if someone requests tile abc then all tiles for the different layers are first loaded into the service and merged into a single image and returned to the device. You could do this fairly easily with a Generic handler and .NET drawing tools in C#. Here is a blog post that's along the same lines: http://rbrundritt.wordpress.com/2009/11/27/bing-maps-custom-tile-skinner/