[mapserver-users] Restricting zooms into a map
Armin Burger
armin.burger at territoriumonline.com
Mon Jan 7 11:20:55 PST 2002
Thorsten,
you could use the map file setting
WEB
..
MINSCALE 25000
..
END #Web
I'm only working with he cgi version but it should work also for the PHP
one, I suppose.
armin
> 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