[Mapserver-users] JBox - Getting started - Small problem

Richard Greenwood rich at greenwoodmap.com
Sun Jan 18 17:06:43 EST 2004


Steve McCrone wrote:

>Hi,
>
>I'm trying to implement the JBox with the Demo.html sample. I've followed
>the instructions contained in -
>http://mapserver.gis.umn.edu/doc40/jbox-howto.html
>
>The gif is generated but does not appear, nor does the rubber-band zoom
>rectangle does not appear.
>
>I beleive it is not finging the JBox.class. It looks dead easy, but!!! -
>here's what I've added-
>
>function setbox_handler(name, minx, miny, maxx, maxy, redraw) {
>document.mapserv.imgbox.value = minx + " " + miny + " " + maxx + " " + maxy;
>document.mapserv.imgxy.value = minx + " " + miny;
>}
>===============
><form method=GET name = "mapserv" action="/cgi-bin/mapserv.exe">
>===============
><applet codebase="Java/JBox" code="jBox.class" width=[mapwidth]
>height=[mapheight] name="jBox" MAYSCRIPT>
><param name="image" value="http://[host][img]">
></applet>
>==============
><input type="hidden" name="imgbox" value="-1 -1 -1 -1">
>==============
>
>Note: the jbox class etc is in the directory wwwroot/Java/JBox, which is the
>main localhost directory. The demo_init.html and demo.html are also in the
>wwwroot directory.
>  
>
You might try codebase="/Java/JBox" (preceding slash added). I can not 
remember if the codebase is relative to the .map file or the 
mapserv.exe, but in either case, setting the path relative to the host 
root would be correct given the path to jBox.class that you noted above.

Also look at the source of the page and make sure http://[host][img] has 
been correctly processed. It should look something like 
http://localhost/tmp/xxxxxxxxxxxx.gif

Rich

-- 
Richard Greenwood
www.greenwoodmap.com





More information about the mapserver-users mailing list