I setup the icon like this
var centerMarkerIcon = L.icon({iconURL:'http://leafletjs.com/docs/images/logo.png'});
var centerMarker = L.marker(map.getCenter(), {icon: centerMarkerIcon});
but I got the error:
Uncaught Error: iconUrl not set in Icon options (see the docs).
That's because you put iconURL in the icon options instead of iconUrl like it said in the docs (and error message). JavaScript is case sensitive.
Most helpful comment
That's because you put
iconURLin the icon options instead oficonUrllike it said in the docs (and error message). JavaScript is case sensitive.