Is there a way to add a unique custom property to each marker on the map? When attempting the code below, an error is triggered:
The error "Property 'myCustomID' does not exist on type '(latlng: LatLngExpression, options?: MarkerOptions) => Marker'" occurs.
let customizedMarker = L.marker([item.latitude, item.longitude], {
icon: icon({
iconSize: [ 30, 41 ],
iconAnchor: [ 13, 41 ],
iconUrl: 'assets/icons8-street-view-64.png',
shadowUrl: 'leaflet/marker-shadow.png'
})
})
customizedMarker.myCustomID = "010000006148";