help with loadSetArea, updated , still need help please

Gary Watry watry at COAPS.FSU.EDU
Thu Dec 1 11:50:41 PST 2005


Here is where I am (and let me start by saying I come from a GIS not
programmer background, but I am learning slowly)

http://indianocean.coaps.fsu.edu/httpdocs/indextidestest.html

 I can load the regions by brute force

Javascript

// testing area follows
    //Zoom Map to Selected Extent
    function zoomTo01(){
	document.mapserv.target="";
	document.mapserv.mode.value="browse";
	document.mapserv.imgext.value ="-88.84 31.29 -86.63 29.42";
	document.mapserv.imgbox.value = "-1 -1 -1 -1";
}
    function zoomTo02(){
	document.mapserv.target="";
	document.mapserv.mode.value="browse";
	document.mapserv.imgext.value ="-87.84 31.32 -84.29 29.00";
	document.mapserv.imgbox.value = "-1 -1 -1 -1";
}
    function zoomTo03(){
	document.mapserv.target="";
	document.mapserv.mode.value="browse";
	document.mapserv.imgext.value ="-85.48 30.27 -82.56 28.91";
	document.mapserv.imgbox.value = "-1 -1 -1 -1";
}

HTML Body code

<!-- Zoom To Region ------------------------------------------------------>
  <b> Zoom To Region</b>
  <br><a href="javascript:void(document.mapserv.submit())"
onClick="zoomTo01();">Alabama</a> &nbsp &nbsp
  <a href="javascript:void(document.mapserv.submit())"
onClick="zoomTo02();">Panhandle(Fl)<br></a>
  <a href="javascript:void(document.mapserv.submit())"
onClick="zoomTo03();">Big Bend(Fl)</a><br>
<!--

However, this is the drop-down that I want to use 

    <Font Face="arial", Helvetica, sans-serif" SIZE="2">
    <Select Name="ViewRegion" onChange="GoPlace()">
    <option>Coastal Regions</option>
    <option>------------------------</option>
    <option value="-88.84 31.29 -86.63 29.42">Alabama - Coastal</option>
    <option value="-87.84 31.32 -84.29 29.00">Florida - Panhandle</option>
    <option value="-85.48 30.27 -82.56 28.91">Florida - Big Bend</option>
    <option value="-84.07 27.61 -81.14 29.66">Florida - Central West
Coast</option>
    <option value="-83.06 25.74 -80.14 27.77">Florida - South West
Coast</option>
    <option value="-83.13 24.21 -80.20 26.24">Florida - Keys</option>
    <option value="-81.69 25.14 -78.76 27.18">Florida - South East
Coast</option>
    <option value="-81.80 26.77 -78.87 28.81">Florida - Central East
Coast</option>
    <option value="-82.66 28.71 -79.72 30.75">Florida - North East
Coast</option>
    <option value="-82.66 30.37 -79.73 32.41">Georgia - Coastal</option>
    <option value="-77.04 35.15 -74.11 37.19">North Carolina - Northen
Coast</option>
    <option value="-77.27 34.34 -74.33 36.39">North Carolina - Central
Coast</option>
    <option value="-78.69 33.39 -75.75 35.44">North Carolina - Southern
Coast</option>
    <option value="-80.28 32.63 -77.35 34.67">South Carolina - Northern
Coastal</option>
    <option value="-81.25 31.71 -78.31 33.75">South Carolina - Southern
Coast</option>
    </select></font>

The question is how do I pass the Option Value to the 
    //Zoom Map to Selected Extent
    function GoRegion(){
	document.mapserv.target="";
	document.mapserv.mode.value="browse";
	document.mapserv.imgext.value ="-88.84 31.29 -86.63 29.42";
	document.mapserv.imgbox.value = "-1 -1 -1 -1";

to replace the "-88.84 31.29 -86.63 29.42" with the new value



______________________________________________________________
Gary L. Watry

GIS Coordinator
Center for Ocean-Atmospheric Prediction Studies
FSU / COAPS
Johnson Building, RM 215
2035 East Paul Dirac Drive
Tallahassee, Florida 32306-2840
 
E-Mail: watry at coaps.fsu.edu



More information about the MapServer-users mailing list