As in sharpmap to paint over separate territories.

Topics: SharpMap v2.0
Oct 30, 2007 at 5:26 AM
Hi!
I have a card(map) of my region, the region is broken into 10 parts.
How to paint over color any part of my region.
Coordinator
Oct 31, 2007 at 7:40 PM
Hi Dmitriy007 -

There are a number of ways to do this in SharpMap.

The first way would be to use a CustomTheme delegate. This allows you to change how a feature looks by changing the style used to draw the feature. The CustomTheme delegate is invoked on each feature rendered, so you can be very specific about which features are colored, and how they are colored.

The next way you can do this, in SharpMap v2.0 only, is to create a custom renderer by creating a class which inherits from FeatureRenderer2D<TStyle, TRenderObject> and implementing IGeometryRenderer<Symbol2D, TRenderObject>. More work, but you can do things you can't do with a CustomTheme delegate, like modify the geometries or add or remove geometries. This is useful when doing cartographic processing and analysis.
Nov 15, 2007 at 5:02 AM

codekaizen wrote:
Hi Dmitriy007 -

There are a number of ways to do this in SharpMap.

The first way would be to use a CustomTheme delegate. This allows you to change how a feature looks by changing the style used to draw the feature. The CustomTheme delegate is invoked on each feature rendered, so you can be very specific about which features are colored, and how they are colored.

The next way you can do this, in SharpMap v2.0 only, is to create a custom renderer by creating a class which inherits from FeatureRenderer2D<TStyle, TRenderObject> and implementing IGeometryRenderer<Symbol2D, TRenderObject>. More work, but you can do things you can't do with a CustomTheme delegate, like modify the geometries or add or remove geometries. This is useful when doing cartographic processing and analysis.


Hi codekaizen!
Can at you is any samples?
Looked examples in demo09vb as I can not understand.