This project has moved. For the latest updates, please go here.

Symbolizing moving objects by label, symbol/behaviour without map refresh

Topics: General Topics, SharpMap v0.9 / v1.x
Jun 11, 2011 at 12:00 PM

Hi All!

I am developing a Windows Forms application in C# to show/track large number of moving objects on a map. I would like to ask your suggestions about the following topics:

- which is the best layer type to show large numbers of (100-2000) moving objects

- moving update interval is 5-60 seconds/object

- objects should be labeled by one of their attributes (e.g. object name)

- objects should be symbolized based on their attributes (e.g. an object can be symbolized red, yellow and green point)

- is it possible to solve to refresh only 'tracking layer' when objects position changes? (I'm afraid map refresh would be 'expensive')

I am an new to SharpMap, so any suggestions from experienced developers would be appriciated!

Thanks in advance,



Jun 14, 2011 at 7:29 AM

Hello Tamas,

to do things like that, you can use use any geometry layer and instead of adding it to the layers collection, add it to the VariableLayers collection.
You can configure how often you want layers in that collection to be requeried. If you do not pan/zoom the map, all but your variable layers remain
unchanged on update.

There is a sample in the WinFormSamples project using ShapeFile provider and one using GeometryFeatureProvider.

Hth FObermaier

Jun 14, 2011 at 2:19 PM

Thx for your answer.

I investigated your samples, but I could not find

- how to set layer refresh interval

- is it possible calling some kind of layer.refresh method to refresh layer instead of using refresh interval?

- labeling features of this layer

- symbolizing by attributes of this layer

Thanks very much!

Jun 14, 2011 at 8:56 PM

You can set VariableLayerCollections Interval property to any ms-interval you like. ATM this is the only way to force a refresh, but do not hesitate to develop another solution and share it with us.

The VariableLayerCollection may take the same kinds of layers as the usual LayerCollection, so you are free to use LabelLayer and VectorLayer along with theming.

Hth FObermaier

Jun 14, 2011 at 8:58 PM

Thx FObermaier!