[mapserver-users] Rosa Applet/ PHP Full Extent
Hankley, Chip
Chip.Hankley at GASAI.Com
Mon Jul 22 10:50:54 PDT 2002
Bryan -
I'm assuming that you are using PHP MapScript...
the segment of my ROSA applet that refers to that button is:
<PARAM NAME="TB_BUT_fullext_IMG" VALUE="/MapSymbols/FullExtOff.gif">
<PARAM NAME="TB_BUT_fullext_IMG_PR" VALUE="/MapSymbols/FullExtOn.gif">
<PARAM NAME="TB_BUT_fullext_HINT" VALUE="Zoom to Full Extent">
<PARAM NAME="TB_BUT_fullext_INPUT" VALUE="submit">
<PARAM NAME="TB_BUT_fullext_NAME" VALUE="CMD">
<PARAM NAME="TB_BUT_fullext_VALUE" VALUE="FULL_EXTENT">
In my main PHP page, I run through a if, elseif, else statement looking at
the various values of the form variable CMD... when I get to the value of
"FULL_EXTENT" (what the form submits if I hit the above specified button) I
run the following.
elseif ($HTTP_POST_VARS["CMD"]=="FULL_EXTENT") {
//set an extent array for the full extent specified in
// the mapfile
$Full_Extent = array($map->extent->minx, $map->extent->miny,
$map->extent->maxx, $map->extent->maxy);
//Call the zoom function
zoom($map, $Full_Extent);
}
// ZOOM FUNCTION
// 'Zoom' the map to a new extent based on a rectangle.
function zoom($map, $Extent) {
//Set the mapextent to the new Zoom extent
$map->setextent($Extent[0], $Extent[1], $Extent[2], $Extent[3]);
}
Chip
-----Original Message-----
From: Bryan Tolka [mailto:btolka at geointeractive.biz]
Sent: Monday, July 22, 2002 12:06 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] Rosa Applet/ PHP Full Extent
I would like to add a Full Extent button either in the Rosa Applet or
under the legend. I am fairly new at most of this. Any help would be
appreciated
--
Bryan Tolka
West Virginia University
More information about the MapServer-users
mailing list