[mapguide-users] Re: Upgrading MaestroAPI

Gunter Becker gunter.becker at csogis.de
Thu Nov 24 06:31:08 EST 2011


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.


More information about the mapguide-users mailing list