-
-
Notifications
You must be signed in to change notification settings - Fork 932
Open
Labels
PR is more than welcomedExtra attention is neededExtra attention is neededbugSomething isn't workingSomething isn't working
Description
maplibre-gl-js version: 5.13.0
browser: chrome 141.0.7390.77
I think there were few issues about this already, but I don't see any open one, yet still this bug exists so creating new one.
Related issues:
mapbox/mapbox-gl-js#11831
#4095 - this was closed, but not resolved
#2984 -> there is no solution to my knowledge, mapbox says that they fixed it somehow
Steps to Trigger Behavior
Steps to Trigger Behavior
- Call function map.FlyTo with padding ->
map.flyTo({
center: coordinates[0],
padding: {
top: 50,
bottom: 0,
left: 100,
right: 0
}
})
- Call function map.fitBounds ->
map.fitBounds(bounds, {
padding: 200
});
- Call to fitBounds uses sum of padding from fitBounds and previous flyTo ->
padding = {
top: 50 + 200,
bottom: 200,
left: 100 + 200,
right 0 + 200,
}
Link to Demonstration
https://jsbin.com/xeseliyufe/edit?html,output
Screen.Recording.2025-11-20.at.13.19.55.webm
Expected Behavior
Padding is not summed up
Actual Behavior
Padding is summed up which breaks UI of the app
dubbha
Metadata
Metadata
Assignees
Labels
PR is more than welcomedExtra attention is neededExtra attention is neededbugSomething isn't workingSomething isn't working