Zoom to custom extent - PHP
Kevin Grootendorst
kgrootendorst at BAIRD.COM
Tue Jan 25 11:11:21 PST 2005
Bill,
Thanks for the direction. I'm still a little stuck. Just to clarify, I
have the following code:
----------
In my app_contents.php file:
<SELECT NAME="ViewRegion">
<OPTION VALUE="7120999 827999 7599999 1119999">Lake Ontario</OPTION>
<OPTION VALUE="7200000 833270 7291840 894520">Niagara (ON)</OPTION>
<OPTION VALUE="7150000 878000 7210000 880000">Hamilton-Wentworth</OPTION>
</SELECT >
----------
In my app.php file:
(the code that you provided)
// check if quick zoom is requested
if ( isset( $http_form_vars['ViewRegion'] ) && strlen($http_form_vars
['ViewRegion'] ) > 0 )
{
// separate values
$adExtents = explode( ',', $http_form_vars['ViewRegion'] );
// set extent
$oMapSession->oMap->setExtent( $adExtents[0], $adExtents[1],$adExtents
[2], $adExtents[3] );
}
-----------
This isn't quite working yet, but is this really all the code I'll need?
Should my drop-down box be set as a form?
Thanks again for your help - this has been very frustrating.
Kevin
More information about the MapServer-users
mailing list