tile overlay howto

Jul 13, 2011 at 2:22 PM

Hi. Is it possible to overlay tile layer with another tilelayer with some opacity<1 (for ex labels, or vector map above sat.)? Adding ZIndex property to ILayer with modyfying Canvas.SetZIndex(...) in TileRenderer.DrawImage method gives no effect... What I'm doing wrong?

And what is GroupTileLayer? It doesn't work at all for me.


Aug 2, 2011 at 7:44 AM
Edited Aug 2, 2011 at 8:14 AM


var map = new Map();
var all = new GroupTileLayer(new[] { new TileLayer(new WmsTileSource()), new TileLayer(new WmsTileSource2()});


You must create two tilesource and two tileschema corresponding your wms sources.


I did this and I've got the desired results (2 layers overlayed) but when I'm trying to zoom in, the application crashes...


Exception from HRESULT: 0x88982F50



Edit 1:


I've put all the code from this function in a try catch statement and i got two errors:

1 - No imaging component sitable to complete this operation was found.

2 - The image format was unrecognized.

Some tiles won't be rendered and some others won't be the next level tiles.


The problem seems to be only when using the GroupTileLayer.

If I add only one of them in the map.Layers it works perfectly.

any suggestions?


ps: using geoserver.