Search code examples
directionarrowsgmap.net

Show Direction Arrows On GreatMaps Route


I am using Greatmaps in a Windows Forms application. I have markers and routes showing but want to add some arrows along the routes to show the direction of travel. I can add GMarkerGoogleType.arrow markers but even if I set the Bearing property of the markers the arrows always point south.

How can I rotate the markers to match the heading ?

Ideally I would like to see just small triangles along the route line which are the same colour as the route stroke colour. Is this possible ?

Thanks for any help.


Solution

  • You have to use a Custom Marker (GMarkerArrow) instead of (GMarkerGoogleType.arrow) because the support of bearing property of the arrow has been deprecated in this class.

    To get the custom marker class, you can found it in the Demo app (Demo.WindowsForms) they created in this link GMarkerArrow Marker Class and you can set the bearing property to it.