[mapserver-users] python wrapper mapscript

John Morgan jmorgan3 at uwf.edu
Fri Apr 28 13:09:34 PDT 2017


Hello,
I am trying to get a basic python mapscript wrapper working on my 
localhost. The following full style URL works 
well:http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/water_quality/water_quality.map&SERVICE=WMS&map=/ms4w/apps/water_quality%20/water_quality.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=wq_stations_pgsql&CRS=EPSG:4326&BBOX=30.00,-87.6,31.00,-87.26&STYLES=&WIDTH=600&HEIGHT=600&FORMAT=image/png 


I am trying to use the following python mapscript as:

import mapscript
req = mapscript.OWSRequest()
req.loadParams()
map = mapscript.mapObj( '../../apps/water_quality/water_quality.map' )
map.OWSDispatch( req )

and then I use the following URL to attempt to use the mapscript: 
http://127.0.0.1:8080/cgi-bin/water_quality?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=wq_stations_pgsql&CRS=EPSG:4326&BBOX=30.00,-87.6,31.00,-87.26&STYLES=&WIDTH=600&HEIGHT=600&FORMAT=image/png 
but it doesn't come back with the expected map, but rather a tiny grey 
square with two white little squares diagonal in it.

Any help would be appreciated. Derek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170428/024abfbe/attachment.html>


More information about the mapserver-users mailing list