Hello!
I was wondering if it would be possible to turn a 2d array of latitude and longitude into a featurelayer using esri leaflet? Would this be difficult to accomplish? This is what the data looks like:
var data = [
{ "latitude": 59.441193, "longitude": 24.729494 },
{ "latitude": 59.432365, "longitude": 24.742992 },
{ "latitude": 59.431602, "longitude": 24.757563 },
{ "latitude": 59.437843, "longitude": 24.765759 },
{ "latitude": 59.439644, "longitude": 24.779041 },
{ "latitude": 59.434776, "longitude": 24.756681 }
];
Solved! Go to Solution.
LeafletJS is pretty open-ended here with a few ways you could accomplish this. But with the esri-leaflet plugin there is no concept of a "client-side-only" FeatureLayer (but there is in the ArcGIS API for JavaScript).
Back to LeafletJS itself, you can use layer types such as `Marker`, `Circle`, or `CircleMarker` with each of your objects in your data array.
You could use Add XY Coordinates in ArcMap to convert the table of coordinates to points, and then share the result as a map. Leaflet can be used to publish it, but isn't required.
LeafletJS is pretty open-ended here with a few ways you could accomplish this. But with the esri-leaflet plugin there is no concept of a "client-side-only" FeatureLayer (but there is in the ArcGIS API for JavaScript).
Back to LeafletJS itself, you can use layer types such as `Marker`, `Circle`, or `CircleMarker` with each of your objects in your data array.