Thanks for the replies. In response to Zac: I am pretty sure my feature source is not read only. I tried to verify this (see attached code). I also made the changes Jackie suggested and ...
My code is now adding one item to the feature source which I am able to pull with a feature reader. I think this is correct since I have merged all my geometries into one so there is only one feature to add. Unfortunately, the feature reader tells me the geometry (curveGeom) in my case is null. To verify I this I am adding a layer and trying to modify the definition to use the newly added feature source. First I tried just copying a layer definition from the repository to the session until I realized there is no simple way to modify the layer definition to point the new feature source. Currently I am trying to accomplish this by reading an xml file of the layer definition in the repository, modifying it to point to the newly created feature source, creating the layer, and then adding it to the map. I have saved the modified xml to a file and verified it is correct. When I get to this line: MgByteSource byteSource = new MgByteSource(strLayerXML); I get the following error: The specified file was not found: <?xml version="1.0" encoding="UTF-8"?><LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="LayerDefinition-1.3.0.xsd" version="1.3.0"><VectorLayerDefinition><ResourceId>Session:4242bfcc-4aa9-11e0-8000-485b394503be_en_7F0000010AFC0AFB0AFA//truck_route.FeatureSource</ResourceId><FeatureName>Schema1:truck_route</FeatureName><FeatureNameType>FeatureClass</FeatureNameType><Geometry>Geom</Geometry><VectorScaleRange><LineTypeStyle><LineRule><LegendLabel></LegendLabel><LineSymbolization2D><LineStyle>Solid</LineStyle><Thickness>0.04</Thickness><Color>FFFF0000</Color><Unit>Inches</Unit><SizeContext>DeviceUnits</SizeContext></LineSymbolization2D></LineRule></LineTypeStyle></VectorScaleRange></VectorLayerDefinition></LayerDefinition> I have attached my code. http://osgeo-org.1803224.n2.nabble.com/file/n6156094/FindTruckRouteResult.aspx FindTruckRouteResult.aspx any ideas? Thanks, Greg -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Add-geometry-to-feature-source-tp6082938p6156094.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
