Just came across this when trying to use a custom icon url setting with a leaflet_views created view.
Uncaught Error: iconUrl not set in Icon options (see the docs).
In leaflet.drupal.js
Drupal.Leaflet.prototype.create_icon = function (options) {
var icon = new L.Icon({iconUrl: options.icon_url});
// rest of function code here
the
options.iconUrl
doesn't actually exist.
The parameter in the options object is actually named icon_url
Changing the parameter name fixes the issue, no JS error is thrown and the custom icon url is correctly applied.
Comments
Comment #2
focus13 commentedComment #3
focus13 commentedComment #4
focus13 commentedComment #5
focus13 commentedComment #6
geek-merlinDug through the source, this seems consolidated on iconUrl.