Using Javascipt API to draw an arrow

3456
11
07-17-2017 06:52 AM
BjörnPaulström
New Contributor

I have a list with tuples containing latitude and longitudes, and I need to draw an arrow between the two points in the tuple. I cannot however find any easy way to do this. How would i go about drawing an arrow with the javascript API? Also it needs to scale with zoom level so the arrow isnt giantly large if u zoom in on it

Tags (3)
0 Kudos
11 Replies
AamirSuleman1
New Contributor II

From 4.16 you have the ability to add a marker of type LineSymbolMarker to a line. Arrow is one of the style option with settings of placement and color.

https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbolMarker.html

0 Kudos
SelectivelySocial
New Contributor II

Hello,

So I tried this and it works perfectly fine, but there's one issue when I try to use print service then it simply removes the arrow symbol from the print, do you know any workaround for this.

Thanks. 

0 Kudos