Skip to content

Simplify setting pan limits #36

@ansis

Description

@ansis

Would it be appropriate to add map.setPanLimits? In a way, it would be the other half of map.setZoomRange.

Something like:

    setPanLimits: function(locations) {
        if (locations instanceof MM.Extent) {
            locations = locations.toArray();
        }
        this.coordLimits = [
            locations[0].zoomTo(this.coordLimits[0].zoom), 
            locations[1].zoomTo(this.coordLimits[1].zoom) 
        ];
        return this;
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions