Select to view content in your preferred language

converting polyline (from feature) to array of points

2319
3
Jump to solution
05-30-2017 11:09 PM
AldwinGregorio
Occasional Contributor

Do you have any idea how to convert a polyline (a polyline that was from a resulted feature from querying) to a collection of points? Thank you! 

0 Kudos
1 Solution

Accepted Solutions
FC_Basson
MVP Regular Contributor

Lucky for you the polyline is already a list of points (in a list of paths): Polyline | API Reference | ArcGIS API for JavaScript 4.3  

You just need to fetch the feature geometry and iterate through it.  Do you want to create point features from the paths?

View solution in original post

3 Replies
FC_Basson
MVP Regular Contributor

Lucky for you the polyline is already a list of points (in a list of paths): Polyline | API Reference | ArcGIS API for JavaScript 4.3  

You just need to fetch the feature geometry and iterate through it.  Do you want to create point features from the paths?

AldwinGregorio
Occasional Contributor

Thank you!  I actually already saw the paths of polyline, yeah, through feature geometry. What we actually trying to achieve is from starting point, we need to get along the polyline and get an exact location with only distance given. Any idea how we can do this? I know it has lots of maths. But we can't find any good formula for this.  

0 Kudos
FC_Basson
MVP Regular Contributor