-
-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Design Proposal: Add Center Altitude
Motivation
I would like to be able to pitch the camera above 90 degrees.
maplibre/maplibre-gl-js#4717
NathanMOlson/maplibre-gl-js#1
To keep the camera above the terrain, the center point elevation must be above terrain when pitch is > 90. 2D center point is no longer sufficient to place the camera.
Proposed Change
I would like to add a field centerAltitude to the root style spec object. centerAltitude sets the center point elevation in meters above sea level, and joins its friend center.
API Modifications
Root style spec gets a new centerAltitude field. jumpTo(), easeTo(), and flyTo() get elevation added to their options.
Migration Plan and Compatibility
This is a pure extension. To achieve existing functionality, just leave centerAltitude undefined (default 0).
Rejected Alternatives
I considered adding centerAltitude to the API but not to the style spec. Rejected because:
elevationis needed in style spec for render tests.- Similar field
centeralready exists in style spec