Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached is a patch for leaflet.drupal.js. Line 329 throws this error when importing JSON with polygons:
"Uncaught TypeError: Cannot read property 'push' of undefined"
Line 329: Drupal.leaflet.bounds.push(layer._layers[layer_id]._latlngs[i]);
Comment | File | Size | Author |
---|---|---|---|
#2 | leaflet-invalid-push-property-geojson-feature-2341125-2.patch | 443 bytes | Pryrios |
leaflet.drupal.patch | 783 bytes | oblom |
Comments
Comment #1
oblom CreditAttribution: oblom commentedComment #2
Pryrios CreditAttribution: Pryrios commentedThe issue here is that js is assigning "drupal.leaflet.bounds" which is not defined in that point of the code. It should be, like in all other features, "lMap.bounds" which later will be copied in "drupal.leaflet".
Comment #3
RdeBoer@dmitry-ga: Thanks for reporting
@Pryrios: Thanks for fixing!
Checked in with attribution.