Skip to content

panInsideBounds doesn't handle world bounds #1491

@fungiboletus

Description

@fungiboletus

If you configure the map's bounds to the world bounds ([[-90.0,-180.0],[90.0,180.0]]), you can infinitly move the map on the vertical axis.

In my opinion, it's because the default projection tends to zero with the worlds bounds.

I wrote this example : http://jsfiddle.net/gxzhc/1/, where the bounds are a little smaller so you can see a very short animation (around 3 pixels) when you release your mouse click.

The problem seems to be in the panInsideBounds function, but i don't know how to fix it properly. Maybe we have to work with latitude and longitude instead of pixels.

Can you give me advices for fixing it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions