Lars Maxfield
Lars Maxfield
~I've proposed a solution in PR #4612.~ I've rescinded that solution as I've found a more intuitive design with two user settings — one for underzooming and one for overpanning....
Here is a demo of my new design that allows you to underzoom and overpan a single-copy world: https://larsmaxfield.github.io/swings/maplibre-underzoom []( https://larsmaxfield.github.io/swings/maplibre-underzoom) There are three parameters which I currently name...
> Why not use minZoom and bounds to define this behavior instead of introducing new configurations? I considered that, but: `minZoom` is based on absolute tile size, not the relative...
> I tend to think that the definitions added here are not in line with the previous configurations. > I would consider thinking which APIs this features needs and write...
I updated the number options to be percentages with `underzoom` in the range 0–100 and `overpan` in the range 0–50 (see edited explanation above). I also made a draft PR...
@a-milenin indeed I just now ported my v4 PR to v5 #5995. [Updated example](https://larsmaxfield.github.io/swings/maplibre-underzoom). Still need to make tests. Also still need approval that the options and design are OK.
I agree that this adds options that are quite foreign to what exists. Instead of the terms underzoom and overpan, we could rename this feature and its options by what...
@dhruvatara that indeed relates to constraining horizontal panning, but this feature request includes vertical panning as well.
@a-milenin not yet. @HarelM what do you think of this naming? ```ts viewportBoundsContraint: 'confine' | 'extend', extendScaleLimit?: number, extendPanLimit?: number ``` I think the terms are clearer now: - Viewport...
Indeed. @lirenxiaolaba see [maplibre-xy](https://github.com/larsmaxfield/maplibre-xy) for the `Underzoom.transformConstrain` which can let your mobile users responsibly zoom out to see the entire map.