I don't have an example at hand.

You can use the example from the "mapframe.php" file.
I have taken this from the "mapframe.aspx":
            MgUserInformation userInfo = new MgUserInformation(sessionId);
            MgSiteConnection site = new MgSiteConnection();
            site.Open(userInfo);
            MgResourceService resourceSrvc = (MgResourceService)site.CreateService(MgServiceType.ResourceService);

Next step, is getting the runtime map

            MgMap map = new MgMap();
            map.Open(resourceSrvc, mapName)

Next step is reading the Id:
            string mapDef = map.MapDefinition;
         

I hope this helps you out. Both the sessionId and the mapName variable must be passed on from somewhere.

Regards, Kenneth, GEOGRAF A/S


Andrew DeMerchant skrev:
I don't suppose you can spell it out for me? PHP is not my forte and the WebAPI docs for MGOS aren't exactly easy to navigate, in my books - I can get around in PHP, but only by deconstructing existing things....an example would help me out a lot.

Andrew


Kenneth, GEOGRAF A/S wrote:
Yes, it is possible.

When the viewer creates the runtime map, it places it in the root of the session repository, and names it the same as the originating resource, ea:
Library://Folder/MyMap.MapDefinition
becomes the runtime map:
Session:xx-yy//MyMap.Map

You have to open the runtime map, (using MgMap.Open).
The resulting runtime map contains the original resource, in the Property "MapDefinition".
Regards, Kenneth, GEOGRAF A/S
  


Andrew DeMerchant skrev:
Is it possible to get the full library path to my map, given a sessionid? I'm playing around with the 'plot to dwf' example, and would like to have it pick a PrintLayout to use based on the library path of the map the user is printing. I just can't figure out how to work backwards like that - I had a look at the API's but didn't see any means to do this.....is it possible?

Andrew
--
Andrew DeMerchant
Computer Technologist
ph.1-877-2GEMTEC x.163
fax 506-453-9470

GEMTEC Limited
191 Doak Road
Fredericton, NB, Canada
E3C 2E6


_______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users

--
Andrew DeMerchant
Computer Technologist
ph.1-877-2GEMTEC x.163
fax 506-453-9470

GEMTEC Limited
191 Doak Road
Fredericton, NB, Canada
E3C 2E6


_______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to