Hello,
I would like to display the road network to my users and allow them to edit individual link speeds. I have all the road types in one shapefile.
I am using the index feature to display the different road types with different styles as in the sample here
wiki.thinkgeo.com/wiki/File:...100120.zip
My code
var motorwaysLayer = new ShapeFileFeatureLayer(shapeFileName, motindexFileName,ShapeFileReadWriteMode.ReadOnly);
var primaryLayer = new ShapeFileFeatureLayer(shapeFileName, primindexFileName, ShapeFileReadWriteMode.ReadOnly);
var secondaryLayer = new ShapeFileFeatureLayer(shapeFileName, secFileName, ShapeFileReadWriteMode.ReadOnly);
etc.
This all works fine when displaying, but when I try to edit the values it all fails. If I change the motorways layer to be ReadWrite opening it throws the exception that file is in use by other process when I do this
motorwaysLayer.Open();
mapControl.CurrentExtent = motorwaysLayer.GetBoundingBox();
motorwaysLayer.Close();
What is the proper way to edit features in this scenario ? Or do I have to create separate shapefiles and than remerge them ? Or is there some other way how to display different types of roads differently with the same shape file ?
Thanks for any hints given.