My map keeps shaking when I move it
See original GitHub issueHello, my map seems to shake a lot when I use width: 100%
(or any percentage)
With px, it works just fine. I want to make the width the whole screen though.
Here’s a video of the shaking:
In the video the width is 90%
This is the part of the HTML:
<div id="mapContainer" style="width:100%;height:100%; position: relative;">
<div id="map" style="width: 90%; height: 500px; left: 50%; bottom: 50%; transform: translate(-50%, 50%);">
<a href="https://www.maptiler.com" style="position:absolute;left:10px;bottom:10px;z-index:999;"><img src="https://api.maptiler.com/resources/logo.svg" alt="MapTiler logo"></a>
</div>
Thanks in advance, Jees
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
My map is shaking when I am using the app. I don't know why I ...
My map is shaking when I am using the app. ... the app also but every time when I am gonna use map...
Read more >With large maps, screen keeps shaking back and forth then ...
With large maps, screen keeps shaking back and forth then moving way off to the side of the map after moving the camera...
Read more >is there a reason my car is shaking on a custom map? help ...
Try a different car, otherwise your fps looks quite low, maybe that could be affecting something...
Read more >Map screen is shaking when ki pilot is flying :: X4
Hey there! I got the problem that my map screen (and all related screens) is shaking every one oder two seconds when the...
Read more >How to Disable “Shake to Send Feedback” in ... - OSXDaily
If you don't want to see the 'Shake to send feedback' alert come up in Google Maps for iOS, this article will show...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I added additionally a TileLayer the shaking doesn’t happen anymore. Same if I removed L.mapboxGL completely.
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18 }).addTo(map)
.I don’t know mapbox, but it looks like this is an mapbox error and can’t be fixed in Leaflet. Also I suggest to update the mapbox-gl-js version. You are using
1.13.2
but the newest version is2.7.0
.https://cdn.maptiler.com/mapbox-gl-js/v1.13.2/mapbox-gl.js
The basemap is a
L.mapboxGL
one. To consider this as a Leaflet bug, this should be reproducible with a plainL.TileLayer
.