- Issue created by @darklight90
- Status changed to Needs review
8 months ago 1:23pm 24 July 2024
The system provides an issue when displaying a View with nodes (with Geofield values) on a Leaflet map.
Displayed error:
TypeError: Cannot read properties of undefined (reading 'lMap') at views_polygon_search_freedraw.js?v=1:174:38
Coming from const map = $('.view-content > div[id*=leaflet-map]', $view);
, it seems that const mapData = map.data("leaflet");
returns an undefined value.
Change the line const map = $('.view-content > div[id*=leaflet-map]', $view);
Into const map = $('div[id*=leaflet-map]');
It seems to be working but should be reviewed by the community.
Needs review
2.0
Code