Hi all,
I am attempting to create a bunch of markers for a Leaflet JS map using the map() method. Given data from FileMaker in the following format:

I created the following code, which doesnt seem to work. It shows the one central marker but not a second one based on the FileMaker data. What am I missing?
Thank you!
window.LoadMarkers = function (json) {
const obj = JSON.parse(json);
console.log("Data", obj);
const map = L.map("map").setView([41.6801396, -70.2994737], 13);
const newMarker = function (location) {
return L.marker([location.fieldData.lat, location.fieldData.lon])
.addTo(map)
.bindPopup(location.fieldData.c_desc)
.openPopup();
};
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution:
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
}).addTo(map);
L.marker([41.6801396, -70.2994737])
.addTo(map)
.bindPopup("A pretty CSS popup.<br> Easily customizable.")
.openPopup();
const newMarkers = obj.map(newMarker());
console.log(newMarkers);
LoadMarkers();
};