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

Layer handling separately

Topics: General Topics, SharpMap v0.9 / v1.x, SharpMap v2.0
May 6, 2009 at 7:30 AM

Hi all,

how is it possible to zoom and pan two different overlaying images separately? If we are speaking of two layers, one of them should be fixed and all of the map operations should affect only the other layer.
If that is not possible another idea is to use two overlaying maps each showing one of the images. If the two overlying images are aligned it shall be possible to generate one image (save to disk)  of both maps.

Thanks for your help,

May 6, 2009 at 9:40 AM
Hi Martin, I don't really follow the question, could you explain the use case further? cheers jd
May 6, 2009 at 1:18 PM
Hi John,

I have a buildings floor plan (image1.tif) and want to position it in a georeferenced map (image2.tif) at the buildings location (like it is possible in Goggle Earth by adding an image). To achieve coverage the floor plan has to be panned, rotated and zoomed. Afterwards the resulting image shall be stored to disk.
I have examined it so far that I add both images as layers to a map- but all operations (pan, rotate, zoom) affect both layers in the map. It should be possible to 'freeze' one map and to operate only on the other one.
If it is only possible to operate on the map as a whole then I could use two maps, overlay them (with transparent background)  and adjust the images to achieve coverage of the buildings. But now the problem is how to generate one image of both maps.

May 6, 2009 at 2:01 PM
Edited May 6, 2009 at 2:01 PM
Ah, now I understand. It certainly isn't out of the box functionality. You may be able to get somewhere with a custom layer type but it is likely to require quite a bit of effort.
WRT the second part of your question:

Bitmap map1 = GetBackgroundMap();
Bitmap map2 = GetOverlayMap();
Graphics g = Graphics.FromImage(map1);
hth jd