[mapguide-users] Generate Simple Static Map

Denis Lalonde denlalonde at gmail.com
Wed May 15 05:47:17 PDT 2013


There will eventually be more to it, but I just want to generate a static
map image. I based the little PHP code I have so far on some of the code
found in quickplotgeneratepicture.php. However, I seem to be missing
something (simple?) when it comes to actually opening the map object:

Code snippet:

*$username="Anonymous";*
*$password="";*
*
*
*$userInfo = new MgUserInformation();
*
*$userInfo->SetMgUsernamePassword($username, $password);*
*$siteConnection = new MgSiteConnection();*
*$siteConnection->Open($userInfo);*
* *
*$resourceService  = $siteConnection->CreateService(0);*
*$renderingService = $siteConnection->CreateService(4);*
*
*
*$mapName="MyMap"; //yes, it exists*
*
*
*$map = new MgMap();*
*$map->Open($resourceService, $mapName);   //=====DOESN''T GET PAST HERE====
*
*
*
It's giving me the following error: "*PHP Fatal error: Uncaught exception
mginvalidargumentexception...." but as far as I can tell, my args are ok.
Ideas?*
*
*
*Thanks,*
*Denis*
*
*
*MGOS2.5, IIS, Win Server 2008 64bit*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20130515/1075a264/attachment.html>


More information about the mapguide-users mailing list