[mapguide-users] can maestro create sdf?
mika at digikartta.net
mika at digikartta.net
Thu Dec 12 12:42:46 PST 2013
Hi,
Maestro 5 and AIMS 2014 again,
I can create featuresource like this:
IFeatureSource fs = ObjectFactory.CreateFeatureSource(this.mgSiteConn,
"OSGeo.SDF");
fs.SetConnectionProperty("File",
"%MG_DATA_FILE_PATH%zone.sdf");
fs.SetConnectionProperty("ReadOnly", "FALSE");
this.resSrvc.SaveResourceAs(fs, dataSourceId);
But this doesn't create the SDF and how could it, I understand that.
But without knowing how SDF works I thought I could create some sort of
empty SDF and insert data into it later. I tried to create a schema for
it:
com.IApplySchema cmd =
(com.IApplySchema)this.mgSiteConn.CreateCommand((int)com.CommandType.ApplySchema);
cmd.Schema = schema;
cmd.FeatureSourceId = dataSourceId;
cmd.Execute();
This will crash on excecute.
If I recall right this all was done like this in the MG API:
MgCreateSdfParams sdfParams = new MgCreateSdfParams(string, srs,
schema);
featSrvc.CreateFeatureSource(dataSourceId, sdfParams);
How should I implement the same in Maestro API?
- mika -
More information about the mapguide-users
mailing list