[mapguide-users] Re: Create feature source

Lee lee.wade at eurocoast.nsw.gov.au
Tue Nov 23 21:26:37 EST 2010


Thanks Jackie, yes I do have an oracle connection set and running the
resource identifier is Library://New Feature source.FeatureSource. Replacing
sdfresid with Library://New Feature source.FeatureSource I need to add other
code for parameters, create schemas etc cant seem to find an example of how
to configure oracle feature source:

                // Create the Feature Source (SDF)

                MgFeatureSchema sdfSchema = this.CreateFilterSchema();
                MgCreateSdfParams sdfParams = new MgCreateSdfParams("MAPCS",
map.GetMapSRS(), sdfSchema);
                featureService.CreateFeatureSource(sdfResId, sdfParams);

                // Create the Layer

                MgResourceIdentifier layerResId = new
MgResourceIdentifier("Session:" + GetParameter(this.args, "SESSION") +
"//Filter.LayerDefinition");
                String layerDefinition =
File.ReadAllText(GetQueryXmlTemplatePath());
                layerDefinition = layerDefinition.Replace("%s",
sdfResId.ToString());

                MgByteReader reader = new MgByteReader(layerDefinition,
"text/xml");
                resourceService.SetResource(layerResId, reader, null);

                layer = new MgLayer(layerResId, resourceService);

                layer.SetName("_QuerySpatialFilter");
                layer.SetLegendLabel("_QuerySpatialFilter");
                layer.SetDisplayInLegend(false);
                layer.SetSelectable(false);

Any help greatly appreciated.

Lee
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Create-feature-source-tp5768882p5769051.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list