Skip to content

[map] Add convenience APIs for manipulating the viewport #2682

Closed

Description

@sissbruecker

Describe your motivation

The map's viewport is defined with an instance of the View class, and in order to change the viewport developers have to first get this instance in order to make changes. For example setting the zoom level requires you to do: map.getView().setZoom(4).

Describe the solution you'd like

The map component could provide shortcut methods to change the viewport, such as map.setZoom(4). These methods would just delegate to the internal view object. We probably don't need to cover all properties of the view, but likely candidates would be: center, zoom, rotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions