gmap demo
Frank Fica
simbiotico at HOTMAIL.COM
Wed Mar 1 20:22:45 PST 2006
Hi,
I recently configured the gmap demo in my mapserver box and is working fine.
When I tried loading my own data and changing the required variables for my data, everything
works fine except for the quick list menu.
When I click to zoom on the quick list, the main map gets redrawn but with the same extents,
thought it shows ViewRegion=-90.210352%2C14.252371%2C-90.760314%2C14.937117 but it
doesn't zoom to that extent.
my conf. in the .phtml file is:
<SELECT NAME="ViewRegion" onChange="ProvinceSelected()">
<OPTION>Quick View</OPTION>
<OPTION>- - - - - - - - - - - - - - -</OPTION>
<OPTION VALUE="-90.210352,14.252371,-90.760314,14.937117">Guatemala City </
OPTION>
</SELECT >
and the .php file:
/* -------------------------------------------------------------------- */
/* province selection. */
/* -------------------------------------------------------------------- */
if ($HTTP_FORM_VARS["ViewRegion"])
{
if (ereg("(-?[0-9]+),(-?[0-9]+),(-?[0-9]+),(-?[0-9]+)",
$HTTP_FORM_VARS["ViewRegion"], $ProvExtents))
{
$dfMinX = doubleval($ProvExtents[1]);
$dfMinY = doubleval($ProvExtents[2]);
$dfMaxX = doubleval($ProvExtents[3]);
$dfMaxY = doubleval($ProvExtents[4]);
SetMapExtents($dfMinX, $dfMinY, $dfMaxX, $dfMaxY);
}
}
Any ideas?
Thanks,
Frank
More information about the MapServer-users
mailing list