Fix map navigation on android native browsers

This commit is contained in:
oterral
2013-11-29 09:05:13 +01:00
parent 1ac93d09c9
commit 22ac512507

View File

@@ -411,6 +411,12 @@ ol.MapBrowserEventHandler.prototype.handleTouchMove_ = function(browserEvent) {
var newEvent = new ol.MapBrowserEvent(
ol.MapBrowserEvent.EventType.TOUCHMOVE, this.map_, browserEvent);
this.dispatchEvent(newEvent);
// Some native android browser triggers mousemove events during small period
// of time. See: https://code.google.com/p/android/issues/detail?id=5491 or
// https://code.google.com/p/android/issues/detail?id=19827
// ex: Galaxy Tab P3110 + Android 4.1.1
browserEvent.preventDefault();
};