[Mapserver-users] Java question

Kevin Slover Kevin.Slover at noaa.gov
Mon Mar 3 13:37:35 EST 2003


I am having a little bit of a problem... I am using java jbox to allow
the user to zoom in/zoom out, etc.  I have followed some of the examples
given in the gallery pages.  My problem:
The user chooses the zoom button, and then draws a box.  The box remains
"depressed" until something else is chosen.  No problems there.  Now,
checkboxes that allows the user to choose the layer they want
displayed.  The only problem is that if the user first zooms, then
checks a layer, the layer displays, but the image zooms in as well.

Some snippets of my code (instead of posting all):

<SCRIPT LANGUAGE="javascript">

function Refresh() {
  document.mapserv.target = "";
  document.mapserv.mode.value = "browse";
  document.mapserv.zoomdir.value = "0";
  document.mapserv.submit();
}

function toolzoomin() {
  document.mapserv.zoomdir.value = "1";
  document.mapserv.zoomsize.value = "2";
  document.mapserv.mode.value = "browse";
}
</SCRIPT>
</HEAD>

<form name="mapserv" method=GET action="[PROGRAM]" target=map>
<input type="hidden" name="zoomdir" value="[zoomdir]">
...

<input type="checkbox" name="layer" value="slosh_basins" align="left"
[slosh_basins_check] onClick="Refresh();"> Slosh Outline<br>

Those are the major players in my code.  I have tried setting value="0"
for zoomdir, but without any luck.  It continues to zoom... anyone have
any ideas?

Thanks! Cheers

-- 
LTJG Kevin Slover, NOAA
GIS Specialist/Oceanographer
NOAA/National Hurricane Center/Storm Surge Unit
11691 SW 17th Street 
Miami FL  33165

W (305) 229-4456



More information about the mapserver-users mailing list