Hi Hans, good idea!

I've changed my code to this:

    // Create a new ResourcIdentifier for the new LayerDefinition               
  
    ResourceIdentifier newResourceID = new ResourceIdentifier(layerName,
ResourceTypes.LayerDefinition, Connection.SessionID);

    // Saving the LayerDefinition first
    Connection.ResourceService.SaveResourceAs(newLayerDefinition,
newResourceID);

    // Create a new RuntimeLayer from the just saved LayerDefinition and
assign it to the old one
    runMapLayer = runtimeMap.CreateLayer(newResourceID,
runtimeMap.GetGroupByName(runMapLayer.Group));

I haven't tested it yet since my code contains some more compiler errors.
Did you (or Jackie) think this works?

Gunter

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Upgrading-MaestroAPI-tp7019938p7027794.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to