Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the opacity of Tile Sources in Nokia Maps for WP8?

I want to take advantage of some of the new features of the Windows Phone 8 Nokia Maps API (Microsoft.Phone.Maps.Controls namespace).

I have a sequence of TileSource classes, each with a different image. I play the images back in a loop on the map.

In Windows Phone 7, I would create several Microsoft.Phone.Controls.Maps.MapTileLayer classes, add a TileSource to each one, and add them to the map. Then, I would use a timer to go through the layers, setting the opacity of the current one to 1 and the opacities of the others to 0.

enter image description here

In Windows Phone 8, there is no MapTileLayer class. I can add all of the TileSource classes to the Map.TileSources collection, but I cannot change their opacities.

If I add only one source at a time, for each frame adding the current source and removing the last, there is considerable flicker, so this method will not work

Is there a class similar to WP7's MapTileLayer or Bing Maps AJAX's TileLayer in WP8 or some other way to change the opacities of Tile Sources?

like image 294
msbg Avatar asked Dec 07 '13 04:12

msbg


1 Answers

This just isn't possible with the current API. I have looked into this from a number of different angles over the past year. There isn't an out of the box solution for this. However, there is one potential work around which works but requires some work and likely isn't ideal. You can store the tiles on a server and set the opacity through a service. Basically do something like this: http://rbrundritt.wordpress.com/2009/11/27/bing-maps-custom-tile-skinner/ but change the opacity.

like image 74
rbrundritt Avatar answered Sep 19 '22 20:09

rbrundritt