[mapguide-users] php problems with 3.x
Andrew DeMerchant
andrew.demerchant at gemtec.ca
Wed Feb 13 04:43:15 PST 2019
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!
[GEMTEC]<https://www.gemtec.ca/>
Andrew DeMerchant
Fredericton, NB
tel: 506.453.1025 x163 / toll-free: 1.877.243.6832
mobile: 506.470.2007 / fax: 506.453.9470
________________________________
From: mapguide-users <mapguide-users-bounces at lists.osgeo.org> on behalf of Alec Bell <alecbell4 at gmail.com>
Sent: Tuesday, February 12, 2019 6:13:38 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] php problems with 3.x
Hi Andrew,
You'll need to pass in the site connection object.
API docs are installed in the ..\www\help folder.
eg: file:///C:/Program%20Files/OSGeo/MapGuide/Web/www/help/devguide/introduction.html#maps
regards,
Alec
On Wed, Feb 13, 2019 at 8:07 AM Andrew DeMerchant <andrew.demerchant at gemtec.ca<mailto:andrew.demerchant at gemtec.ca>> wrote:
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:
MgInitializeWebTier ($configFilePath);
$userInfo = new MgUserInformation($mgSessionId);
$siteConnection = new MgSiteConnection();
$siteConnection->Open($userInfo);
$resourceService = $siteConnection->CreateService(0);
$featureService = $siteConnection->CreateService(2);
$queryOptions = new MgFeatureQueryOptions();
$map = new MgMap();
$map->Open($resourceService, $mapName);
// Create the selection object by retrieving the current
// selection from the map.
$selection = new MgSelection($map);
$selection->Open($resourceService, $mapName);
$layers = $selection->GetLayers();
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?
[GEMTEC]<https://www.gemtec.ca/>
Andrew DeMerchant
Fredericton, NB
tel: 506.453.1025 x163 / toll-free: 1.877.243.6832
mobile: 506.470.2007 / fax: 506.453.9470
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org<mailto:mapguide-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapguide-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20190213/247639b3/attachment.html>
More information about the mapguide-users
mailing list