[mapserver-users] Map rendering correctly with shp2img but blank when using WMS

Seth G sethg at geographika.co.uk
Mon Feb 12 15:32:29 PST 2018


Hi,

Syntax looks fine to me. 
Could there be an issue accessing the Mapfile using the web
service account?Can you run a profiler on the database to see if it is being hit at all?
The results of this would reduce the list of possible issues.
Regards,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, Feb 12, 2018, at 5:05 PM, Pablo Sanfilippo wrote:
> This is the command I'm using that renders fine:
> shp2img \ -m /maps/config.map \ -o /sources/testb.png \ -e -
> 118.41347694396971 33.919930516263086 -118.40274810791016
> 33.92787160756615 \ -s 500 500 \ -l mylayer \ -all_debug 5 \> And this WMS request renders a transparent image:
> 
> http://localhost:8080/?map=/maps/config.map&SERVICE=WMS&VERSION=1.1.1%20&REQUEST=GetMap&LAYERS=mylayer&STYLES=&SRS=EPSG:4326&BBOX=-118.41347694396971,33.919930516263086,-118.40274810791016,33.92787160756615&WIDTH=500&HEIGHT=500&FORMAT=image/png> 
> This is my mapfile:
> 
> # A valid mapfile used for testing
> MAP
>   NAME valid
>   STATUS ON
>   PROJECTION
>     "init=epsg:4326"
>   END
> 
>   # IMAGECOLOR 0 0 0
>   TRANSPARENT ON
> 
>   WEB
>     METADATA
>       "wms_title"           "Slingshot WMS Server"
>       "wms_onlineresource"  "http://localhost:8080/?map=config.map&"
>       "wms_enable_request"  "GetCapabilities GetMap GetFeatureInfo"
>       "wms_srs"             "EPSG:4326 EPSG:3857"
>   END
>   END
> 
>   LAYER
>     NAME "myindex"
>     STATUS ON
>     TYPE POLYGON
>     CONNECTIONTYPE POSTGIS
>     CONNECTION "mypostgisconnection"
>     DATA "geometry from (select i.geometry, i.id, '/sources/' ||
>     i.path as location from images_image) as myindex using unique id">     CLASS
>       STYLE
>         OUTLINECOLOR 0 0 0
>         COLOR 0 255 0
>         WIDTH 1.0
>         ANTIALIAS true
>       END
>     END
>   END
> 
>   LAYER
>     NAME "mylayer"
>     STATUS ON
>     TILEINDEX "myindex"
>     TILEITEM "location"
>     PROCESSING "SCALE=AUTO"
>     TYPE RASTER
>     PROJECTION
>       AUTO
>     END
>     METADATA
>       "wms_title"           "My Imagery"
>     END
>   END
> 
> END
> 
> I'm using MapServer 7.0.1
> 
> Thanks!
> _________________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180213/1fdd74a3/attachment.html>


More information about the mapserver-users mailing list