-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gestures are not handled #1700
Comments
I'm also able to reproduce the issue this way:
|
Resolved by #1702 hopefully. |
We have narrowed down this problem back to between version 9.9.56 and 9.9.76 of the app. What I see on my end is that I use the compass to update the map at 10Hz frequency, and it causes the map to sometime stop responding to gestures. I did write a short attempt to reproduce in jsbin: Basically if I change the version there to 1.10.0-beta.1 I can pan the map using the mouse, but If I upgrade this example to 1.13.0 then I can no longer pan the map using the mouse. As a temporary fix I reduced the compass' frequency to 2Hz but it seems like a workaround and not a fix... The following is the jsbin code, just for safe keeping: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Add a line to a map using a GeoJSON source</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://api.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v1.10.0-beta.1/mapbox-gl.js"></script> <!-- !!change version here!! -->
<style>
body { margin: 0; padding: 0; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
const map = new mapboxgl.Map({
container: 'map',
style: {
version: 8,
sources: {
osm: {
type: "raster",
tiles: ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"],
tileSize: 256,
maxzoom: 19
}
},
layers: [
{
id: 'simple-tiles',
type: 'raster',
source: 'osm',
minzoom: 0,
maxzoom: 22
}
]
},
center: [-122.486052, 37.830348],
zoom: 15
});
map.on('load', () => {
let index = 0;
setInterval(() => {
if (!map.isMoving()) {
index+=3;
map.easeTo({
bearing: index,
//center: map.getCenter(),
//zoom: map.getZoom(),
animate: true,
easing: (x) => x,
offset: [0, 100]
});
}
}, 100)
});
</script>
</body>
</html> |
Bug
What I expect to happen
I should be able to move the map using gestures on mobile devices
What really happened
The map is not responsive to gestures for a short period of time
What I did that caused the issue - step by step
One of the scenarios I'm able to reproduce fairly easily:
My environment
Things I think the developers should know, images, links etc.
When disabling the GPS this solves the issue immediately so I tend to think this is related to the compass operation, maybe.
The text was updated successfully, but these errors were encountered: