[mapserver-dev] MapServer IDENT Error: First token must be MAP, this doesn't look like a mapfile

Christian Canales ccanales29 at yahoo.es
Sat Jun 13 09:41:07 EDT 2009


Thanks guys... now Chameleon is running...

But I have another issue... :( 

Now I'm trying to add a layer with the position of some gps devices... but this data are in a MS SQL Server Database, so, I'm trying to connect it via ODBC in a *.ovf file... but is not working a get an error...

Error : 

---------------

Error rendering map image :
a fatal error ocurred drawing the map.

---------------

My *.OVF file :

---------------

<OGRVRTDataSource>
    <OGRVRTLayer name="cartracks">
        <SrcDataSource>ODBC:usr/pwd at webtrak</SrcDataSource>
        <SrcSQL>SELECT TOP 1 ID FROM Guardar WHERE ID='53377'</SrcSQL>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="Lon" y="Lat"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

---------------



My Mapfile call to the *.OVF file :

---------------

LAYER
    NAME "cartracks"
    STATUS DEFAULT
    TYPE POINT
    CONNECTIONTYPE OGR
    CONNECTION "cjwebtrak-ODBC-connection.ovf"
    DATA "cartracks"
    CLASS
       NAME "cartracks"
           STYLE
               SYMBOL 'star'
               SIZE 15
               COLOR 0 255 0
           END
    END
END

---------------

I need to know what part of the code is wrong?... or... how can I do that in a good way?

Also, I need to solve an issue, example : if Im Christian I can see just my car, so, how can I do that without use the *.OVF file? can I do it in another way?

Thanks...



________________________________
De: Steve Lime <Steve.Lime at dnr.state.mn.us>
Para: Tamas Szekeres <szekerest at gmail.com>; Christian Canales <ccanales29 at yahoo.es>
CC: mapserver-dev at lists.osgeo.org
Enviado: martes, 9 de junio, 2009 15:10:53
Asunto: Re: [mapserver-dev] MapServer IDENT Error: First token must be MAP,this doesn't look like a mapfile

Symbol sets need a leading token for MapServer to consider them valid,
just like mapfiles. Simply 
add the keyword SYMBOLSET to the top of your symbols.sym file and
you'll get past the error
you're seeing. That change won't break with older versions of
MapServer, nor will adding the
leading MAP token in a mapfile.

Looking at your mapfile quickly I think you have a premature END right
after the line "TRANSPARENT FALSE".
It's not necessary. The closing END for the MAP tag is at the end of
the file.

Steve

>>> On 6/9/2009 at 4:04 PM, in message
<182980.99597.qm at web27006.mail.ukl.yahoo.com>, Christian Canales
<ccanales29 at yahoo.es> wrote:
> Hi...
> 
> I was working in some change of my map file...
> 
> This is how it looks now :
> 
> -------------------
> #
> # Start of map file
> #
> # Sample map file for a chameleon app.
> #
> MAP
>   NAME DEMO
>   STATUS ON
>   SIZE 400 300
>   SYMBOLSET ../etc/symbols.sym
>   EXTENT -85.9502 8.0396 -82.5527 11.2199
>   UNITS kilometers
>   SHAPEPATH "../data"
>   IMAGECOLOR 255 255 255
>   FONTSET ../etc/fonts.txt
>   TRANSPARENT FALSE
> END
> #
> # Start of web interface definition
> #
> WEB
>   #MINSCALE 2000000
>   #MAXSCALE 50000000
> #
> # On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the
root 
> # of the drive where the .MAP file resides.
> #
>   IMAGEPATH "/ms4w/tmp/ms_tmp/" 
>   IMAGEURL "/ms_tmp/"
> #  LOG "/tmp/gmap.log"
>   METADATA
>   END
> END
> 
> #
> # Start of reference map
> #
> REFERENCE
>    IMAGE images/costarica_keymap.jpg
>    EXTENT -85.9502 8.0396 -82.5527 11.2199
>    STATUS ON
>   COLOR -1 -1 -1
>   OUTLINECOLOR 255 0 0
>   SIZE 120 90      
> END
> 
> #
> # Start of legend
> #
> LEGEND
>   KEYSIZE 18 12
>   LABEL
>     TYPE BITMAP
>     SIZE MEDIUM
>     COLOR 0 0 89
>   END
>   STATUS ON
> END
> 
> #
> # Start of scalebar
> #
> SCALEBAR
>   IMAGECOLOR 255 255 255
>   LABEL
>     COLOR 0 0 0 
>     SIZE SMALL
>   END
>   SIZE 150 5
>   COLOR 255 255 255
>   BACKGROUNDCOLOR 0 0 0
>   OUTLINECOLOR 0 0 0
>   UNITS kilometers
>   INTERVALS 5
>   STATUS ON
> END
> 
> 
> QUERYMAP
>   STYLE HILITE
>   COLOR 255 0 0
> END
> 
> PROJECTION
>     "init=epsg:4326"
> END
> 
> #
> # Start of layer definitions
> #
> 
> 
> LAYER
>     NAME "paises"
>     TYPE POLYGON
> .
> .
> .
> .
> END
> -------------------
> 
> But now I got this error...
> 
> <!-- MapServer IDENT Error: First token must be SYMBOLSET, this
doesn't look 
> like a symbol file. -->
> 
> I know this is sothing about identifiers order, but I dont know what
is the 
> correcct order...
> 
> If somebody can provide me this part of the map, just as a sample...
> 
> It would be great...
> 
> Or if somebody can chat with me for a minute... it would be
better...
> 
> I just need an explanation in order to solve this issue... I work in
fedora 
> 10, mapserver 5.4.0, and chameleon... but I cannot make any chameleon
sample 
> run...
> 
> Thanks a lot for your answer, idea or tips...
> 
> Have a nice day....
> 
> 
> 
> 
> 
> ________________________________
> De: Tamas Szekeres <szekerest at gmail.com>
> Para: Christian Canales <ccanales29 at yahoo.es>
> CC: mapserver-dev at lists.osgeo.org 
> Enviado: sábado, 6 de junio, 2009 12:37:37
> Asunto: Re: [mapserver-dev] MapServer IDENT Error: First token must
be MAP,  
> this doesn't look like a mapfile
> 
> Hi Christian,
> 
> There have been some security fixes caused breaking changes in the
mapfiles 
> and the symbolset files. Please refer to the announcement mail for
the 
> details:
> 
> 
>
http://lists.osgeo.org/pipermail/mapserver-users/2009-March/060600.html

> 
> 
> Best regards,
> 
> Tamas
> 
> 
> 
> 
> 
> 2009/6/6 Christian Canales <ccanales29 at yahoo.es>
> 
> Hi...
> 
> I have installed on my server MapServer version 5.4.0,
Chameleon_cvs... Im 
> using the FGS environment and installers...
> 
> My server is running Fedora 10...
> 
> Im geting this error :
> 
> 
> <!-- MapServer IDENT Error: First token must be MAP, this doesn't
look like a 
> mapfile. -->
> 
> And the page doesnt display anything...
> 
> Im just testing the Chameleon samples...
> 
> You can test them here :
http://201.198.134.108:8082/chameleon/samples/ 
> 
> Im my Mapserver is here : http://201.198.134.108:8082/cgi-bin/mapserv

> 
> The Chameleon is installed on : /opt/fgs/apps/chameleon-cvs-HEAD/
> 
> Why I cant load the samples?
> 
> Somebody has an answer?
> 
> Thanks...
> 
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev 
> 
> 
>      



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090613/9dc7735a/attachment.html


More information about the mapserver-dev mailing list