[mapguide-users] php problems with 3.x

Alec Bell alecbell4 at gmail.com
Tue Feb 12 14:13:38 PST 2019


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> 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?
>
>
> [image: 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
> 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/180eacc4/attachment.html>


More information about the mapguide-users mailing list