[fdo-users] Creation FeatureSource

Jérôme DUCKERS jerome.duckers at gmail.com
Mon Sep 10 06:02:41 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, resourceSrvc);

 xml = DynamicLayer.GetTemplate("MgLayer_test.templ");

MgResourceIdentifier layerId = DynamicLayer.SaveSessionResource(
"test.LayerDefinition", xml, sessionId, resourceSrvc);

new MgLayer(layerId, resourceSrvc);


map.Save(resourceSrvc, mapStateId);

the function SaveSessionResource is:

public static MgResourceIdentifier SaveSessionResource(string name,
string sessionId, MgResourceService resourceService)


string resourceId = string.Format("Session:{0}//{1}" ,sessionId, name);

var mgResourceIdentifier = new MgResourceIdentifier(resourceId);

resourceService.SetResource(mgResourceIdentifier, 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/fdo-users/attachments/20120910/e880dd3d/attachment.html>

More information about the fdo-users mailing list