Thankyou Jackie for explaining the solution so well. Just tried it and it worked fine.
Regards, Adnan Jackie Ng wrote: > > If you understand that feature sources are just xml documents that > describe a FDO connection to a particular data store, then > CreateFeatureSource()/MgCreateSdfParams is just a convenience method that > does the following: > > 1) Create the SDF file, with the specified schema > 2) Create an XML feature source document for this created SDF > 3) Sets the resource content (feature source) based on the given resource > id > 4) Uploads the created SDF file as the resource data for the given > resource id > > What is so special about MgCreateSdfParams is that it can create the SDF > data store for you (the 1st part). For anything other than SDF, this data > store creation ability is not exposed and you will need to have the data > on hand already or use the FDO API to create the data store. > > However you can achieve the same effect (parts 2, 3 and 4) using > SetResource() and SetResourceData() methods of MgResourceService. > > I think in your case, what you want to do is to copy the raster feature > source to your session repository, and modify its configuration document. > No CreateFeatureSource() call is required. > > Hope that helps. > > - Jackie > > > adnanc wrote: >> >> Hello all, >> >> I am currently serving georeferenced tiffs with the GDAL provider, using >> a config file for indexing them. >> >> A requirement I have is to enable a user to select an area of interest >> and be able to programmatically generate the config file of tiffs for >> that particular area. I have been able to complete this functionality >> using the gdal api. >> >> The next step is to create a session based layer for displaying these >> tiffs, however this also needs a session based feature source. I have >> created a session based feature source but it is an SDF feature source. >> >> Doing the following will add the config file to the feature source, but >> it will not display any tiffs. >> >> resourceService.SetResourceData(resID, "ConfigurationDocument", "Stream", >> byteReader); >> >> The MgFeatureSourceParams class only has one concrete class >> MgCreateSdfParams. >> >> Has any one had a similar requirement or know of a workround for the >> above problem. >> >> Thanks for your time, >> >> Adnan >> > > -- View this message in context: http://n2.nabble.com/Creating-a-temporary-feature-source-that-is-not-an-SDF-file-tp2828125p2844460.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users