[mapserver-users] Mapplet

Jeff Berry jeffb at erlandsen.com
Wed May 8 20:05:17 EDT 2002


I've installed the Mapplet java class. I have managed to get it to the point
where it will draw a box on the map, but that's about it.  It refreshes the
area of interest box but does not update or zoom to the new extent on the
map.  I'm new to java applets and am not sure how to proceed.  Obviously, I
want to link it to the zoom function, but I've either missed a step or just
set it up incorrectly.  Below is my template html.  Any help would be
greatly appreciated.

-Jeff

<html>
<script><!--
function mapplet_apply(name, minx, miny, maxx, maxy, redraw) {
  document.mapserv.imgbox.value = minx + " " + miny + " " + maxx + " " +
maxy;
  document.mapserv.imgxy.value = minx + " " + miny;
}

function mapplet_error(message) {
  alert(message);
}

//--></script>
<head><title>Chelan County Parcels</title></head>
<body bgcolor=#ffffff background="../../../images/lightblue_pixel.GIF">

<center><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"
color="white">Chelan County Parcel Viewer</font></c
enter>
<hr>
<form method=GET action="[program]" name="mapserv">

<center>
<table border=0 cellspacing=0 cellpadding=4 bgcolor="#000000">
<tr>
<td valign="top" align=center>
  <table cellpadding="0" cellspacing="0" border="0">
    <tr><td colspan="2"><applet
codebase="http://www.erlandsengis.com/java/mapplet" code="mapplet.class"
width="600" height="600" name="mapplet" MAYSCRIPT>
    <param name="image" value="http://[host][img]">
    <param name="jitter" value="10">
    <param name="thickness" value="2">
    <param name="color" value="yellow">
    </applet>
    </td></tr>
    <tr>
      <td>&nbsp;<font size=-1 face="arial,helvetica"
color="#FFFFFF"><b>Erlandsen & Associates Parcel Viewer</b></font></td>
      <td align="right"><img src="[scalebar]"></td>
    </tr>
  </table>
</td>
<td valign="top" background="../../../images/lightblue_pixel.GIF">
  <table cellpadding="5" cellspacing="0" border="0"
background="../../../images/lightblue_pixel.GIF">
    <tr><td>
      <center><input type="submit" value="Refresh/Query"></center>
      <p>

      <input type="radio" name="mode" value="browse" checked> <font size="2"
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regula
r" color="white"><b>Browse map</b><br>
      <input type="radio" name="mode" value="query"> <b>Query
feature</b><br>
      <input type="radio" name="mode" value="nquery"> <b>Query multiple
features</b>

      <hr>

      <p>
      <b>Select Layers to Display/Query: </b><br>
      <br>
        <b> </b>
      <input type="checkbox" value="parcels" name="layer" tabindex="2"
[parcels_check]> Parcels<br>
        <input type="checkbox" value="plss" name="layer" tabindex="3"
[plss_check]> PLSS&nbsp;Sections<br>
        <input type="checkbox" value="quads" name="layer" tabindex="4"
[quads_check]> Quad Boundaries<br>
        <input type="checkbox" value="topos" name="layer" tabindex="5"
[topos_check]> Topos<br>

      <p>
      Zoom In <input type=radio name=zoomdir value=1 [zoomdir_1_check]>
      Pan <input type=radio name=zoomdir value=0 [zoomdir_0_check]>
      Zoom Out <input type=radio name=zoomdir value=-1 [zoomdir_-1_check]>
      <p>
      Zoom Size <input type=text name=zoomsize size=4 value=[zoomsize]>
      <p>

      <font size=+1><b>Legend</b></font><br><hr>
      <img src="[legend]"><hr>

      <p>
      <p>
      <b>Locator Map</b>
      <center><INPUT NAME="ref" TYPE="image" SRC="[ref]"
border="0"></center>
    </td></tr></table>

  </td></tr>
</table>
</center>

<input type="hidden" name="imgxy" value="299.5 299.5">
<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="program" value="[program]">
<input type="hidden" name="map_web_imagepath" value="[map_web_imagepath]">
<input type="hidden" name="map_web_imageurl" value="[map_web_imageurl]">
<input type="hidden" name="imgbox" value="-1 -1 -1 -1">

</form>
</font>
<p><hr><p>

</body></html>




More information about the mapserver-users mailing list