Hello:<br><br>Right now I&#39;m trying to build a static map and from there build an interactive map--similar to the MS4W tutorial that came with the installation. I have had issues with Mapserver NOT drawing the polygons associated with my shapefile. <br>
<br>Here are some details of my setup:<br><br><blockquote style="margin:0px 0px 0px 6.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">MS4W - MapServer 4 Windows - version 3.0.6<br>MapServer CGI 6.0.3 at /cgi-bin/mapserv.exe<br>
</blockquote><div><br>My apache configuration to point to the web app folder is fine. Here is the fiile path on my HDD. To connect to the web app webpage I visit: <a href="http://localhost/testpage/">http://localhost/testpage/</a><br>
<blockquote><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Location of mapfile    --&gt;  C:\ms4w\apps\testpage\htdocs<br>Location of shapefile  --&gt; C:\ms4w\apps\testpage\htdocs\data\land_poly.shp<br>
</blockquote></blockquote>When I try to access the image via url (<a href="http://localhost/cgi-bin/mapserv.exe?MAP=/ms4w/apps/testpage/htdocs/kristenmap.map&amp;layer=land&amp;mode=map">http://localhost/cgi-bin/mapserv.exe?MAP=/ms4w/apps/testpage/htdocs/kristenmap.map&amp;layer=land&amp;mode=map</a>), I receive the following error:<br>
<br><div style="margin-left:80px"><b>msDrawMap(): Image handling error. Failed to draw layer named &#39;land&#39;.
msShapefileOpen(): Unable to access file. (/ms4w/apps/testpage/htdocs/land_poly)
msShapefileOpen(): Unable to access file. (/data/land_poly)
</b><br></div><br>That lead me to see what was going on via shp2img, using &quot;-map_debug 3&quot; parameter. shp2img.exe returned to me the following responses:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
C:\ms4w\Apache\cgi-bin&gt;shp2img -m c:\ms4w\apps\testpage\htdocs\kristenm c:\ms4w\apps\testpage\htdocs\test.png -map_debug 3<br>msDrawMap(): rendering using outputformat named png (AGG/PNG).<br>msDrawMap(): WMS/WFS set-up and query, 0.000s<br>
msDrawMap(): Drawing Label Cache, 0.000s<br>msDrawMap() total time: 0.000s<br>msSaveImage(c:\ms4w\apps\testpage\htdocs\test.png) total time: 0.141s<br></blockquote><div><br>It looks like the shp2img is probably running into the same error--not being able to find the shapefile. The PNG file that shp2img creates is just a blue rectangle (blue is the map image background). I am not sure what is going on with the shapefile file paths.  In my map file I indicated &quot;    SHAPEPATH    &quot;/data/&quot;. Here&#39;s the mapfile in its entirety. Hopefully, this is a pretty small fix and that someone can help me out. THANKS!<br>
<br><blockquote style="margin:0px 0px 0px 6.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">#Developer            Kristen K<br>#Date Created        09-29-2012<br>#Date Modified        09-29-2012<br>
#<br>#<br>#<br>#<br>#<br>#This Mapserver Mapfile was created for Kristen&#39;s first map.<br>#In the order of rendering (bottom to top), the map contains the following types of layers:<br>#<br>#        land, shapefile, polygon<br>
#        SFBayCTs, shapefile, polygon<br>#        tl_2012_06_sfbay_censustracts, shapefile, polygon<br>#        sfbayplaces_cities,  shapefile, polygon<br>#        tb_2012_06_SFBayprisecroads, shapefile, line<br>#        bayarea_allwater, shapefile, polygon<br>
#        SF Bay Area Congressional Districts, shapefile, polygon<br>#        sfbaycounties, shapefile, polygon<br>#<br>#<br>#<br>#<br>#------Beginning of the Map Object instructions<br>#<br>MAP<br>    NAME        MapName<br>
    IMAGETYPE    PNG<br>    EXTENT        -122.284468 37.292177 -121.731412 37.619507<br>    SIZE        800 600<br>    IMAGECOLOR    190 232 255<br>    SHAPEPATH    &quot;/data/&quot;<br>    <br>####Output format information. Might not be necessary<br>
    <br>    OUTPUTFORMAT<br>        NAME png<br>        DRIVER &#39;GDAL/PNG&#39;<br>        MIMETYPE &#39;image/png&#39;<br>        IMAGEMODE RGBA<br>        EXTENSION &#39;png&#39;<br>    END    <br>    <br># Beginning of Layer Definitions. Layers listed start from the first (bottom) rendered layer to first (top)<br>
<br>    LAYER<br>        NAME     land<br>        DATA     land_poly<br>        STATUS     OFF    <br>        TYPE     POLYGON    <br>        CLASS<br>           NAME &#39;Land Mass of The Bay Area&#39; <br>           STYLE<br>
             COLOR 255 255 190<br>           END<br>        END<br>    END<br><br>END<br>#------End of the Map Object instructions<br></blockquote></div><blockquote style="margin-left:40px"><br></blockquote><div style="text-align:left">
Thank you in advance!<br><br>Best,<br><br>Kristen<br></div></div>