[mapguide-users] Confusing about reload runtime map
Gunter Becker
gunter.becker at CSOGIS.DE
Wed Nov 21 10:41:13 EST 2007
Hi,
several months ago I created a webapplication with MapGuideOpenSource 1.1.
Now with release 1.2 this code doesn't work anymore but I can't figure out
what has changed.
The following gets the current runtime map:
MgMap map = new MgMap();
MgResourceIdentifier mapId = new MgResourceIdentifier("Session:" +
MgSessionId + @"//" + MapName + "." + MgResourceType.Map);
map.Open(ResourceService, mapId);
I've tested with "Web Tier Test" that the resource exists and also that the
map object was instantiated.
The map object has correct properties but it seems that I can't get any
layers with the GetLayers() methode.
MgLayerCollection layers = currentMap.GetLayers(); // Error - The
requested operation is invalid
foreach (MgLayer layer in layers)
{
....
This is the error code:
The requested operation is invalid.
Exception occurred in method MgMap.UnpackLayersAndGroups at line 640 in file
c:\build_bond_area\mapguide_open_source_v1.2\build_18.1\mgdev\common\mapguidecommon\MapLayer/Map.cpp
Hope someone can help. It worked for me with MGOS 1.1!
Gunter
--
View this message in context: http://www.nabble.com/Confusing-about-reload-runtime-map-tf4850877s16610.html#a13879496
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list