[mapserver-users] Question on Validation Blocks

Humberto Cereser Ibanez humberto at pastoraldacrianca.org.br
Fri Mar 14 11:08:45 PDT 2014


Hi Steve,

Em Sex, 2014-03-14 às 11:25 -0400, Stephen Woodbridge escreveu:
> 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.
> 
I think your assumption is right, because I changed the map.projection
and MAPXY parameter and the URL worked

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

> 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?
May be nothing wrong, but the lack of projection in each layer of your
WMS mapfile. Just a guess.
> 
> 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
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

Best regards,

Humberto Cereser Ibanez




More information about the MapServer-users mailing list