[Mapserver-users] Pan Button

Jeff Berry jeffb at erlandsen.com
Fri Dec 13 12:19:14 PST 2002


I'm trying to create fixed pan buttons, (pan right, left, up, down).
However, I just can't seem to get it working.  Below is the php code I've
placed in the main php section of the my phtml file.  Also, I've listed the
html for the "pan right" input button.  I'm just not sure what I'm doing
wrong here.  The button refreshes the map but does not change the extent.

PHP
----
$xmax = $gpoMap->extent->{xmax};
$xmin = $gpoMmap->extent->{xmin};
$xinc = ($xmax - $xmin ) / 2;
if ($pan=="right") {
	$gpoMap->setextent( ($xmin + $xinc), $ymin, ($xmax + $xinc), $ymax);
	}

HTML
----
<input type=IMAGE src="images/right.gif" width="15" height="35" name="pan"
value="right" border=0 >


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