If you still get an error, you will want to make sure that your MAP has an 
associated END line to close out the MAP block.  It will likely be the last 
line in your map file.

David.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Richard Marsden
Sent: Thursday, November 19, 2009 8:13 AM
To: Smith, Michael ERDC-CRREL-NH; [email protected]
Subject: Re: [mapserver-users] Build Errors; Currently "msLoadMap(): Unknown 
identifier. First token must be MAP, this doesn't look like a mapfile. "

Thanks Michael - that has pointed me in the right direction and I now have a 
working "Hello World".

I had already tried the "MAP" on the first line, but this was giving a parsing 
error on line 1. I assumed this referred to the "MAP" in the map file, but it 
was actually due to a lack of the "magic string" in the template.

Even with those two changes there was another error on "line 1". This was 
actually due to the form field for "map_web_imagepath". Commenting it out 
resulted in a working Hello World template.  Luckily it quoted the problem (the 
directory value), but saying "Line 1" was very misleading for this error.

As a general comment:  With hindsight, these errors make some sense, but it is 
very confusing as to know where (ie. which file) is causing the error. "Line 1" 
is very well, but which file???

Now to convert the application map files. Hopefully I just need to add the 
"MAP"s at the top. I'll check the symbol defs as well.

Cheers,

Richard



On Wed, Nov 18, 2009 at 9:32 PM, Smith, Michael ERDC-CRREL-NH 
<[email protected]<mailto:[email protected]>> wrote:
Richard,

Add a new line to the beginning of your mapfile of just the word MAP.

Eg
MAP

NAME "Hello_World"
SIZE 400 300
IMAGECOLOR 249 245 186
IMAGETYPE png
EXTENT -1.00 -1.00 1.00 1.00
Its part of some security changes in the latest version of Mapserver. You also 
need to add a SYMBOLSET to the top of symbol files and a new magic token to 
templates

See here
http://mapserver.org/development/rfc/ms-rfc-56.html
For more info

Mike


--
Michael Smith
RSGIS Center
US Army Corps of Engineers


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to