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

2016-09-22 Thread Jackie Ng
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.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

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

2016-09-22 Thread Hans Milling
I might have found a way to do it with Maestro API 6. However I need to solve
the 1000+ compiler errors after swapping the API, before I can confirm that
it works:

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

As a side note (to Jackie). It would be great if the "string resourceType"
parameter were exchanged with the ResourceTypes enum, since I have
absolutely no clue what to write in that string field.

Best regards
  Hans Milling... 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Maestro-API-6-How-to-convert-xml-to-ILayerDefinition-tp5287254p5287290.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users