jbox - map image problem

Neelima Emmani neelima_umn at YAHOO.CO.IN
Thu Feb 2 16:28:40 EST 2006


Hi,
I am working with jbox and followed all the instructions given in the
documnetation. Now my problem is i am not able to visualize the map image
in the browser/web interface and a red cross is given in the topleft
corner of the image box.But, i can see that the map image is stored in the
temporary folder ms_tmp which is under htdocs folder of apache webserver.
And also if i give the normal html statement for the map it is viewed in
the browser, so i feel that there is some problem with applet code, but
unable to find where it is. so, please can any one help me out.It will be
very very helpful fo rme , if any one can find a solution for this.
thanking u inadvance,

here is the template code -
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
   <title>Project</title>

<SCRIPT LANGUAGE="JavaScript">

    function setbox_handler(name, minx, miny, maxx, maxy) {
document.mapserv.imgbox.value = minx + " " + miny + " " + maxx + " " +
maxy;
document.mapserv.imgxy.value = minx + " " + miny;

 // Additional code can go here prior to the form submit, below.
// For example, form validation code.
document.mapserv.submit();
        }
     function seterror_handler(message) {
           alert(message);
        }
     function reset_handler(name, minx, miny, maxx, maxy) {
        }
 </SCRIPT>

</head>
<body bgcolor=#FFFFFF>
 <center><h1>Example</h1></center>
 <hr>
  <form name="mapserv" method=GET action="/cgi-bin/mapserv.exe">
  <!--<FORM NAME="mapserv" ACTION="this.submit()">-->

 <center>

 <table border=0 cellspacing=0 cellpadding=4 bgcolor="#ffffff">

 <tr>
  <td valign="top" bgcolor=#ffffff>
    <table cellpadding="5" cellspacing="0" border="0"
bgcolor="#ffffff">
     <tr><td>
      <center><input type="submit" value="Refresh"></center>
      <hr>
      <p>
      <input type="radio" name="mode" value="browse" checked>
               <b>Browse map</b><br>
      <input type="radio" name="mode" value="query"
              onClick="document.jBoxPNG.boxoff();"> <b>Query
feature</b><br>
      <input type="radio" name="mode" value="nquery"
           onClick="document.jBoxPNG.boxon();"> <b>Query multiple
features</b>
           <hr>
<hr>
      <p>
   <font size=+1><b>Reference Map</b></font><br><hr>
      <center><INPUT NAME="ref" TYPE="image" SRC="[ref]" border="0">
      </center><hr>
   <p>
      <font size=+1><b>Legend</b></font><br><hr><img src="[legend]"><hr>
   <p>

   <b>Map Controls</b><br>
   <table>
   <tr>
   <td><input type=radio name=zoomdir value=1
[zoomdir_1_check]></td>
   <td><img src="C:\Program Files\Apache Group\Apache2
\htdocs\VEPS\WEB INTERFACE\Button_Zoom_pos.gif" alt=""></td>
   </tr>
   <tr>
   <td><input type=radio name=zoomdir value=0
onClick='document.jBoxPNG.dragon();' [zoomdir_0_check]></td>
   <td><img src="C:\Program Files\Apache Group\Apache2
\htdocs\VEPS\WEB INTERFACE\Button_Hand.gif" alt=""></td>
   </tr>
   <tr>
   <td><input type=radio name=zoomdir value=-1
onClick='document.jBoxPNG.boxoff();' [zoomdir_-1_check]></td>
   <td><img src="C:\Program Files\Apache Group\Apache2
\htdocs\VEPS\WEB INTERFACE\Button_Zoom_neg.jpg" alt=""></td>
   </tr>
   </table>

   <!--<p>
   Zoom Size <input type=text name=zoomsize size=4
value=2>-->
   <hr>
   <p>

      <b>Select Layers to Display: </b><br>
      <select NAME="Layers" SIZE=5 MULTIPLE>
   <option value=Adressverzeichnis
[Adressverzeichnis_select]>Adressverzeichnis
   </select>
    </td>
  </tr>
  </table>

  </td>
 <td valign="center" align=center>

    <table cellpadding="0" cellspacing="0" border="2">


    <tr>
            <td colspan="2">
           <applet
                    codebase="C:\Program Files\Apache
Group\Apache2\htdocs\VEPS\Java\jBox"
                    code="jBoxPNG.class"
                    archive="jBoxPNG.jar,png.jar"
                    width="[mapwidth]"
                    height="[mapheight]"
                    name="jBox"
                    MAYSCRIPT>
                <param name="image" value="http://[host]
[img]">
                      <PARAM NAME="jitter" VALUE="1">
                <PARAM NAME="color"  VALUE="black">
       <PARAM NAME="thickness"
VALUE="2">
       <param name="verbose"
value="true">
                    </applet>
             </td>
    </tr>

         <!--<tr><td colspan="2"><INPUT NAME="img"
TYPE="image" SRC="[img]" width=600 height=700 border=0></td></tr>-->
     </table>
  </td>
</tr>
</table>
</center>


<input type="hidden" name="imgxy" value="[center]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="imgbox" value="-1 -1 -1 -1">
<input type="hidden" name="program" value="/cgi-bin/mapserv.exe">
</form>
</body>
</html>



More information about the mapserver-users mailing list