Openlayers 使用DragBox OpenLayer绘制长方体时如何使用DragPan?
我想在绘制框(ol.interaction.DragBox)时使用拖拽(ol.interaction.DragPan),以便选择当前不在视口中的区域。有什么办法吗 以JSFIDLE为例,我能够画一个拖拽框,但不知道如何使用拖拽 这是Openlayers 使用DragBox OpenLayer绘制长方体时如何使用DragPan?,openlayers,Openlayers,我想在绘制框(ol.interaction.DragBox)时使用拖拽(ol.interaction.DragPan),以便选择当前不在视口中的区域。有什么办法吗 以JSFIDLE为例,我能够画一个拖拽框,但不知道如何使用拖拽 这是 // a DragBox interaction used to select features by drawing boxes var dragBox = new ol.interaction.DragBox({ condition: ol.eve
// a DragBox interaction used to select features by drawing boxes
var dragBox = new ol.interaction.DragBox({
condition: ol.events.condition.platformModifierKeyOnly
});
map.addInteraction(dragBox);
dragBox.on('boxend', function() {
// features that intersect the box are added to the collection of
// selected features
var extent = dragBox.getGeometry().getExtent();
});