This project has moved and is read-only. For the latest updates, please go here.

Layer with no tiling

May 15, 2013 at 9:58 AM

Does xaml control support not tiled layers?
If not, what is the best way to do it?

Best regards
May 15, 2013 at 3:10 PM
Edited May 15, 2013 at 3:17 PM
It is possible to do that by using the new MapImageLayer class.

Check out the latest version of the map control (1.3.3). Set the TileLayers property to an empty TileLayerCollection. Then add a MapImageLayer with an appropriate UriFormat property to get full screen map images.
<map:Map ...>
    <map:MapImageLayer UriFormat=.../>
Please note that this kind of map content cannot be cached and may create significant load on the map server.

You can also derived from MapImageLayer and override the GetImage method to provide your own map content.
May 16, 2013 at 10:37 AM
Thank you for your answer.
MapImageLayer works great!

My application is mixing tiled layers and not tiled layers with the ability to add/remove layers at runtime.

I think I am going to develop a MapImageLayerContainer that extends MapPanel class that will be able to have more than one not tiled layer.
Do you think it is a good idea? Do you have any advice to do it?

Best regards,
May 16, 2013 at 11:45 AM
I guess extending MapPanel isn't even necessary. You may just add MapImageLayers to a MapPanel's Children collection (or even directly to the Map's Children).
May 17, 2013 at 7:03 AM
Lekem, there was a subtle bug in the handling of an empty TileLayers collection. You may better use an empty TileLayer instead:
<map:Map ...>
    <map:MapImageLayer UriFormat=.../>