<div dir="ltr"><div dir="ltr">Hi Andrew,<div><br></div><div>You'll need to pass in the site connection object.</div><div>API docs are installed in the ..\www\help folder.</div><div>eg: file:///C:/Program%20Files/OSGeo/MapGuide/Web/www/help/devguide/introduction.html#maps<br></div><div><br></div><div>regards,</div><div>Alec</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 13, 2019 at 8:07 AM Andrew DeMerchant <<a href="mailto:andrew.demerchant@gemtec.ca">andrew.demerchant@gemtec.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_-6870334647549732203divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0px;margin-bottom:0px">I'm struggling to get my old PHP scripts that worked in 2.5 to work in 3.1...hoping someone can help out. I've had a hard time finding documentation that's up to date. Here's a snippet:</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px"></p>
<div> MgInitializeWebTier ($configFilePath);</div>
<div> $userInfo = new MgUserInformation($mgSessionId);</div>
<div> $siteConnection = new MgSiteConnection();</div>
<div> $siteConnection->Open($userInfo);</div>
<div> $resourceService = $siteConnection->CreateService(0);</div>
<div> $featureService = $siteConnection->CreateService(2);</div>
<div> $queryOptions = new MgFeatureQueryOptions();</div>
<div> $map = new MgMap();</div>
<div> $map->Open($resourceService, $mapName);</div>
<div><br>
</div>
<div> // Create the selection object by retrieving the current</div>
<div> // selection from the map.</div>
<div><br>
</div>
<div><span style="font-size:12pt"> $selection = new MgSelection($map);</span><br>
</div>
<div> $selection->Open($resourceService, $mapName);</div>
<div><br>
</div>
<div> $layers = $selection->GetLayers();</div>
<br>
<p></p>
<p style="margin-top:0px;margin-bottom:0px">Right now, it's giving me an error at new MgMap() saying that it's the wrong number of parameters. I can't find any docs that tell me what's changed, so I'm pretty stuck. Any suggestions? </p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<div id="gmail-m_-6870334647549732203Signature">
<div id="gmail-m_-6870334647549732203divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p></p>
<table style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:10.6667px;border-collapse:collapse">
<tbody>
<tr>
<td style="width:210px"><a href="https://www.gemtec.ca/" id="gmail-m_-6870334647549732203LPNoLP" target="_blank"><img width="200" height="69" alt="GEMTEC" title="Visit the GEMTEC homepage" style="float: left; margin-right: 12px; border: none;" src="https://www.gemtec.ca/images/gemtec.png"></a></td>
<td style="width:403px;min-width:250px">
<p id="gmail-m_-6870334647549732203sig-text" style="padding:3px"><strong style="font-size:10pt;color:black">Andrew DeMerchant</strong><br>
<br>
Fredericton, NB<br>
tel: 506.453.1025 x163 / toll-free: 1.877.243.6832<br>
mobile: 506.470.2007 / fax: 506.453.9470</p>
</td>
</tr>
</tbody>
</table>
<br>
<p></p>
<p id="gmail-m_-6870334647549732203sig-text" style="padding:3px;color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px">
</p>
<p></p>
</div>
</div>
</div>
</div>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapguide-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapguide-users</a></blockquote></div>