ThinkGeo.com    |     Documentation    |     Premium Support

Increase the arrow head size


Hi,


I would like to draw an arrow at the end of each line. But my line width is around 5 (the default size of default line style when it’s not set). So that the arrow head at the end of line is not very clearly visible.  I should not include an arrow shaped point at the end of line and also I would like to keep width of the line on same size. (If increased the line width arrow head is starting to display)


Is there is a way to make arrow head little bit big?


Below is my code and screenshot.  


_trackShapeLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.CenterPen.EndCap = DrawingLineCap.ArrowAnchor;



Also could you provide me an example usage of DrawingLineCap.custom enum.


Thanks


Amila


 



Amila, 



Thanks for your post, sorry you can't use custom enum, but there is a way to resolve this problem, you can write a linestyle and override the DrawCore method, get the endpoint at the beginning then call the base.DrawCore, draw a symbol you want after base.DrawCode. 



You can view this post to have some sample code. 

gis.thinkgeo.com/Support/Discussion...fault.aspx

Any more questions please feel free to let me know. 



Regards, 



Gary



Hi Gray, 
  
 Thanks for the sample. It helps to reach requirement.  
  
 Thanks 
 Amila

Amila, 
  
 I’m glad it helped. 
  
 Gary

I am having the same issue. The link for sample code to make this work is invalid. Please post a new link or sample.
I am using ThinkGeo Desktop Edition version 10, Visual Studio 2017, and VB.Net.
Thank you.

Serena

Hi Serena,

As below is the topic mentioned by Gary:

Please let me know whether that’s helpful for your scenario.

Regards,

Don

Hi Don,
This does not help. It looks like the topic for Gary was regarding the level at which the symbol was drawn below the line.
My issue is that I want the arrow to be larger. Here is a sample of my code:
lnStyle = New LineStyle
lnStyle = LineStyles.CreateSimpleLineStyle(GeoColor.StandardColors.Red, 3, False)
lnStyle.CenterPen.EndCap = DrawingLineCap.ArrowAnchor
valueStyle.ValueItems.Add(New ValueItem(“XferRoute1”, lnStyle))

the arrow displays, but it is very small. I would like to make the arrow larger.

Hi Marc,

If you modify the width of the line, the arrow size will get changed like this:

If you don’t want to modify the line size but only want to modify the arrow size, you should want to implement your custom linestyle, draw a custom arrow in the end of line, you can override the DrawCore function for that.

If you don’t know how to implement that, you can create a ticket about that, so our developer can help you on that.

Regards,

Don