Merge pull request #230 from fredj/touch-navigation
Touch navigation issues
This commit is contained in:
@@ -55,7 +55,8 @@ 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.TouchRotate');
|
||||
goog.require('ol.interaction.TouchZoom');
|
||||
goog.require('ol.interaction.condition');
|
||||
goog.require('ol.layer.Layer');
|
||||
goog.require('ol.projection');
|
||||
@@ -966,13 +967,20 @@ ol.Map.createInteractions_ = function(mapOptions) {
|
||||
var touchPan = goog.isDef(mapOptions.touchPan) ?
|
||||
mapOptions.touchPan : true;
|
||||
if (touchPan) {
|
||||
interactions.push(new ol.interaction.TouchPan());
|
||||
interactions.push(new ol.interaction.TouchPan(
|
||||
new ol.Kinetic(-0.005, 0.05, 100)));
|
||||
}
|
||||
|
||||
var touchRotateZoom = goog.isDef(mapOptions.touchRotateZoom) ?
|
||||
mapOptions.touchRotateZoom : true;
|
||||
if (touchRotateZoom) {
|
||||
interactions.push(new ol.interaction.TouchRotateAndZoom());
|
||||
var touchRotate = goog.isDef(mapOptions.touchRotate) ?
|
||||
mapOptions.touchRotate : true;
|
||||
if (touchRotate) {
|
||||
interactions.push(new ol.interaction.TouchRotate());
|
||||
}
|
||||
|
||||
var touchZoom = goog.isDef(mapOptions.touchZoom) ?
|
||||
mapOptions.touchZoom : true;
|
||||
if (touchZoom) {
|
||||
interactions.push(new ol.interaction.TouchZoom());
|
||||
}
|
||||
|
||||
var dragPan = goog.isDef(mapOptions.dragPan) ?
|
||||
|
||||
Reference in New Issue
Block a user