Last active
April 26, 2019 21:35
-
-
Save nommuna2/d77ba0317f9e01e7a14142fa75a827c1 to your computer and use it in GitHub Desktop.
(ArcGIS API for JavaScript) Sample of how to add an arrow to the end of a line in the Legend using js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Make sure the layer is loaded, the query all path elements and add the attribute to the specific path you want | |
fl.on("update-end", (e) => { | |
document.querySelectorAll("* path").forEach((e,i) => { | |
if(i === 3){ | |
e.setAttribute("marker-start", "url(#marker_map_0_0_0_start)"); | |
e.setAttribute("marker-end", "url(#marker_map_0_0_0_end)"); | |
} | |
console.log(e); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment