Skip to content

[Feat] [pydeck] Prevent unintended zooming with Carto base map #9373

@bijanvakili

Description

@bijanvakili

Target Use Case

If using the default Carto base map in pydeck , it will enable zooming with the mouse wheel by default. This often leads to unintended results (typically mouse wheel 'capture') when python notebook users are already using the mouse wheel to scroll cells. As such, users experience a clunky UX where they have to move and click the mouse to areas outside of the deck.gl output just to regain control of their notebook. This is also often the case when using pydeck 3D rendering.

You can see this unintended capture behavior in the linked video below of a Colab notebook containing both the GeoJsonLayer TripsLayer gallery examples:

issue_9373_compressed.mov

This is actually a limitation of pydeck.View class which only allows the controller parameter to be a boolean.

Proposal

The View controller kwarg could be extended to also specify a class (or python dictionary) that allows for all the available deck.gl Controller options including scrollZoom, doubleClickZoom and touchZoom. The user can then be empowered to specify their desired zoom behavior.

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