Hi @itamair,

We have recently upgraded Leaflet from 1.27 to 1.35. This caused the markers on some of our Leaflet maps to disappear.

After several hours of investigation, we determined that the issue was caused by commit 0eefa0c on 20th March in the move from 1.27 to 1.28. In particular, there was a 'refactoring' of code in the leaflet.drupal.js file, which now causes the "create_point" function to fail when the variable "marker.icon" is not defined.

I can then see that a partial attempt was made to correct this in Leaflet 1.30 in commit a26dd74 on 29th March. This partial solution deals with one part of the problem by using the default marker, but this still does not deal with variable "marker.icon" not being defined. The solution is to add a similar check at the next higher level as well (around line 470).

The workaround for this issue is to revert to Leaflet 1.27, but obviously this should be fixed properly.

Comments

ken-g created an issue. See original summary.

itamair’s picture

Status: Active » Fixed
StatusFileSize
new2.05 KB

Sorry @ken-g ... my bad. The attached patch fixes this. It is going to be committed into new 8.x-1.36 version (creating it now).

  • 755caa3 committed on 8.x-1.x
    Issue #3129241: Markers not being displayed on map when upgrading to...
ken-g’s picture

Hi @itamair,

Many thanks for addressing this issue promptly.

I can confirm that version 1.36 fixes the problem.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.