Call setMap instead of passing map to control
This commit is contained in:
@@ -90,9 +90,9 @@ ol.interaction.DragZoom.prototype.handleDragStart =
|
||||
var browserEvent = mapBrowserEvent.browserEvent;
|
||||
if (browserEvent.isMouseActionButton() && this.condition_(browserEvent)) {
|
||||
this.dragBox_ = new ol.control.DragBox({
|
||||
map: mapBrowserEvent.map,
|
||||
startCoordinate: this.startCoordinate
|
||||
});
|
||||
this.dragBox_.setMap(mapBrowserEvent.map);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user