Leaflet Maps questions

Awesome stuff!!!

Is there a way to make the map automatically include all the visible markers?

With my custom code for this I add the markers to the bounds and then use fitBounds.

bounds = L.latLngBounds();
var markers = dmx.parse('dv_tripbits.data');

if (Array.isArray(markers)) {
markers.forEach(function (marker) {
.... other code ...
var lat_lng = [marker.lat, marker.lng];
bounds.extend(lat_lng);
}}

map.fitBounds(bounds);

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 ()