mapextent

Richard Jansen richardjansen at TMOP.NL
Fri Feb 11 02:52:07 EST 2005


Hi MapServer fans,

Just added myself to The List. Since one week i'm into the MapServer world.
Now it's time to get some help of you.

I want to zoom in every time i click my 'zoom in' button. Wat i do is the
following (MapScript):

$extent = $layer->getExtent();
$map->setExtent($extent->minx+10000, $extent->miny+10000, $extent->maxx-
10000, $extent->maxy-10000);
$map->save("tmpmapfile.map");

I put the tmpmapfile name in a session so i can use it on and on to zoom in
multiple times.

The original extent is: 13537 306848 278002 619116 (my little country the
Netherlands). Wat i want to get is: 23537 316848 268002 609116 as my new
mapextent. But this is wat i get: -364.000000000004 316848 291903 609115

The problem seems to bee de $map->save() because if no new extent is set,
the new extent (the same as the orginal) contains wrong coords.

Has anybody an idee to solv this? Thanks!!

Richard



More information about the mapserver-users mailing list