[ka-Map-users] Maintaining extent/scale state when switching maps...

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Jun 30 10:45:19 EDT 2006


Hi guys: I'm likely doing something stupid, but am stuck. I'm switching between 2 maps that cover the exact
same area have the same scales defined. I can seem to get the extent/scale to stick when switching. I figured
it was as simple as:

   var x = (currentExtent[0] + currentExtent[2])/2;
   var y = (currentExtent[1] + currentExtent[3])/2;

    if(element.checked)
      myKaMap.selectMap('st_croix_3d', x, y, currentScale);
    else
      myKaMap.selectMap('st_croix', x, y, currentScale);

But the silly thing always reverts to the starting point with the new map. Ideas?

The page in question is:

  http://maps.dnr.state.mn.us/ka-map/st_croix.html 

It is intended to be used in an i-frame with a popup option. (The 3-D map is cool if you've got some blue/red glasses 
laying around).

Steve






More information about the ka-Map-users mailing list