Skip to content

Add a global "padding" option #4268

Description

@lucaswoj

We allow users to pass an around option to some camera methods.

This ticket proposes a around option be added to Map as a constructor option, getter, and setter.

This option would specify a default value for around on all camera mutations so that

  • it becomes possible to specify around for implicit camera mutation, such as those triggered by use of the NavigationControl
  • it becomes more ergonomic to use the same around value for all camera mutations

Open Questions

  • Does around make sense semantically in this case? Many users will be using this feature because they have a translucent element over the map. In that use case, padding is a more intuitive option.
  • Might users be confused about the difference between around and center? Can we find a naming convention that eliminates that confusion?
  • Are there any other parameters that should have global defaults like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions