A zoomIn button
Doug Nebert
ddnebert at usgs.gov
Mon Jan 3 07:53:29 PST 2000
I am puzzled at making a zoomin button based on the current
mapextent, being a javaScript newbie. With Steve's direction
I have a nice button that will zoom to full extent:
function goGlobal() {
document.mapserv.imgext.value = "-180 -90 180 90";
document.mapserv.imgbox.value = "-1 -1 -1 -1";
document.mapserv.imgxy.value = "249.5 124.5";
document.mapserv.zoom = "1";
}
that I set with:
<input type="button" value="Zoom to Globe" onClick="goGlobal()">
and invoke with the submit effects of the form submission button.
I need the similar functionality to place on twoi buttons with a
pre-defined zoom in or out of 3 or -3 respectively. I cannot quite
decode the things being set in the form example I started with, but
interpreted the following that does not work, gives a JS error:
function zoomIn() {
document.mapserv.layer = "registry";
document.mapserv.zoom = "3"
SetZoomToPan();
SetModeToBrowse();
}
Assistance appreciated.
--
Douglas D. Nebert
Clearinghouse Coordinator
FGDC Secretariat Phone: +1 703 648 4151 Fax: +1 703 648-5755
Pager Messaging: http://fgdclearhs.er.usgs.gov/dougmsg.html
More information about the MapServer-users
mailing list