[mapguide-users] MapGuide Map Contents to Image File

Nichols, Mark A. markn at spicergroup.com
Wed Mar 31 10:03:09 EDT 2010


I'm using Mapguide 2.0 with PHP 5/Apache 2.  I am using PDFLib to create PDF maps from MapGuide.  I'm having a hard time on this particular server getting the mapguide image rendered on the screen converted to a an image.  I've done it in the past using the GD library.  Below I have an example of what works with a regular image and then how it doesn't work with the mapguide URL.  Is there a different way to get the image rather than using the GD library (I'm using Apache/PHP).  I have no issue with working with the PDF's but the issue is getting the mapguide image.
 
This works....
$theURL = "http://192.168.2.106/mapguide/prints/scale600.png";
$gif = imagecreatefrompng($theURL);

This does not work....
$theURL = "http://192.168.2.106/mapguide/mapagent/mapagent.fcgi?OPERATION=GETMAPIMAGE&SETVIEWSCALE=$scale&SETDISPLAYDPI=$dpi&SETDISPLAYHEIGHT=$imgheight&SETDISPLAYWIDTH=$imgwidth&FORMAT=PNG&VERSION=1.0.0&SELECTION=&MAPNAME=Default&SESSION=$session&CLIENTAGENT=Ajax%20Viewer";
$gif = imagecreatefrompng($theURL);

Thank you.
 
Mark Nichols
markn at spicergroup.com


More information about the mapguide-users mailing list