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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

focus13 created an issue. See original summary.

focus13’s picture

focus13’s picture

Assigned: focus13 » Unassigned
focus13’s picture

geek-merlin’s picture

Status: Active » Closed (outdated)

Dug through the source, this seems consolidated on iconUrl.