I'm getting errors trying to do an Icon URL for dynamic markers. It doesn't matter if I use a static address or dynamic I get the same error.
leaflet.min.js:11 Uncaught
TypeError: t.icon.createIcon is not a function
at e._initIcon (leaflet.min.js:11:76400)
at e.onAdd (leaflet.min.js:11:75330)
at e._layerAdd (leaflet.min.js:11:67662)
at e.whenReady (leaflet.min.js:11:43287)
at e.addLayer (leaflet.min.js:11:67885)
at e.addTo (leaflet.min.js:11:67005)
at s.addMarkerToMap (leafletMap.js:487:1)
at s.addMarker (leafletMap.js:520:1)
at leafletMap.js:450:1
at Array.forEach ()
The iconUrl is fixed but not very useful. We added our own marker variations with the upcoming update which allows you have color variations and markers with fontawesome/bootstrap icons.
I can add a fitMarkers method with your custom code to the component, it would then use the markers that are currently on the map.