Getting vertices of segment of polyline using ArcGIS API for JavaScript? [closed]

I have a poly line with 3 co-ordinate, say (x1,y1), (x2,y2), (x3,y3). Can I get the vertices (x1,y1), (x2,y2) if clicked on line-segment drawn by (x1,y1), (x2,y2)?

I have a poly line on map that with path [[x1,y1],[x2,y2],[x3,y3]]. And I have electrical box at the corresponding paths.

When clicking the segment drawn by the points x1,y1 and x2,y2 I want to get the point (x1,y1) and (x2,y2). Same for path (x2,y2), (x3,y3).

I'm using Javascript API.

closed as off-topic by PolyGeo♦Sep 28 '16 at 9:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

• are you experienced with python and arcpy? Then you could program your own toolbar using the ESRI addin_assistent and build an interactive Tool to achieve this. I don't know about an existing solution. – Andreas Müller Feb 9 '16 at 16:38

You are very brief in the explanation of your problem, but I assume you would like to get point features. In order to get the vertices from a polyline you can use the `feature vertices to points` tool from the data management toolbox. For the newly created point feature class, add an X and a Y field and calculate the geometry. You may also look at this post: Get all the points of a polyline