[Mapserver-users] jBox applet - setimage

Steve McCrone ms57 at streamyx.com
Mon Jan 26 22:25:10 PST 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> </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> </DIV>
<DIV><FONT face=Arial size=2>function setbox_handler(name, minx, miny, maxx, 
maxy, redraw) {<BR>  document.mapserv.imgbox.value = minx + " " + miny 
+ " " + maxx + " " + maxy;<BR>  document.mapserv.imgxy.value = minx + 
" " + miny;<BR>  var url;<BR>  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";<BR>  document.jBox.setimage(url);<BR>  </FONT><FONT 
face=Arial size=2> }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2><applet codebase="/Java/jBox" code="jBox.class" 
width=[mapwidth] height=[mapheight] name="jBox" MAYSCRIPT><BR> <param 
name="image" value="http://[host][img]"><BR> <PARAM NAME="jitter" 
VALUE="10"><BR> <PARAM NAME="thickness" 
VALUE="2"><BR> <PARAM NAME="busyimage" 
VALUE="http://localhost/graphics/making_your_map.gif"></FONT></DIV>
<DIV><FONT face=Arial size=2> </applet></FONT></DIV>
<DIV><FONT face=Arial size=2>============================</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2>Any help on this would be great.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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