Leaflet: Uncaught Error: iconUrl not set in Icon options (see the docs).

Created on 21 Mar 2016  路  1Comment  路  Source: Leaflet/Leaflet

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

Most helpful comment

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prbaron picture prbaron  路  3Comments

gdbd picture gdbd  路  3Comments

arminghm picture arminghm  路  3Comments

jcarenza picture jcarenza  路  3Comments

zdila picture zdila  路  3Comments