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

gdbd picture gdbd  路  3Comments

timwis picture timwis  路  3Comments

JonnyBGod picture JonnyBGod  路  4Comments

zdila picture zdila  路  3Comments

edmsgists picture edmsgists  路  3Comments