Add ol.interaction.TouchRotateAndZoom

This commit is contained in:
Frederic Junod
2013-02-18 11:49:36 +01:00
parent d9a1c18300
commit 735e534095
4 changed files with 156 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ goog.require('ol.interaction.KeyboardPan');
goog.require('ol.interaction.KeyboardZoom');
goog.require('ol.interaction.MouseWheelZoom');
goog.require('ol.interaction.TouchPan');
goog.require('ol.interaction.TouchRotateAndZoom');
goog.require('ol.interaction.condition');
goog.require('ol.layer.Layer');
goog.require('ol.renderer.Map');
@@ -966,6 +967,12 @@ ol.Map.createInteractions_ = function(mapOptions) {
interactions.push(new ol.interaction.TouchPan());
}
var touchRotateZoom = goog.isDef(mapOptions.touchRotateZoom) ?
mapOptions.touchRotateZoom : true;
if (touchRotateZoom) {
interactions.push(new ol.interaction.TouchRotateAndZoom());
}
var dragPan = goog.isDef(mapOptions.dragPan) ?
mapOptions.dragPan : true;
if (dragPan) {