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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | leaflet_default_marker_fail_3129241_#2.patch | 2.05 KB | itamair |
Comments
Comment #2
itamair commentedSorry @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).
Comment #4
ken-g commentedHi @itamair,
Many thanks for addressing this issue promptly.
I can confirm that version 1.36 fixes the problem.