[MS4W-Users] Mapserver Hello World

Jeff McKenna jmckenna at gatewaygeomatics.com
Sat Mar 6 20:35:38 EST 2010


Marcelo Miranda wrote:
> I have an error below, someone can help me?
> 
> ERROR
> loadWeb(): Unknown identifier. Parsing error near (c):(line 1)
> 
> MAP
> # This is our "Hello World" mapfile
> NAME "Hello World"
> SIZE 400 300
> IMAGECOLOR 249 245 186
> IMAGETYPE png
> EXTENT -1.0 -1.0 1.0 1.0
> WEB
>      TEMPLATE "http://localhost/hello.html"
>      IMAGEPATH "c:/ms4w/tmp/ms_tmp/"
>      IMAGEURL "/tmp/"
> END
> LAYER					 
>      STATUS default
>      TYPE point
>      FEATURE
>           POINTS  0.00 0.00 END
>           TEXT "Hello World"
>      END # end feature
>      CLASS
>           STYLE
>                COLOR 255 0 0
>           END
>           LABEL
>                TYPE bitmap
>           END
>      END
> END
> END
> 
> TEMPLATE
> <html>
> <head> <title>MapServer Hello World</title></head>
> <body>
>     <form method=POST action="/cgi-bin/mapserv.exe ">
>         <input type="submit" value="Click Me">
>         <input type="hidden" name="map"
> value="c:/ms4w/apps/mapfiles/hello.map">
>         <input type="hidden" name="map_web_imagepath" 
> 	        value="c:/ms4w/tmp/ms_tmp/">
>     </form>
>     <IMG SRC="[img]" width=400 height=300 border=0>
> </body>
> </html>
> 

There were changes in MapServer 5.0 affecting the way to pass CGI
variables.  If you do a search of the MapServer email list archives you 
will see that
this question has been answered before, here is a response:
http://n2.nabble.com/msLoadMap()-Unable-to-access-file-td1971168.html#a17286109

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




More information about the MS4W-Users mailing list