Include drag zoom control in default map
This commit is contained in:
@@ -8,6 +8,7 @@ goog.require('ol.MapProperty');
|
|||||||
goog.require('ol.Projection');
|
goog.require('ol.Projection');
|
||||||
goog.require('ol.control.DblClickZoom');
|
goog.require('ol.control.DblClickZoom');
|
||||||
goog.require('ol.control.DragPan');
|
goog.require('ol.control.DragPan');
|
||||||
|
goog.require('ol.control.DragZoom');
|
||||||
goog.require('ol.control.MouseWheelZoom');
|
goog.require('ol.control.MouseWheelZoom');
|
||||||
goog.require('ol.dom');
|
goog.require('ol.dom');
|
||||||
goog.require('ol.dom.Map');
|
goog.require('ol.dom.Map');
|
||||||
@@ -68,6 +69,7 @@ ol.createMap = function(target, opt_values, opt_rendererHints) {
|
|||||||
if (!goog.object.containsKey(values, ol.MapProperty.CONTROLS)) {
|
if (!goog.object.containsKey(values, ol.MapProperty.CONTROLS)) {
|
||||||
var controls = new ol.Array();
|
var controls = new ol.Array();
|
||||||
controls.push(new ol.control.DblClickZoom());
|
controls.push(new ol.control.DblClickZoom());
|
||||||
|
controls.push(new ol.control.DragZoom());
|
||||||
controls.push(new ol.control.DragPan());
|
controls.push(new ol.control.DragPan());
|
||||||
controls.push(new ol.control.MouseWheelZoom());
|
controls.push(new ol.control.MouseWheelZoom());
|
||||||
values[ol.MapProperty.CONTROLS] = controls;
|
values[ol.MapProperty.CONTROLS] = controls;
|
||||||
|
|||||||
Reference in New Issue
Block a user