jbox - map image problem

Cola hotarukoi at HOTMAIL.COM
Sun Nov 26 19:36:30 EST 2006


Hi,

I'm new to Mapserver as well. And I've the same problem as Neelima.

I also follow the instruction of documentation. I couldnt view my map on the
brower when i set my image type = png and using jboxpng.class and
jBoxPNG.jar,png.jar. But when I switch it to gif, and using jbox.class and
jbox.jar, i can view the map.

Although I can view my map in the browser now. I still couldnt use the
rubber band function, i.e. zoom in.
I can draw the red box on my map, however  the map wont zoom in after I draw
the red box, error are also shown.

Anyone had the same problem and can help me?


Thanks a lot in advanced!!


Cheers,
Song



Neelima Emmani wrote:
> 
> 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>
>                Browse map<br>
>       <input type="radio" name="mode" value="query"
>               onClick="document.jBoxPNG.boxoff();"> Query
> feature<br>
>       <input type="radio" name="mode" value="nquery"
>            onClick="document.jBoxPNG.boxon();"> Query multiple
> features
>            <hr>
> <hr>
>       <p>
>    <font size=+1>Reference Map</font><br><hr>
>       <center><INPUT NAME="ref" TYPE="image" SRC="[ref]" border="0">
>       </center><hr>
>    <p>
>       <font size=+1>Legend</font><br><hr> [legend] <hr>
>    <p>
> 
>    Map Controls<br>
>    <table>
>    <tr>
>    <td><input type=radio name=zoomdir value=1
> [zoomdir_1_check]></td>
>    <td> C:\Program Files\Apache Group\Apache2
\htdocs\VEPS\WEB INTERFACE\Button_Zoom_pos.gif </td>
>    </tr>
>    <tr>
>    <td><input type=radio name=zoomdir value=0
> onClick='document.jBoxPNG.dragon();' [zoomdir_0_check]></td>
>    <td> C:\Program Files\Apache Group\Apache2
\htdocs\VEPS\WEB INTERFACE\Button_Hand.gif </td>
>    </tr>
>    <tr>
>    <td><input type=radio name=zoomdir value=-1
> onClick='document.jBoxPNG.boxoff();' [zoomdir_-1_check]></td>
>    <td> C:\Program Files\Apache Group\Apache2
\htdocs\VEPS\WEB INTERFACE\Button_Zoom_neg.jpg </td>
>    </tr>
>    </table>
> 
>    <!--<p>
>    Zoom Size <input type=text name=zoomsize size=4
> value=2>-->
>    <hr>
>    <p>
> 
>       Select Layers to Display: <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>
> 
> 

-- 
View this message in context: http://www.nabble.com/jbox---map-image-problem-tf1049856.html#a7553174
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list