[mapguide-users] Saving map to session doesn't persist?

Chris Gountanis cgountanis at mpower-tech.com
Fri Nov 17 15:41:32 EST 2006


Can you explain why you have to make 2 MgResourceIdentifier calls before you
can view map with URL? 


--
Chris Gountanis
Programmer/Analyst - Network Administrator
cgountanis at mpower-tech.com
T: 877-269-6971 | T: 920-830-4053 | F: 920-832-0736

MPOWER TECHNOLOGIES
501 S Nicolet Road Appleton, WI 54914
www.mpower-tech.com

Making complex information more accessible.


-----Original Message-----
From: Paul Spencer [mailto:pspencer at dmsolutions.ca] 
Sent: Friday, November 17, 2006 1:30 PM
To: users at mapguide.osgeo.org
Subject: Re: [mapguide-users] Saving map to session doesn't persist?

Jason, in your $map->Save use MgResourceType::Map

Cheers

Paul

On 17-Nov-06, at 1:22 PM, Jason Birch wrote:

> This is what the code looks like now:
>
>     //Set up the map to be used in this service
>     $resourceID = new
> MgResourceIdentifier('Library://Samples/Sheboygan/Maps/ 
> Sheboygan.MapDefi
> nition');
>
>     //Create a connection to the map
>     $map = new MgMap();
>     $map->Create($resourceService,$resourceID,'Sheboygan');
>
>     //Save the map into the repository
>     $mapId = new MgResourceIdentifier("Session:$sessionId// 
> Sheboygan.".
> MgResourceType::MapDefinition);
>     $map->Save($resourceService, $mapId);
>
> Now I'm getting the following error on the MgMap->Save :
>
> Error: An exception occurred in the XML parser.
> Details:An exception occurred in the XML parser. Exception occurred in
> method MgResourceContentManager.ValidateDocument at line 586 in file
> c:\build_tux_area\mgdev\server\src\services\resource 
> \ResourceContentMana
> ger.cpp
>
> ???
>
> Is it possible that the MapDefinition in the Sheboygan sample is not
> valid?  But then it would have errored on the Load in Administrator.
>
> Jason
>
>
> -----Original Message-----
> From: Tom Fukushima [mailto:tom.fukushima at autodesk.com]
> Sent: Friday, November 17, 2006 09:26
> To: users at mapguide.osgeo.org
> Subject: RE: [mapguide-users] Saving map to session doesn't persist?
>
> Hi Jason,
>
> Where you are using MgResourceType::Map, try using
> MgResourceType::MapDefinition instead.
>
> Hope this solves the problem,
> Tom
>
> -----Original Message-----
> From: Jason Birch [mailto:Jason.Birch at nanaimo.ca]
> Sent: Friday, November 17, 2006 10:08 AM
> To: users at mapguide.osgeo.org
> Subject: [mapguide-users] Saving map to session doesn't persist?
>
> I've attached an example that I think should save a MapDefinition  
> to the
> session repository, but a call to MapAgent to render the map comes up
> with a MgResourceNotFoundException (I think).
>
> Is there something that says that MapDefinitions need to be  
> modified to
> be persisted?  Is there a typo in there somewhere?
>
> Jason
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: users-help at mapguide.osgeo.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: users-help at mapguide.osgeo.org
>

+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org





More information about the Mapguide-users mailing list