diff --git a/plugins/behaviors/openlayers_behavior_zoomtolayer.js b/plugins/behaviors/openlayers_behavior_zoomtolayer.js index 678c72e..51fb465 100644 --- a/plugins/behaviors/openlayers_behavior_zoomtolayer.js +++ b/plugins/behaviors/openlayers_behavior_zoomtolayer.js @@ -17,7 +17,7 @@ Drupal.openlayers.addBehavior('openlayers_behavior_zoomtolayer', function (data, // For KML layers, we need to wait until layer is loaded. Ideally // we could check for any layer that is loading from an external // source, but for now, just check KML - if (layers[i].layer_handler == 'kml') { + if (layers[i].layer_handler == 'kml' || layers[i].layer_handler == 'geojson') { layers[i].events.register('loadend', layers[i], function() { layerextent = layers[i].getDataExtent().scale(zoomtolayer_scale); map.zoomToExtent(layerextent);