Hello,

I'm working on displaying KML on maps and during my work, I've spotted a small bug.
It looks like the behavior "Zoom to layer" is not working when the layer is a KML.

It looks like the "loadend" event is not fired in plugins/behaviors/openlayers_behavior_zoomtolayer.js.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jeffschuler’s picture

Status: Active » Needs review
FileSize
1013 bytes

from zzolo on IRC:

its because KML and GeoJSON are ajax requests and so when the zoom to layer behavior fires, those layers are not fully loaded yet

This triggers loadend after features are loaded.

jeffschuler’s picture

Two places in geojson feature-loading this needs to happen.

Pol’s picture

Status: Needs review » Reviewed & tested by the community

Just tested the patch and it works.

Thanks !

Pol’s picture

Status: Reviewed & tested by the community » Closed (fixed)