Skip to content

Remove PitchRange from MapViewCamera #72

@Archdoog

Description

@Archdoog

In an effort to simplify configuration of the camera, we should remove the pitch range from the map view camera and add it as a property of the MapView. Once moved, it should be available for manipulation through a view modifier. Note, this modifier could bundle other map configuration similar to how we have a single .mapControls modifier for the logo, attribution and compass.

Why

  1. This will reduce the code required to build camera state, removing infrequently used types.
  2. It will align it with other maplibre-native libraries like https://github.com/Rallista/maplibre-compose-playground where configurations like this area specified on the MapView, not the camera itself.

Example

MapView(
    styleURL: styleURL, 
    camera: $camera
)
.mapPitchRange(PitchRange.freeWithinRange(0, 20))

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