Polyline's outline

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

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

Mar 7, 2012 at 5:49 AM

yes, you can.

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

Mar 7, 2012 at 8:54 AM
Edited Mar 7, 2012 at 9: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 10:30 AM
Edited Mar 8, 2012 at 10:35 AM

For example i got this http://www.habrastorage.com/images/map.png

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 12: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 1: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 4:12 PM
Edited Mar 9, 2012 at 4: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 2:19 AM

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