[ka-Map-users] Maintain extents when changing maps -> strange shifting

Harald Schmidt mapcollect at gmx.net
Mon Jan 8 22:21:23 EST 2007


Hello,

according to Ka-Map Wiki I created a new "function mySetMap(map)" to keep the same map extents when switching the maps:

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

Now the problem:
I have 4 maps with 4 different mapfiles ( all with   EXTENT -180 -90 180 90).
When I switch from map1 to map2 everything is fine (=same map extent). Also switching from map2 to map3 or from map3 to map4 is working correctly. But when I switch back to map1 map1 is shifted to a wrong position. The shift is only in Y-Axis. Shifting again to map2/3/4 and all is fine. Back to map1 shows map1 at same wrong/shifted position. When I pan map1 around the neighboring tiles get loaded and are displayed correctly (beneath the false located tiles).

It makes no difference when i start the described procedere with e.g. map2. after switching back to map2 it is shifted.

Also reducing to 2 maps does not change the behavior.

What might be the reason for this ?? I can't find any mistakes in mySetMap or elsewhere.

Hopefully someone can help me. Thanks in advance !

Regards

Harry Schmidt

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the ka-Map-users mailing list