<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks! I found what I needed in the examples - there was another API call that had also changed the required number of args...got it sorted out now, though. Thanks again!</p>
<div id="Signature">
<div id="divtagdefaultwrapper" 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><span id="ms-rterangepaste-start"></span></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="LPNoLP"><img width="200" height="69" alt="GEMTEC" title="Visit the GEMTEC homepage" style="float: left; margin-right: 12px; border: none; user-select: none;" src="https://www.gemtec.ca/images/gemtec.png"></a></td>
<td style="width:403px; min-width:250px">
<p id="sig-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>
<span id="ms-rterangepaste-end"></span><br>
<p></p>
<p id="sig-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>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> mapguide-users <mapguide-users-bounces@lists.osgeo.org> on behalf of Alec Bell <alecbell4@gmail.com><br>
<b>Sent:</b> Tuesday, February 12, 2019 6:13:38 PM<br>
<b>To:</b> MapGuide Users Mail List<br>
<b>Subject:</b> Re: [mapguide-users] php problems with 3.x</font>
<div> </div>
</div>
<div>
<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="x_gmail_quote">
<div dir="ltr" class="x_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="x_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="x_gmail-m_-6870334647549732203divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif">
<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="x_gmail-m_-6870334647549732203Signature">
<div id="x_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="x_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="x_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="x_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>
</div>
</body>
</html>