This project has moved. For the latest updates, please go here.

Layer with no tiling

May 15, 2013 at 8:58 AM
Hello,

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

Best regards
Coordinator
May 15, 2013 at 2:10 PM
Edited May 15, 2013 at 2: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:Map.TileLayers>
        <map:TileLayerCollection/>
    </map:Map.TileLayers>
    <map:MapImageLayer UriFormat=.../>
    ...
</map:Map>
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 9: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,
Coordinator
May 16, 2013 at 10: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).
Coordinator
May 17, 2013 at 6: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:Map.TileLayer>
        <map:TileLayer/>
    </map:Map.TileLayer>
    <map:MapImageLayer UriFormat=.../>
    ...
</map:Map>