[mapserver-users] Zooming with Mapscript
Nicolas Boretos
nicolasb at maich.gr
Wed Apr 10 04:11:18 PDT 2002
Hello,
I am a new user to mapserver as well as this list. I am using the tcl
mapscript interface to play with maps. I am able to draw a map...
My question, as I am trying to wade through the mapscript methods is how
to pan and zoom a map..
The following draws a map.. (from the msworkbench code..)
set mapFile kaz_34.map
set map [mapscript::mapObj -args $mapFile]
set img [$map prepareImage]
for {set i 0} {$i < [$map cget -numlayers]} {incr i} {
set layer [$map getLayer $i]
mapscript::layerObjRef $layer draw $map $img
}
$map drawLabelCache $img
mapscript::labelCacheObjRef [$map cget -labelcache] freeCache
mapscript::msSaveImage $img "$mapFile.gif" 1 1
mapscript::msFreeImage $img
I assume that the mapobject has to be re-configured (zoomed/panned) and
re-drawn...
I could probbaly cross ref a perl example...
Sincerely,
nicolas boretos
More information about the MapServer-users
mailing list