[mapserver-users] Minscale in web section not working? php/mapscript

Daniel Morissette dmorissette at mapgears.com
Fri Mar 21 11:59:07 PDT 2008


frequens wrote:
> Is anyone successfully using the MINSCALE seting in WEB section of the
> mapfile in phpmapscript (5.02).
> I can not get it to work, while the same seting for the LAYER level
> works just fine...
> 

Do you mean that it is simply ignored, or do you get some kind of error 
message? Which method do you use to handle zooming in your application?

With PHP MapScript, the $map->setExtent() method will happily let you 
set an extent that results in a scale outside of the WEB's 
MINSCALEDENOM/MAXSCALEDENOM. In that case it is up to the application 
code to validate the map scale and prevent the user from zooming in or 
out too far.

However, if you use methods like $map->zoomScale() or 
$map->zoomRectangle() then it should take the WEB's 
MINSCALEDENOM/MAXSCALEDEMON into account and prevent zooming outside of 
that range.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the MapServer-users mailing list