[mapserver-users] Restricting zooms into a map

Brian Fischer bfischer at mpls.houstoneng.com
Mon Jan 7 11:02:02 PST 2002


Can you use the MAXSCALE and MINSCALE parameters in the Web Object.  I
would think this would be the easiest way to handle this.

Brian

-----Original Message-----
From: thorsten fischer [mailto:thfischer at mapmedia.de] 
Sent: Monday, January 07, 2002 12:53 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] Restricting zooms into a map

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