[mapguide-users] Maestro API 6 - How to convert xml to ILayerDefinition

Jackie Ng jumpinjackie at gmail.com
Thu Sep 22 06:38:25 PDT 2016


If I can recall correctly, the reason I've moved from ResourceTypes enum to
string wherever it is required in the Maestro API is simply a means of
future-proofing the Maestro API against any possible new resource types that
could be introduced by MapGuide in the future.

So the resource type you should be using your code fragment is:

ILayerDefinition ldef =
(ILayerDefinition)ObjectFactory.Deserialize("LayerDefinition",
file.GetInputStream(e)); 

Or if you still want to use the ResourceTypes enum

ILayerDefinition ldef =
(ILayerDefinition)ObjectFactory.Deserialize(ResourceTypes.LayerDefinition.ToString(),
file.GetInputStream(e));

I wrote some high-level overview notes about what breaking changes to expect
in the SDK changelog

https://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/SDK/sdk_changelog.txt

You might also what to check out the SDK samples, which have all been
updated to work against the Maestro API as of 6.0m5.

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Maestro-API-6-How-to-convert-xml-to-ILayerDefinition-tp5287254p5287297.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list