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]);

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oblom’s picture

Status: Active » Needs review
Pryrios’s picture

Title: Invalid property invocation for layer._layers » Invalid "push" property invocation in geoJson feature creation
FileSize
443 bytes

The 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".

RdeBoer’s picture

Assigned: Unassigned » RdeBoer
Status: Needs review » Fixed

@dmitry-ga: Thanks for reporting
@Pryrios: Thanks for fixing!

Checked in with attribution.

  • RdeBoer committed 238083f on 7.x-1.x authored by Pryrios
    Issue #2341125 by dmitry-ga, Pryrios: Invalid "push" property invocation...

Status: Fixed » Closed (fixed)

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