This project has moved and is read-only. For the latest updates, please go here.

Polyline's outline

Topics: SharpMap Project, SharpMap v0.9 / v1.x, WinForms Controls
Mar 5, 2012 at 5:36 PM
Edited Mar 6, 2012 at 5:42 AM

How can i draw a polyline's outline (custom style) on polygon?

Mar 7, 2012 at 6:49 AM

yes, you can.

if line is penned with 3f, outline  set  to 4f

Mar 7, 2012 at 9:54 AM
Edited Mar 7, 2012 at 10:46 AM

outline of the polyline drawed correctly(i can see it, my polyline is dotted line), but only when it not on polygon, otherwise dotted line drawn without outline. Can i do something for repair this?

Mar 8, 2012 at 11:30 AM
Edited Mar 8, 2012 at 11:35 AM

For example i got this

my style is

 style = new VectorStyle();
 style.Line =new Pen(Color.White, 2.0f);
 style.Line.DashStyle = DashStyle.Custom;
 style.Line.DashCap = DashCap.Flat;
 style.Line.DashPattern = new float[] { 8.0f, 6.0f };
 style.Outline = new Pen(Color.Black, 4.0f);
 style.Outline.Alignment = PenAlignment.Left;
 style.EnableOutline = true;

Mar 8, 2012 at 1:17 PM

I assume all your feature data is in one layer?

Please split features into layers with respect to their type/functionality. This will speed up rendering (less thematics) and help prevent your rendering problem.

Hth FObermaier

Mar 9, 2012 at 2:22 AM

I think FObermaier is right.

If all feature data is in one layer, outline will join at intersection. In your case, outline join with outline of another polygon.

Mar 9, 2012 at 5:12 PM
Edited Mar 9, 2012 at 5:19 PM

Thanks to all, now everything works fine, and what i must to do with label layers - split them too or collect data from all vector layers to one label layer?

LabelCollisionDetection works on different layers?

Mar 10, 2012 at 3:19 AM

yes, it work on different layer. Use LabelCollisionDetection.ThoroughCollisionDetection;