PHP/Mapscript: send map to browser directly

Gregor Mosheh gregor at HOSTGIS.COM
Fri Jan 11 07:53:41 PST 2008


Wally Maddoc wrote:
> The usual way to send a map to the browser is to store the image file (e.g
> mymap.png) on the server and invoke the URL to this file in the HTML-Code. 

If you want to output the image directly, use $map->image->saveImage() 
with no filename. That sends it to stdout. Used with header() you can 
have the image downloaded or displayed or whatever.

http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/classes/imageobj

-- 
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the MapServer-users mailing list