Refactor Map, introducing Style and Camera as public APIs #7070
Labels
api 📝
breaking change ⚠️
Requires a backwards-incompatible change to the API
GL native → GL JS
For feature parity with Mapbox Maps SDK on a native platform
In the current Mapbox GL JS API, almost the entirety of the API surface area lives on
Map
, making it a God object.In particular, it isn't possible to manipulate a style via the runtime styling API, or a camera via the camera API, without either being associated with a live-rendering map. Separating
Style
andCamera
classes fromMap
would improve Mapbox GL JS's internal architecture and make the external API more flexible. For example, a map-independentCamera
would be a natural way to implement Map-independent projection/unprojection. In addition, it would bring GL JS closer to Native, which has publicStyle
andLayer
classes (though notCamera
, yet).This is a continuation/reframing of #2741.
The text was updated successfully, but these errors were encountered: