[ka-Map-users] Problem with maintaining map extents while map changing

Melanie Ritzau MelanieRitz78 at web.de
Wed Apr 4 05:32:24 EDT 2007


Hello,

I changed MySetMap-function in .../tools/kaExplorer/startup.js to

function mySetMap( name ) {
var extents = myKaMap.getGeoExtents();
var cx = (extents[2] + extents[0])/2;
var cy = (extents[3] + extents[1])/2;
var scale = myKaMap.getCurrentScale();
myKaMap.selectMap(name, [cx, cy, scale]);
}

to maintain the map-extents when changing maps. see also http://ka-map.ominiverdi.org/wiki/index.php/Maintain_extents_when_changing_maps

When I switch from one map to another the new map has the same map extents as intended. But when I switch back to the first map the map window displays the map at a false position and scale. When panning now the new loaded tiles are placed correctly (beneath the false tiles)and then I can switch as often as I want between the maps - the extents are maintained correctly. Only when I change the map-scale in browser and switch again to another map the above described problem appears again. There must be somewhere a bug but I was not able to find it. I noticed this behavior on different KaMap-Versions (MS4W,FGS and self-compiled Mapserver and different Kamap-Versions).

Do you have any ideas for a solution ? Nobody else noticed this problem ?

Thank you very much for any help !

Regards,
Mel

_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192



More information about the ka-Map-users mailing list