[mapguide-users] Getting FeatureSource className without Layer

Greenhough, Jamie JamieGreenhough at sierrasystems.com
Mon Nov 10 18:26:11 EST 2008


Hello everyone! I'm trying to find out the className of a FeatureSource
without referencing a layer. Here's the code I'm using so far:

 

            String realPath =
Request.ServerVariables["APPL_PHYSICAL_PATH"];

            String configPath = realPath + "..\\webconfig.ini";

            MapGuideApi.MgInitializeWebTier(configPath);

 

            // Connect to the site.

            MgUserInformation userInfo = new
MgUserInformation(sessionId);

            MgSiteConnection siteConnection = new MgSiteConnection();

            siteConnection.Open(userInfo);

 

            // Create Resource and Feature Service

            MgFeatureService featureService =
(MgFeatureService)siteConnection.CreateService(MgServiceType.FeatureServ
ice);

 

            // Specify the FeatureSource to used for creating the new
layer

            MgResourceIdentifier resId = new
MgResourceIdentifier("Library://Samples/Sheboygan/Data/Trees.FeatureSour
ce");

 

            MgFeatureReader featureReader =
featureService.SelectFeatures(resId, "Schema:Trees", null);

 

So the value I need is "Schema:Trees" but I don't want to hardcode this
value. I can access the Class Name if I get it from a layer, but I'm
trying to add a LayerDefinition to the repository, and I don't have a
layer to reference yet. It looks like SchemaName:ClassName. Any
suggests?



----Notice Regarding Confidentiality----
This email, including any and all attachments, (this "Email") is intended only for the party to whom it is addressed and may contain information that is confidential or privileged.  Sierra Systems Group Inc. and its affiliates accept no responsibility for any loss or damage suffered by any person resulting from any unauthorized use of or reliance upon this Email.  If you are not the intended recipient, you are hereby notified that any dissemination, copying or other use of this Email is prohibited.  Please notify us of the error in communication by return email and destroy all copies of this Email.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20081110/5d404274/attachment.html


More information about the mapguide-users mailing list