Hello,<br><br>I have been using MapServer for about 18 months to serve the base maps for EcoMapCostaRica.com, and more recently, <a href="http://equal-area-maps.com">equal-area-maps.com</a>.<br>Originally, I had a lot of trouble building it for the FreeBSD environment used by my web host (Pair Networks), but a fellow user (Jason Birch) was able to help. I believe this was MapServer 5.2, but could be wrong.<br>
<br>In the past week, Pair upgraded the version of FreeBSD/etc on my server, and not-unexpectedly this broke MapServer.<br>I've had more success than last time, and I've managed to re-build MapServer. My build was based on Jason's original instructions, but library & MapServer versions were bumped to their latest (5.4.2 for MapServer). I also configured GDAL to use the internal implementations of libtiff and GeoTIFF, and I skipped PHP (I don't use PHP MapScript).<br>
<br>Although it built, the two map applications (both based on OpenLayers) are displaying white tiles instead of their correct MapServer-rendered maps. I've tried a few things, including trying to use 24 bit AGG-derived images (interestingly this results in slower display, implying that some of MapServer's rendering is working? just it isn't displaying anything?).<br>
<br>I wasn't making much progress getting these completed applications to work, so I thought I would go 'back to basics' and try to get a simple Hello World to work. I've just re-entered the Hello World from Bill Kropla's "Beginning MapServer" book. The resulting hello.map and hello.html are included below. <br>
Needless to say, these are not working. I am getting the strange error of:<br><br>msLoadMap(): Unknown identifier. First token must be MAP, this doesn't look like a mapfile.
<br><br>What is wrong? I can't see anything wrong in my MAP file, unless something fundamental has changed in the past couple of versions? Inserting a new line at the beginning with a "MAP" simply results in a parsing error on line 1!<br>
Is there something to look for in my build process? I can post the MapServer config if that will help.<br><br>Here is my Hello World HTML: ( <a href="http://www.winwaed.com/playpen/hello.html">http://www.winwaed.com/playpen/hello.html</a> )<br>
<br><html><br><head><title>MapServer Hello World</title></head><br><body><br><form method="POST" action="/playpen/mapserv.cgi"><br> <input type="submit" value="Click Me"><br>
<input type="hidden" name="MAP" value="/myhomedir/playpen/hello.map"><br> <input type="hidden" name="map_web_imagepath" value="/myhomedir/playpen/tmp/"><br>
</form><br><img src="[img]" width=400 height=300 border=0><br></body><br></html><br><br><br>And here is my hello.map file: ( /playpen/hello.map )<br><br>NAME "Hello_World"<br>SIZE 400 300<br>
IMAGECOLOR 249 245 186<br>IMAGETYPE png<br>EXTENT -1.00 -1.00 1.00 1.00<br>WEB<br> TEMPLATE "/myhomedir/playpen/hello.html"<br> IMAGEPATH "/myhomedir/playpen/tmp/"<br> IMAGEURL "/playpen/tmp/"<br>
END<br>LAYER<br> STATUS default<br> TYPE point<br> FEATURE<br> POINTS 0.0 0.0 END<br> TEXT "Hello World"<br> END<br> CLASS<br> STYLE<br> COLOR 255 0 0<br> END<br> LABEL<br> TYPE bitmap<br>
END<br> END<br>END<br>END<br><br><br><br>Fundamentally I am trying to get MapServer working on a Pair server installation (FreeBSD, etc), serving WMS tiles to OpenLayers "MapServer" layer objects. Source data are Shape files and GeoTIFF tiles. Image delivery is currently in the form of PNG, which is preferred over JPEG (too lossy) and GIF (okay for the shapefiles, but not the GeoTIFF-derived imagery).<br>
<br><br>Hopefully someone has some clues as to what is wrong with the Hello World?<br>If I can get this to work, it should give me some clues (or even fix) the main problems I'm having with my applications.<br><br><br>
Cheers,<br><br>Richard Marsden<br><a href="http://www.winwaed.com">http://www.winwaed.com</a><br><br>