Skip to content

Unbounded horizontal scroll does not play well with longitude constraints near 180 or -180 #2072

@mbenoukaiss

Description

@mbenoukaiss

What is the bug?

Let's say someone wants to have a map constrained to Te Waipounamu, the south island of New Zealand, because why not. Good camera constraints coordinates would be between -38.82;164.37 and -49.49;177.86.

However because the bottom right corner is so close to longitude 180 and because of the way unbounded horizontal scroll is implemented, if you pan with enough speed towards the east, it will reach the constraints and jump you back to the west instead of stopping at the constraint.

I discovered it while trying to understand what causes #2071 precisely

How can we reproduce it?

Create a FlutterMap with the following property set in MapOptions : cameraConstraint: CameraConstraint.contain(bounds: LatLngBounds(const LatLng(-38.82, 164.37), const LatLng(-49.49, 177.86)))

Do you have a potential solution?

No idea yet, don't know how unbounded constraints work

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis new bug report needs reproducing and prioritizing

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions