ThinkGeo.com    |     Documentation    |     Premium Support

Problem Create Dashed Line Style

Hello,


I am trying to create a dashed line as a linestyle.  I am using the following code


LineStyle style = new LineStyle(new GeoPen(new GeoHatchBrush(GeoHatchStyle.DashedHorizontal, GeoColor.StandardColors.Red), 4));


The line with this style never displays on the map, however if I change it to a solid line, it displays fine.  Any help would be appreciated.  Thanks.


.Ryan.


 



Ryan,


Thanks for your post and questions.
 
Try the following code:

GeoPen geoPen = new GeoPen(GeoColor.SimpleColors.Red, 4);
geoPen.DashStyle = LineDashStyle.Dash;
LineStyle style = new LineStyle(geoPen);

 
Any more questions just feel free to let me know.
 
Thanks.
 
Yale