I've been reading through Tyler Mitchel's Web Mapping Illustrated and also downloaded a copy of the itasca sample from maptools.org. Then created some shapefiles in OpenEV and modified the itasca.map file to include those layers and removed all the other layers, but it seems that there's no effect - a blank display I've also tried to play with the outline color, but nothing. Find the map file below: find the map file here: http://kompisen.se/xqSjGadQsN

Update: forgot to specify some details, sorry.

OS: Ubuntu Mapserver: OpenEV: 1.8 installed via FWTools 2.0.6

  • 1
    what does shp2img tell you about it? It's easier to test with than the mapserver cgi.
    – relet
    Nov 25 '10 at 18:52
  • There seems to be a couple of typos in the map-file. In the postgis layer, I doubt you have a host named localhoaast ;-), and the database name looks a little suspicious too. Also, does your main template load at all. The name of it looks strange: "set in index.html" /Nicklas Nov 25 '10 at 20:43
  • @Niicklas: the postgis database name was set just to test the connection, it's been modified now but still nothing. Nov 26 '10 at 11:04

"user=bsuvar dbname=gsis_test host=localhoaast"

... looks wrong


Are you sure about the extents?

EXTENT -180 -90 180 90

Which CRS is your data in?

  • 1
    that was purposefully modified to test if the connection goes through, but not a change. Nov 25 '10 at 18:40
  • 1
    Yes, I think underdarks point here might be the problem. If you have a metric CRS your specified extent will be quite a small area 360 * 180 meters, probably far away from the extent of your map. Nov 25 '10 at 21:14

I would suggest enabling debugging to a log file, and checking if you get any errors there.

in your mapfile you can add:

CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"

Apart from that it would be useful to give more info on which platform you are on (operating system/mapserver version)

  • good point, but it seems that it doesn't follow the path I'm indicating and keeps giving me: General error message. Failed to open MS_ERRORFILE path_to_file_log Nov 26 '10 at 11:25
  • Make sure that the path actually exists and is writeable by the user under which the server is running. (You could use /tmp/something.txt to start with, but than definitely fix it)
    – johanvdw
    Nov 26 '10 at 19:31

I am not familiar with the scripting and how a map file references your data, try to see if there is somewhere where it is required of you to modify the extent (near the top of the script) and/or projection that the data is intended to be shown in.

I am suggesting this because maybe the layers you removed from the sample only displayed because somewhere there is a configuration (in the scripting) that tells the server what the spatial relationship is of the data and now your new layers either fall outside this pre-defined extent or are incompatible with the currently applied coordinate system.

  • very good point SaultDon! Modified the extent values and it seems that was the issue! Nov 26 '10 at 13:09

Mapserver displays the layers in sequence and, thus, if a layer of higher importance is below a raster image, you can be spinning all day long. Values of the extent are VERY important as mentioned in the other answers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.