[mapserver-users] Fwd: mapserver displaying only the background image as specified in the IMAGECOLOR field in the mapfile. No image generated from the shapefile data.

Annu Anurag i.skidoosh at gmail.com
Mon Mar 19 12:57:42 PDT 2012


I've used mapserver before. Although it was an older version. I was just
trying to set it up again on my computer. I ran the hello_world example
from Bill Kropla's book. It worked fine. But when I'm trying to run the
first.map, there are no errors in the logs. I checked both mapserver error
log and the lighttpd error log. But the image displayed only comprises of
the background color specified in the mapfile. No actual image is generated
from the shapefile data provided. There are no errors either logged so I
can't debug. Its been 5 days now. I have tried many methods to debug but I
have failed always. Attached is mapfile and the corresponding html file.
please help.


Mapfile:

MAP
    NAME "First"
    CONFIG "MS_ERRORFILE" "/var/www/tmp/ms_error.txt"
    CONFIG "PROJ_DEBUG" "ON"
    CONFIG "CPL_DEBUG" "ON"
    SIZE 1024 768
    IMAGECOLOR 111 111 111
    IMAGETYPE jpeg
    SHAPEPATH /var/www/Delhi/
    EXTENT 76.898503 28.410443 77.337521 28.862691
        WEB
            TEMPLATE '/var/www/first.html'
            IMAGEPATH '/var/www/tmp/'
            IMAGEURL '/tmp/'
        END
    LAYER
    NAME "Highways"
    DEBUG 5
    STATUS ON
    TYPE LINE
    DATA asia_southern_asia_india_delhi_highway
    LABELITEM "NAME"
    CLASS
        STYLE
            OUTLINECOLOR 123 0 0
            COLOR 0 255 0
        END
        LABEL
            COLOR 255 0 0
            SIZE SMALL
        END
    END
    END
END
END








Template and initialization html file:

<!-- Mapserver Template -->
<html>
<head><title>MapServer First Map</title></head>
<body>
    <form method=POST action="/mapserv">
        <input type="submit" value="Click Me">
        <input type="hidden" name="map" value="/var/www/mapfiles/first.map">
        <input type="hidden" name="map_web_imagepath" value="">
    </form>
    <IMG SRC="[img]" width=1024 height=768 border=10>
</body>
</html>




The paths seem to be fine as I'm using the same paths I used while running
hello_world and it ran fine. Please help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120320/90d5cd09/attachment.htm>


More information about the MapServer-users mailing list