[mapguide-users] Creation of a FeatureSource

jerome.duckers jerome.duckers at gmail.com
Mon Sep 10 06:31:32 PDT 2012

I have a problem to create a FeatureSource with the MgResourceService
My Code is very simple: 
string xml =  DynamicLayer.GetTemplate("MgData_test.templ");
MgResourceIdentifier dataId =
DynamicLayer.SaveSessionResource("test.FeatureSource", xml, sessionId,
xml = DynamicLayer.GetTemplate("MgLayer_test.templ");
MgResourceIdentifier layerId =
DynamicLayer.SaveSessionResource("test.LayerDefinition", xml, sessionId,
MgLayer(layerId, resourceSrvc); 
map.Save(resourceSrvc, mapStateId);
the function SaveSessionResource is: 
static MgResourceIdentifier SaveSessionResource(string name, string content,
string sessionId, MgResourceService resourceService) 
string resourceId = string.Format("Session:{0}//{1}" ,sessionId, name); 
var mgResourceIdentifier = new MgResourceIdentifier(resourceId); 
new MgByteReader(content, "text/xml"), null); 
return mgResourceIdentifier; 

The Layer appears in my legend, everything is correct, but nothing appears
on the map. 
I thing that the featureSource is not created ! I miss something ?
I try to create in Maestro a Layer based on my FeatureSource, but nothing
The featureSource is based on a SDF, that is not empty.
Thanks a lot.
Best Regards.

View this message in context: http://osgeo-org.1560.n6.nabble.com/Creation-of-a-FeatureSource-tp5000822.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list