[mapserver-users] Looking for suggestions...

Williams, Chris D. WILLIC10@mail.northgrum.com
Tue, 27 Aug 2002 07:34:11 -0700


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C24DD6.CF0274E0
Content-Type: text/plain;
	charset="iso-8859-1"

Hello all.  I have been playing around with MapServer for the past week and
having some problems trying to understand how all the parts fit.  Here is
what I am trying to do.

I have a single shape file that contains an outline of the world.  What I am
trying to do is use mapplet and create a query screen that I am get a
decimal lat/lon from.  I have been able to hack apart the itasca demo using
my .map file and my shape file with mapplet.  The problem I am running into
now is the zooming function doesn't seem to work right.  All it wants to do
is pan and not really zoom.  Here are some of the questions I have...

1)  What should I be defining the EXTENT value as?  I currently have it set
to -180.0 -90.0 180.0 90.0.  Is this right?
2)  Do I need to use the projection latlong?  I would think so since I want
to get lat/lon points from the image.  When I added the PROJECTION item to
my .map file, I get an error from the mapserv cgi saying: Projection library
eror: major axis or radius = 0 or not given.
3)  Is there a way to take the pixal position and convert it to a lat long
point?
4)  I have also looked at the Landview on the http://www.dnr.state.mn.us
website.  Would using the jbox class be better than mapplet?  I tried
accessing the webpage today and it seems like none of the maps are working.


I have attached the .map file and the .html files.  The shape file I am
using can be found at http://www.vdstech.com/download/world.zip.

Thanks!
Chris


------_=_NextPart_000_01C24DD6.CF0274E0
Content-Type: text/html;
	name="demo.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="demo.html"

<html>=0A=
<head><title>MapServer Demo Interface</title></head>=0A=
<SCRIPT LANGUAGE=3D"JavaScript">=0A=
  function mapplet_apply(name, minx, miny, maxx, maxy, redraw) {=0A=
    document.mapserv.imgbox.value =3D minx + " " + miny + " " + maxx + =
" " + maxy;=0A=
    document.mapserv.imgxy.value =3D minx + " " + miny;=0A=
  }=0A=
=0A=
  function mapplet_error(message) {=0A=
    alert(message);=0A=
  }=0A=
</SCRIPT>=0A=
=0A=
<body bgcolor=3D#FFFFFF>=0A=
=0A=
<center><h1>MapServer Demo Interface</h1></center>=0A=
<hr>=0A=
<form name=3D"mapserv" method=3DGET action=3D"[program]">=0A=
<input type=3D"hidden" name=3D"imgxy" value=3D"299.5 299.5">=0A=
<input type=3D"hidden" name=3D"imgbox" value=3D"-1 -1 -1 -1">=0A=
=0A=
<center>=0A=
<table border=3D0 cellspacing=3D0 cellpadding=3D4 =
bgcolor=3D"#000000">=0A=
<tr>=0A=
<td valign=3D"top" align=3Dcenter>=0A=
  <table cellpadding=3D"0" cellspacing=3D"0" border=3D"0">=0A=
    <applet codebase=3D"/java" code=3D"mapplet.class" width=3D"600" =
height=3D"400" name=3D"mapplet" MAYSCRIPT>=0A=
      <param name=3D"image" value=3D"http://[host][img]">=0A=
    </applet>=0A=
    <tr>=0A=
      <td>&nbsp;<font size=3D-1 face=3D"arial,helvetica" =
color=3D"#FFFFFF"><b>Powered by MapServer</b></font></td>=0A=
      <td align=3D"right"><img src=3D"[scalebar]"></td>=0A=
    </tr>=0A=
  </table>=0A=
</td>=0A=
<td valign=3D"top" bgcolor=3D#ffffff>=0A=
  <table cellpadding=3D"5" cellspacing=3D"0" border=3D"0" =
bgcolor=3D"#ffffff">=0A=
    <tr><td>=0A=
      <center><input type=3D"submit" =
value=3D"Refresh/Query"></center>=0A=
      <p>=0A=
=0A=
      <input type=3D"radio" name=3D"mode" value=3D"browse" checked> =
<b>Browse map</b><br>=0A=
      <input type=3D"radio" name=3D"mode" value=3D"query"> <b>Query =
feature</b><br>=0A=
      <input type=3D"radio" name=3D"mode" value=3D"nquery"> <b>Query =
multiple features</b>=0A=
=0A=
      <hr>=0A=
=0A=
      <p>=0A=
      <b>Select Layers to Display: </b><br>=0A=
      <select multiple name=3D"layer" size=3D3>=0A=
        <option value=3D"airports" [airports_select]> Airports=0A=
        <option value=3D"cities" [cities_select]> Cities=0A=
        <option value=3D"lakespy2" [lakespy2_select]> Lakes & Rivers=0A=
        <option value=3D"dlgstln2" [dlgstln2_select]> Streams=0A=
        <option value=3D"roads" [roads_select]> Roads=0A=
        <option value=3D"twprgpy3" [twprgpy3_select]> Townships=0A=
      </select>=0A=
=0A=
      <p>=0A=
      Zoom In <input type=3Dradio name=3Dzoomdir value=3D1 =
[zoomdir_1_check]> =0A=
      Pan <input type=3Dradio name=3Dzoomdir value=3D0 =
[zoomdir_0_check]>=0A=
      Zoom Out <input type=3Dradio name=3Dzoomdir value=3D-1 =
[zoomdir_-1_check]>=0A=
      <p>=0A=
      Zoom Size <input type=3Dtext name=3Dzoomsize size=3D4 =
value=3D[zoomsize]>=0A=
      <p>=0A=
    </td></tr></table>=0A=
=0A=
  </td></tr>=0A=
</table>=0A=
</center>=0A=
=0A=
<input type=3D"hidden" name=3D"imgxy" value=3D"299.5 299.5">=0A=
<input type=3D"hidden" name=3D"imgext" value=3D"[mapext]">=0A=
<input type=3D"hidden" name=3D"map" value=3D"[map]">=0A=
<input type=3D"hidden" name=3D"savequery" value=3D"true">=0A=
=0A=
<input type=3D"hidden" name=3D"program" value=3D"[program]">=0A=
<input type=3D"hidden" name=3D"map_web_imagepath" =
value=3D"[map_web_imagepath]">=0A=
<input type=3D"hidden" name=3D"map_web_imageurl" =
value=3D"[map_web_imageurl]">=0A=
=0A=
</form>=0A=
=0A=
<p><hr><p>=0A=
=0A=
  <table border=3D"1">=0A=
    <tr><td>ITEM</td><td>VARIABLE</td></tr>=0A=
    <tr><td>IMG</td><td>[img]</td>=0A=
    <tr><td>Map</td><td>[map]</td>=0A=
    <tr><td>Host</td><td>[host]</td>=0A=
    <tr><td>MapLAT</td><td>[maplat]</td>=0A=
    <tr><td>MapLON</td><td>[maplon]</td>=0A=
  </table>=0A=
=0A=
</body></html>=0A=
=0A=

------_=_NextPart_000_01C24DD6.CF0274E0
Content-Type: application/octet-stream;
	name="demo.map"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="demo.map"

#=0A=
# Start of map file=0A=
#=0A=
NAME DEMO=0A=
STATUS ON=0A=
SIZE 600 400=0A=
EXTENT -180.0 -90.0 180.0 90.0=0A=
SHAPEPATH /san/disk0/willic10/apache-1.3.22/htdocs/test/data=0A=
IMAGECOLOR 255 255 255=0A=
=0A=
# you may need to change this to match your MapServer build=0A=
IMAGETYPE JPEG=0A=
=0A=
PROJECTION=0A=
  "proj=3Dlatlong"=0A=
END=0A=
=0A=
#=0A=
# Start of web interface definition (including WMS enabling =
metadata)=0A=
#=0A=
WEB=0A=
  TEMPLATE demo.html=0A=
  MINSCALE 1000=0A=
  MAXSCALE 1550000=0A=
  IMAGEPATH "set in demo_init.html"=0A=
  IMAGEURL "set in demo_init.html"=0A=
END=0A=
=0A=
QUERYMAP=0A=
  SIZE 200 200=0A=
  STATUS ON=0A=
  STYLE HILITE=0A=
  COLOR 255 0 0=0A=
END=0A=
=0A=
#=0A=
# Start of layer definitions=0A=
#=0A=
=0A=
LAYER=0A=
  NAME "world"=0A=
  TYPE POLYGON=0A=
  STATUS DEFAULT=0A=
  DATA world=0A=
 =0A=
  CLASS=0A=
    OUTLINECOLOR 0 0 0=0A=
    COLOR 220 220 220=0A=
  END=0A=
=0A=
  PROJECTION=0A=
    "proj=3Dlatlong"=0A=
  END=0A=
=0A=
END=0A=
=0A=
END # Map File=0A=

------_=_NextPart_000_01C24DD6.CF0274E0
Content-Type: text/html;
	name="demo_init_chris.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="demo_init_chris.html"

<html>=0A=
<head><title>MapServer Demo Interface</title></head>=0A=
<body bgcolor=3D"#FFFFFF">=0A=
=0A=
<center><h2>MapServer Demo Interface</h2></center>=0A=
<p><hr><p>=0A=
Click on the initialize button to begin.=0A=
=0A=
<form method=3DGET action=3D"/cgi-bin/mapserv">=0A=
=0A=
<input type=3D"hidden" name=3D"map" =
value=3D"/san/disk0/willic10/apache-1.3.22/htdocs/maptest/demo.map">=0A=
<input type=3D"hidden" name=3D"zoomsize" value=3D2>=0A=
=0A=
<input type=3D"hidden" name=3D"program" value=3D"/cgi-bin/mapserv">=0A=
<input type=3D"hidden" name=3D"map_web_imagepath" =
value=3D"/san/disk0/willic10/apache-1.3.22/htdocs/tmp/">=0A=
<input type=3D"hidden" name=3D"layer" value=3D"world">=0A=
<input type=3D"hidden" name=3D"map_web_imageurl" value=3D"/tmp/">=0A=
=0A=
<center><input type=3D"submit" value=3D"Initialize"></center>=0A=
=0A=
</form>=0A=
=0A=
<p><hr><p>=0A=
=0A=
</body></html>=0A=

------_=_NextPart_000_01C24DD6.CF0274E0--