[mapserver-users] Map rendering correctly with shp2img but blank when using WMS
Pablo Sanfilippo
sanfilippopablo at gmail.com
Mon Feb 12 08:05:19 PST 2018
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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180212/45df900f/attachment.htm>
More information about the MapServer-users
mailing list