Skip to content

[Bug] ZoomWidget ignores minZoom / maxZoom #9679

Open
@gerwitz

Description

@gerwitz

Description

Title says it all. With the properties below, I am able to zoom beyond the specified range using the widget. Other interactions are properly constrained.

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CARTO
  • ArcGIS

Expected Behavior

No response

Steps to Reproduce

viewState: {
    latitude: bound.latitude,
    longitude: bound.longitude,
    zoom: bound.zoom,
    minZoom: 1,
    maxZoom: 15,
    pitch: 0,
    bearing: 0,
    transitionDuration: 300
},
widgets: [
    new ZoomWidget({
        id: 'zoom-widget',
        placement: 'bottom-right'
    })
]

Environment

  • Framework version: @deck.gl/[email protected]
  • Browser: latest desktop Safari, Chrome
  • OS: macOS 15.5

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions