[mapserver-users] Build Errors; Currently "msLoadMap(): Unknown identifier. First token must be MAP, this doesn't look like a mapfile. "

Richard Marsden winwaed at gmail.com
Thu Nov 19 09:13:07 EST 2009


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 <
michael.smith at usace.army.mil> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091119/252ab7c2/attachment.html


More information about the mapserver-users mailing list