Rotating symbols on the same layer separately

Topics: General Topics, SharpMap Project
Feb 23, 2010 at 8:50 AM

Hello, I am just starting to work in SharpMap and probably will ask a very simple question, but I cannot solve it by myself and need your help.

I have several VectorLayers, each of them contains a set of points with bitmaps as symbols for these points. What I need is to rotate each symbol of each point differently according to some parameter. I cannot put these points all in separate layers, I nned them grouped and in fact there are pretty a lot of them. What can I do? Or instead of a bitmap for each point I can draw a small polygon already orientated, but in this case it comes a problem of zooming, when I zoom a map, these layers with polygons zom together with others, but I need the symbols to stay always the same.

Code examples are highly appreciated!

Coordinator
Feb 23, 2010 at 10:17 AM

Hi kathilario see http://sharpmap.codeplex.com/wikipage?title=CustomTheme&referringTitle=Styling%20based%20on%20feature%20data you can change the rotation based on an attribute as part of a custom theme. hth jd

Mar 2, 2010 at 2:10 PM

Thank you very much for the answer. I tryed to implement the suggested solution, but could not figure out how because the parameter of rotation comes from the database and is not assosiated with points directly.

Coordinator
Mar 4, 2010 at 10:34 AM

Hello kathilario,

have a look at http://sharpmap.codeplex.com/SourceControl/changeset/view/64429#1078869 to get you started

Hth FObermaier

 

Mar 18, 2010 at 12:43 PM

Thank you very much for your help, Fobermaier! Now everything works just fine!