[mapserver-users] Fixed pan buttons with PHP Mapscript

Jeff Berry jeffb at erlandsen.com
Mon Nov 18 16:24:42 PST 2002


I'd like to be able to add 4 buttons around the map representing the 4
cardinal directions, that when clicked will pan the map precisely half the
current extent of the map in the specified direction.  I'm using PHP
Mapscript.  I'm pretty new to PHP and definitely new to Mapscript, and this
is my first real attempt at customizing Mapserver with Mapscript.  So, I'm
sort of shooting in the dark here and am not sure how to approach this.

My main question is how can I get access to the coordinates for the current
map extent? I've looked through the class descriptons for MapScript and see
the MapObj has rectObj as a member.  So, I assume I can get to the current
map extent through the rectObj, but I'm uncertain on exactly how to do this,
as far as the actual code.

I imagine someone has already done this, so if there is anyone willing to
share their code for a fixed pan button with a rookie, it would be a big
help.

Thanks,

Jeff Berry
Erlandsen & Associates
P.O. Box 2029
Chelan, WA 98816
(509) 682-4189
jeffb at erlandsen.com




More information about the MapServer-users mailing list