[mapserver-users] Problem with using MapServer
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Thu Apr 15 07:19:59 PDT 2010
Hi,
Perhaps because your mapfile is so minimal that the WorldLayer does not have any style? Try addindg some CLASS and STYLE into layer definitions, for example
CLASS
STYLE
COLOR 100 100 255
END
END
It is also a good habit to be caseSensitive, even it is not always necessary. And you do not need CONNECTIONTYPE OGR with shapefiles, but it should not be a problem now.
-Jukka-
Pier Nardin wrote:
Rahkonen
> I modified the .map file as follows:
MAP
NAME World
STATUS ON
SIZE 400 300
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH "C:/OSGeo4W/apps/ramm-demo"
IMAGECOLOR 0 255 255
PROJECTION
"init=epsg:4326"
END
WEB
IMAGEPATH "C:/OSGeo4W/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
END
LAYER
NAME WorldLayer
TYPE POLYGON
DATA "data/world.shp"
CONNECTIONTYPE OGR
STATUS ON
END
END
and I modified the url as follows:
http://127.0.0.1/cgi-bin/mapserv.exe?MAP=C:\OSGeo4W\apps\ramm-demo\ramm.map&SERVICE=wms&VERSION=1.1.1&LAYERS=Worldlayer&REQUEST=GetMap&BBOX=-180,-90,180,90&FORMAT=image/png&WIDTH=800&HEIGHT=600&SRS=EPSG:4326
Now I get no errors but an empty cyan image. Do you know what could be wrong now.
Yours sincerely
Pier Nardin
----- Original Message -----
From: Rahkonen Jukka
To: Pier Nardin ; mapserver-users at lists.osgeo.org
Sent: Thursday, April 15, 2010 1:35 PM
Subject: Re: [mapserver-users] Problem with using MapServer
Hi,
Error seems to be somehow related to symbols. There may be some typo in your symbols.txt file. However, you do not need symbols in the beginning, so try what happens if you comment out the symbols:
#SYMBOLSET ../etc/symbols.txt
-Jukka Rahkonen-
Pier Nardin wrote:
I have created a sample Mapserver .map file with information about my map data as follows:
MAP
NAME World
STATUS ON
SIZE 400 300
SYMBOLSET ../etc/symbols.txt
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH "data"
IMAGECOLOR 0 0 0
WEB
IMAGEPATH "C:/OSGeo4W/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
END
LAYER
NAME WorldLayer
TYPE POLYGON
CONNECTIONTYPE OGR
CONNECTION "data/world.Tab"
STATUS ON
END
END
When I call MapServer with the url:
http://127.0.0.1/cgi-bin/mapserv.exe?MAP=C:\OSGeo4W\apps\ramm-demo\ramm.map&SERVICE=wms&VERSION=1.1.1&LAYERS=WorldLayer&REQUEST=GetMap&BBOX=-180,-90,180,90&FORMAT=image/png&WIDTH=400&HEIGHT=300
I get the following error instead of an image:
getString(): Symbol definition error. Parsing error near ('):(line 16)
Would anyone know were my mistake is?
Pier Nardin
More information about the MapServer-users
mailing list