[Mapserver-users] jBox applet - setimage

Steve McCrone ms57 at streamyx.com
Tue Jan 27 01:25:10 EST 2004


This is a multi-part message in MIME format.

--Boundary_(ID_XBepBJAPiDSFkOW+QEbpVg)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

I've been corresponding with Richard Greenwood on this issue, but also thought I would throw it out and see if anyone has had any luck.

I'm on Win2K adn IIS. I am trying to implement the "swap image" function in the jBox applet in order to avoid a full page reload. Here is my javascript function to test to see if it works - 

function setbox_handler(name, minx, miny, maxx, maxy, redraw) {
  document.mapserv.imgbox.value = minx + " " + miny + " " + maxx + " " + maxy;
  document.mapserv.imgxy.value = minx + " " + miny;
  var url;
  url = "/cgi-bin/mapserv?map=C%3A%5CInetpub%5Cwwwroot%5Cdemo.map&layer=lakespy2&layer=dlgstln2&layer=roads&zoomsize=2&program=%2Fcgi-bin%2Fmapserv.exe&map_web_imagepath=C%3A%5Cinetpub%5Cwwwroot%5Ctmp%5C&map_web_imageurl=%2Ftmp%2F";
  document.jBox.setimage(url);
   }

==========================
Here is my applet - 

<applet codebase="/Java/jBox" code="jBox.class" width=[mapwidth] height=[mapheight] name="jBox" MAYSCRIPT>
 <param name="image" value="http://[host][img]">
 <PARAM NAME="jitter" VALUE="10">
 <PARAM NAME="thickness" VALUE="2">
 <PARAM NAME="busyimage" VALUE="http://localhost/graphics/making_your_map.gif">
 </applet>
============================

The busy iamge does appear when I zoom in but then the map image does not get updated. In fact the mapserv.exe does not even generate the gif files and put them in the tmp directory. In the jBox.java code, the setimage() function does call the reset_handler function, but it appears not actualy to get called.

Any help on this would be great.

Steve



--Boundary_(ID_XBepBJAPiDSFkOW+QEbpVg)
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I've been corresponding with Richard Greenwood on 
this issue, but also thought I would throw it out and see if anyone has had any 
luck.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm on Win2K adn IIS. I am trying to implement the 
"swap image" function in the jBox applet in order to avoid a full page reload. 
Here is my javascript function to test to see if it works - </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>function setbox_handler(name, minx, miny, maxx, 
maxy, redraw) {<BR>&nbsp;&nbsp;document.mapserv.imgbox.value = minx + " " + miny 
+ " " + maxx + " " + maxy;<BR>&nbsp;&nbsp;document.mapserv.imgxy.value = minx + 
" " + miny;<BR>&nbsp; var url;<BR>&nbsp;&nbsp;url = 
"/cgi-bin/mapserv?map=C%3A%5CInetpub%5Cwwwroot%5Cdemo.map&amp;layer=lakespy2&amp;layer=dlgstln2&amp;layer=roads&amp;zoomsize=2&amp;program=%2Fcgi-bin%2Fmapserv.exe&amp;map_web_imagepath=C%3A%5Cinetpub%5Cwwwroot%5Ctmp%5C&amp;map_web_imageurl=%2Ftmp%2F";<BR>&nbsp;&nbsp;document.jBox.setimage(url);<BR>&nbsp;&nbsp;</FONT><FONT 
face=Arial size=2>&nbsp;}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>==========================</FONT></DIV>
<DIV><FONT face=Arial size=2>Here is my applet - </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&lt;applet codebase="/Java/jBox" code="jBox.class" 
width=[mapwidth] height=[mapheight] name="jBox" MAYSCRIPT&gt;<BR>&nbsp;&lt;param 
name="image" value="http://[host][img]"&gt;<BR>&nbsp;&lt;PARAM NAME="jitter" 
VALUE="10"&gt;<BR>&nbsp;&lt;PARAM NAME="thickness" 
VALUE="2"&gt;<BR>&nbsp;&lt;PARAM NAME="busyimage" 
VALUE="http://localhost/graphics/making_your_map.gif"&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&lt;/applet&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>============================</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The busy iamge does appear when I zoom in but then 
the map image does not get updated. In fact the mapserv.exe does not even 
generate the gif files and put them in the tmp directory. In the jBox.java code, 
the setimage() function does call the reset_handler function, but it appears not 
actualy to get called.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any help on this would be great.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Steve<BR><BR></DIV></FONT></BODY></HTML>

--Boundary_(ID_XBepBJAPiDSFkOW+QEbpVg)--



More information about the mapserver-users mailing list