[mapserver-users] Question on Validation Blocks

Stephen Woodbridge woodbri at swoodbridge.com
Fri Mar 14 08:25:11 PDT 2014


Hi all,

I'm trying to construct a mapserver URL to fetch an image from php. I'm 
change some of the mapfile parameters in the url. Do I need validation 
blocks for these changes? I assume I do not because I am getting a scale 
bar. I'm only getting a blank image.

http://imaptools.com:8080/cgi-bin/mapserv?mode=map&map.projection=init=epsg:900913&map=/u/data/tiger2013-maps/tiger2013-mc.map&layers=all&imagetype=jpeg&MAPSIZE=541+522&map.scalebar=status+embed+units+feet&SCALEDENOM=3000&MAPXY=-7946835.7326273+5254288.4981293

The projection for the map object is epsg:4326 in the mapfile.
I appear to be getting a png image despite the request for a jpeg?

MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO 
SUPPORTS=SVG_SYMBOLS SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI 
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR 
INPUT=GDAL INPUT=SHAPEFILE

The MAPXY should be equivalent to -71.38764, 42.61986 if I did the 
conversion correctly.

Any idea what I'm doing wrong here?

And it works if I don't change the projection:

http://imaptools.com:8080/cgi-bin/mapserv?mode=map&map=/u/data/tiger2013-maps/tiger2013-mc.map&layers=all&MAP_IMAGETYPE=jpeg&MAPSIZE=541+522&map.scalebar=status+embed+units+feet&SCALEDENOM=3000&MAPXY=-71.38764+42.61986

And it works as WMS:

http://imaptools.com:8080/cgi-bin/mapserv?MAP=%2Fu%2Fdata%2Ftiger2013-maps%2Ftiger2013.map&FORMAT=image%2Fjpeg&MAP_IMAGETYPE=jpeg&LAYERS=Tiger_2013&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-7947363.3342296,5253914.7041195,-7946527.3042538,5254571.5848149&WIDTH=700&HEIGHT=550

Thanks,
   -Steve


More information about the mapserver-users mailing list