[mapguide-users] Re: Add geometry to feature source

Greg gbneff at cid.utah.gov
Wed Mar 9 19:18:00 EST 2011

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"

I have attached my code.


any ideas?



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.

More information about the mapguide-users mailing list