[mapguide-users] Re: How to create new/empty vector layer definition?

Hans Milling hm at geograf.dk
Wed Feb 15 02:49:53 EST 2012


Hi Jackie, that solves the problem, doing this:

string layerDefinition = @"<?xml version=""1.0"" encoding=""utf-8""?>
<LayerDefinition xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" version=""2.3.0""
xsi:noNamespaceSchemaLocation=""LayerDefinition-2.3.0.xsd"">
  <VectorLayerDefinition>
    <ResourceId />
    <Watermarks />
    <FeatureName />
    <FeatureNameType>FeatureClass</FeatureNameType>
    <Geometry />
    <VectorScaleRange />
  </VectorLayerDefinition>
</LayerDefinition>";
ILayerDefinition ldef =
(ILayerDefinition)ResourceTypeRegistry.Deserialize(layerDefinition);

But I 'd prefer this line instead :-)
ILayerDefinition ldef = ObjectFactory.CreateDefaultLayer(con,
LayerType.Vector);

Thank you very much for your help.

Best regards
  Hans Milling...

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-create-new-empty-vector-layer-definition-tp4465014p4471199.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list