[mapserver-users] Restricting zooms into a map

thorsten fischer thfischer at mapmedia.de
Mon Jan 7 10:53:29 PST 2002


Ladies and gentlemappers,

Using php mapscript, i want to keep users from zooming deeper into a map
than to a certain scale; say, 25000 for this example. I think the proper
to do this is to perform the zoom, then checking the scale and if the
scale does not match what I want, I am zooming out again.

So I do the following (zooms etc. are done with zoomPoint() in my app,
which works fine):


$map -> zoomPoint ($factor, $point, $X, $Y, $rect, $map -> extent);

if ($map -> scale < 25000) {
  $map -> zoomScale (25000, $point, $X, $Y, $rect, $map -> extent);
}


Unfortunately, calling zoomScale() does not change anything. Are things
done using buffering in some way, i.e. do I have to 'flush' changes
before I do another zoom?


cheers,

thorsten

-- 

Thorsten Fischer        thfischer at mapmedia.de

---------------------------------------------------------
MapMedia - Kartographie und raumbezogene Informationssysteme
Am Borsigturm 42
13507 Berlin
Deutschland
http://www.mapmedia.de tel: +49 (0)30 43032102
---------------------------------------------------------




More information about the MapServer-users mailing list