[mapguide-internals] Session-MapName-Map

Jason Birch Jason.Birch at nanaimo.ca
Fri Aug 31 15:05:34 EDT 2007


Seems logical to me too.

-----Original Message-----
From: Haris Kurtagic
Subject: RE: [mapguide-internals] Session-MapName-Map

Yes, that is a way I was thinking about.

Thanks,
Haris

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Paul
Spencer
Sent: Friday, August 31, 2007 8:50 PM
To: MapGuide Internals Mail List
Subject: Re: [mapguide-internals] Session-MapName-Map

So the logic (in PHP anyway) could be:

$resourceID = new  MgResourceIdentifier($mapid); $map = new MgMap();
$map->Create($resourceService, $resourceID); $mapStateId =
$map->Save($resourceService);

and then to recover the runtime map:

$map = new MgMap();
$map->Open($resourceService, $mapStateId);

Where mapStateId is returned from Save (or obtained in some other
way) and is automagically created from the resourceId in such a way as
to guarantee uniqueness for maps with the same name in different
folders.

I like this.  One thing that I find about the MapGuide APIs is that
using them is often quite verbose.  Over time, I would like to see
common patterns that require a lot of code be moved into API convenience
functions so that it is easier for folks to accomplish basic programming
tasks.

Paul


More information about the mapguide-internals mailing list