Dec 12, 2012 at 8:19 AM
Edited Dec 12, 2012 at 11:56 AM
Still I have a problem with the refreshing of the VariableLayerCollection on the MapBox.
I'm using a shapefile with attributes and one of the attributes in the DBF, a text, will be changed in the program (with some external code).
Created the VectorLayer with a shapefile (referenced as
_shapeFile), created a LabelLayer which datasource is the VectorLayer. Added the VectorLayer and LabelLayer to the map with
mapBox.Map.VariableLayers.AllowEdit = true;
mapBox.Map.VariableLayers.AllowRemove = true;
VariableLayerCollection.Interval = 1000;
For the _shapeLayer I use a simple CustomTheme (line color and width), based on the value of the attribute which I have to change.
For the editing I use
VariableLayerCollection.Pause = true;
if (_shapeFile.IsOpen) _shapeFile.Close();
// edit the attribute //
if (!_shapeFile.IsOpen) _shapeFile.Open();
VariableLayerCollection.Pause = false;
The segments and labels on the map will not change when the attribute is changed. I can take a long time before it is changed.
Is there anything I'm doing wrong?