I have a Feature Layer that contains polyline geometries and I have a point. I am trying to find the closest polyline to that point.
I have looked for a way to do this and I have found FindNearest and it looks like it can accomplish what I need to do:
However, it doesn't look like this exists in ArcGIS API for JS 4.10. Has this been replaced with something else? Is there anything I can use in 4.10 instead of FindNearest?
As of yet the analysis library is not part of the 4.x API. The closest thing available is nearestVertex
But this method only take a simple geometry and a Point as input and returns the nearest point from the input geometry. Meaning you would have to loop through each of the layer geometries to find the one with the least distance.