Zoom to custom extent - PHP
Kevin Grootendorst
kgrootendorst at BAIRD.COM
Thu Jan 20 07:31:57 PST 2005
I'm trying to create a simple drop down list with a few place names, so
that users can click on a name and the map will automatically zoom to a
custom extent.
However, I'm having some trouble with this. When I click on the place
name, the whole page just reloads and does not zoom to the extent. Any
help would be appreciated.
I'm using PHP 4.3.4 and MapServer 4.2 (built with MapLab 2.2)
Code (in my 'contents.php' file):
<SCRIPT LANGUAGE="JavaScript">
function CustomView()
{
if (document.forms[0].ViewRegion.selectedIndex != 0 &&
document.forms[0].ViewRegion.selectedIndex !=1)
document.forms[0].submit();
}
</SCRIPT>
and
<SELECT NAME="ViewRegion" onChange="CustomView()">
<OPTION>Quick View - Under Development</OPTION>
<OPTION VALUE="7121000,828000,7600000,1120000">Lake Ontario
Region</OPTION>
<OPTION VALUE="7200000,833270,7291840,894520">Niagara (ON)
</OPTION>
</SELECT >
More information about the MapServer-users
mailing list