There are countless jquery plugin for this. But I found none that work in Edge, Chrome, Firefox and Safari, mouse and touch. Do you know a proper stable solution? It doesn't have to be jquery based. Can be also native JS.
Thanks @Alexis, with your hint I figured out a solution that seems to work. Here the core functionality:
var drag = false;
$('#map').on( "mousedown touchstart", function(e){
drag = true;
console.log('start');
});
$('#map').on( "touchmove", function(e){
if (e.targetTouches.length == 1 && drag == true) {
var touch = e.targetTouches[0];
console.log(touch);
}
});
$('#map').on( "mousemove", function(e){
if (drag == true) {
console.log(e.pageX);
}
});
$('#map').on( "mouseup touchend", function(e){
drag = false;
console.log('end');
});