[mapserver-users] Restricting zooms into a map

stepan.kafka at centrum.cz stepan.kafka at centrum.cz
Mon Jan 7 10:49:54 PST 2002


I think, the problem is caused that you overwrite original map 
extent twice. Try copy $map->extent to temporary variable for 
using in the second command.

Stepan


______________________________________________________________
> Od: thorsten fischer <thfischer at mapmedia.de>
> Komu: mapserver-users at lists.gis.umn.edu
> CC: 
> Datum: 07 Jan 2002 19:53:29 +0100
> Předmět: [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
> ---------------------------------------------------------
> 


-----
Centrum pro milovníky peněz 
http://finance.centrum.cz 






More information about the MapServer-users mailing list