[mapserver-users] imgbox works on Netscape but not Internet Explorer
Stephen Lime
steve.lime at dnr.state.mn.us
Thu Jun 21 10:46:21 PDT 2001
What sort of javascript are you using? I mean, your not using an applet correct?
That means you're using layers or something like that. Seems to me that you could
just rename the image your dragging on to something other than "img". IE will still
send the .x and .y but MapServer will not process them unless they are called
img.x and img.y. You should also provide better defaults for the hidden vars. Use
a center point for the image for imgxy and -1 -1 -1 -1 for imgbox.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> "Hockaday, John" <JohnHockaday at auslig.gov.au> 06/19/01 07:08PM >>>
Hi all,
I am using some javascript that sets the imgbox variable after a user drags a box
across the mapserver image. This is then submitted to mapserv. The drag box
seems to work on both Internet Explorer (IE) and Netscape but for some reason
IE seems to pass the img.x and img.y variables to mapserv in the query string
and so, instead of zooming to the defined box (as Netscape does), mapserv
uses the img.x and img.y values to execute either zoom in, pan or zoom out
according to which radio button has been selected by the user. Thus Netscape
zooms in to the defined box are but IE zooms in, pans or zooms out.
Has anyone else observed this problem and if so were you able to solve it?
I am using MapServer Version 3.3.011 -FreeType -TIFF -EPPL7 -JPEG on a
Sun Solaris 2.6 UNIX box with Apache 1.3.12 as the web server. The browsers
are Netscape Communicator 4.77 and Internet Explorer version 5.00.2314.1003.
My code to set the imgbox is as follows:
Within the form I have:
<input type="hidden" name="imgxy" value="">
<input type="hidden" name="imgbox" value="">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
Within the javascript I have:
document.mapserv.imgxy.value = "";
document.mapserv.imgbox.value = tx1 + " " + ty1 + " " + tx2 + " " + ty2;
document.mapserv.submit();
Thanks for any help or direction that you can give me.
John
More information about the MapServer-users
mailing list