We have a very rare scenario where we use views_geojson maps with a bounding box strategy.

This makes the loadend event fire twice: once with features, once without.

The provided patch checks if the layers currently has features (in the zoomtolayer javascript) and only continues if there are features. Which does make total sense, there is nothing to zoom without features anyways.

And it fixes our issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

batje’s picture

Pol’s picture

Status: Needs review » Fixed

Thanks !

  • Pol committed b6ad4e5 on 7.x-2.x authored by batje
    Issue #2344127 by batje: Added zoomtolayer only when there are features.
    

Status: Fixed » Closed (fixed)

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