[Mapserver-users] Mapplet not working...
Kevin Ravno
kevin at giscoe.com
Wed Aug 6 07:12:48 PDT 2003
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C35C24.D0C02FE0
Content-Type: text/plain;
charset="iso-8859-1"
Hi
I have tried to implement the zoom-box facility of mapplet.
I have a virtual directory (IIS 5.0) set up to C:\MapServer\Project1 (on
Windows 2000)
I unzipped mapplet.zip to C:\MapServer\Project1\java\mapplet\
and followed all the steps of
1) inserted
<SCRIPT LANGUAGE="JavaScript">
function mapplet_apply(name, minx, miny, maxx, maxy, redraw) {
document.mapserv.imgbox.value = minx + " " + miny + " " + maxx + " " +
maxy;
document.mapserv.imgxy.value = minx + " " + miny;
}
function mapplet_error(message) {
alert(message);
}
</SCRIPT>
into the <HEAD></HEAD>
2) changing the form header to <form name="mapserv" method=GET
action="[program]">
3) putting in
<input type="hidden" name="imgxy" value="299.5 299.5">
<input type="hidden" name="imgbox" value="-1 -1 -1 -1">
4) swopping <INPUT NAME="img" TYPE="image" SRC="[img]" width="600"
height="600" border=1> for
<applet codebase="/java/mapplet" code="mapplet.class" width="600"
height="600" name="mapplet" MAYSCRIPT>
<param name="image" value="http://[host][img]">
</applet>
Unfortunately when I tried to open the page, the image was now just a grey
area covering 600x600 and no zoom box could be generated by dragging the
mouse.
I decided to wrap the applet code to
<object width="600" height="600"
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i5
86.cab#Version=1,4,0,0"
standby="Please wait">
<applet codebase="/java/mapplet" code="mapplet.class" width="600"
height="600" name="mapplet" MAYSCRIPT>
<param name="image" value="http://[host][img]">
</applet>
</object>
in order to install JRE1.4 but once it downloaded, it corrupted the browser
(IE6) and asked me to debug the browser.
I then took out the <OBJECT> wrapper, (and the browser worked again) but now
it puts a red 'X' in the map image and says "Loading Java Applet failed...."
Is there anything that I am doing wrong.
Regards
Kevin
------_=_NextPart_001_01C35C24.D0C02FE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>Mapplet not working...</TITLE>
</HEAD>
<BODY>
<BR>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">Hi</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I have tried to implement the zoom-box =
facility of mapplet.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I have a virtual directory (IIS 5.0) =
set up to C:\MapServer\Project1 (on Windows 2000)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I unzipped mapplet.zip to =
C:\MapServer\Project1\java\mapplet\</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">and followed all the steps of</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">1) inserted </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"><SCRIPT =
LANGUAGE=3D"JavaScript"></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> function =
mapplet_apply(name, minx, miny, maxx, maxy, redraw) {</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
document.mapserv.imgbox.value =3D minx + " " + miny + " =
" + maxx + " " + maxy;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
document.mapserv.imgxy.value =3D minx + " " + miny;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> }</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> function =
mapplet_error(message) {</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
alert(message);</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> } </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"></SCRIPT></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">into the =
<HEAD></HEAD></FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">2) changing the form header to =
<form name=3D"mapserv" method=3DGET =
action=3D"[program]"></FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">3) putting in </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"><input type=3D"hidden" =
name=3D"imgxy" value=3D"299.5 299.5"></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"><input type=3D"hidden" =
name=3D"imgbox" value=3D"-1 -1 -1 -1"></FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">4) swopping <INPUT =
NAME=3D"img" TYPE=3D"image" SRC=3D"[img]" =
width=3D"600" height=3D"600" =
border=3D1> for</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> <applet =
codebase=3D"/java/mapplet" code=3D"mapplet.class" =
width=3D"600" height=3D"600" =
name=3D"mapplet" MAYSCRIPT></FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb=
sp; <param name=3D"image" =
value=3D"<A HREF=3D"http://" =
TARGET=3D"_blank">http://</A>[host][img]"> &nbs=
p; </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
</applet></FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">Unfortunately when I tried to open the =
page, the image was now just a grey area covering 600x600 and no zoom =
box could be generated by dragging the mouse.</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I decided to wrap the applet code =
to</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> <object =
width=3D"600" height=3D"600" =
classid=3D"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" =
</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb=
sp; codebase=3D"<A =
HREF=3D"http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-=
i586.cab#Version=3D1,4,0,0" =
TARGET=3D"_blank">http://java.sun.com/products/plugin/autodl/jinstall-1_=
4-windows-i586.cab#Version=3D1,4,0,0</A>" </FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb=
sp; =
standby=3D"Please wait"></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
<applet codebase=3D"/java/mapplet" =
code=3D"mapplet.class" width=3D"600" =
height=3D"600" name=3D"mapplet" =
MAYSCRIPT></FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb=
sp; <param name=3D"image" =
value=3D"<A HREF=3D"http://" =
TARGET=3D"_blank">http://</A>[host][img]"></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
</applet></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
</object></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">in order to install JRE1.4 but once =
it downloaded, it corrupted the browser (IE6) and asked me to debug the =
browser.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I then took out the <OBJECT> =
wrapper, (and the browser worked again) but now it puts a red 'X' in =
the map image and says "Loading Java Applet =
failed...."</FONT></P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">Is there anything that I am doing =
wrong.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Regards</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Kevin</FONT>
</P>
<BR>
</BODY>
</HTML>
------_=_NextPart_001_01C35C24.D0C02FE0--
More information about the MapServer-users
mailing list