<div dir="ltr">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:<div>
<br></div><div>Code snippet:<br><div><br></div><div><div><i><font color="#0000ff">$username="Anonymous";</font></i></div><div><i><font color="#0000ff">$password="";</font></i></div><div><i><font color="#0000ff"><br>
</font></i></div><div><i><font color="#0000ff">$userInfo = new MgUserInformation();<br></font></i></div><div><i><font color="#0000ff">$userInfo->SetMgUsernamePassword($username, $password);</font></i><br></div><div><i><font color="#0000ff">$siteConnection = new MgSiteConnection();</font></i></div>
<div><i><font color="#0000ff">$siteConnection->Open($userInfo);</font></i></div><div><span class="" style="white-space:pre"><i><font color="#0000ff">            </font></i></span></div><div><i><font color="#0000ff">$resourceService  = $siteConnection->CreateService(0);</font></i><br>
</div><div><i><font color="#0000ff">$renderingService = $siteConnection->CreateService(4);</font></i></div><div><i><font color="#0000ff"><br></font></i></div><div><i><font color="#0000ff">$mapName="MyMap"<span style="white-space:pre">; //yes, it exists</span></font></i></div>
<div><i><font color="#0000ff"><br></font></i></div><div><i><font color="#0000ff">$map = new MgMap();</font></i></div><div><i><font color="#0000ff">$map->Open($resourceService, $mapName);   //</font><b><font color="#ff0000">=====DOESN''T GET PAST HERE====</font></b></i></div>
</div></div><div><i><b><font color="#ff0000"><br></font></b></i></div><div style>It's giving me the following error: "<i>PHP Fatal error: Uncaught exception mginvalidargumentexception...." but as far as I can tell, my args are ok. Ideas?</i><br>
</div><div style><i><br></i></div><div style><i>Thanks,</i></div><div style><i>Denis</i></div><div style><i><br></i></div><div style><i>MGOS2.5, IIS, Win Server 2008 64bit</i></div></div>