Leaflet has a method built into the polyline class to return an array of all LatLng coordinates of the line. It would look something like:
var latlngArray = polyline.getLatLngs();
Esri-leaflet, the Esri plugin that allows for interaction with ArcGIS Online and ArcGIS REST services has a separate class--Layer--that, it seems, it uses for all hosted feature types--points, lines, polygons, etc. Used in Esri-leaflet, it's constructed with L.esri.featureLayer.
I'm essentially trying to take the latitude and longitude of the feature vertices and perform a custom transformation on them point by point before placing them on the map without altering their values on the server. By using the pointToLayer option I've been able to retrieve and manipulate the latlng values for points. This would be fairly simple if I could call
.getLatLngs() on the feature layer.
Is there a way I can do something similar with a polyline?