The Annotation API makes it unnecessary to write much of the code that would otherwise be required to implement runtime and data-driven styling. But, it is possible to add style layers directly, and in some circumstances doing so will be beneficial.
- Efficient and performant when adding many features to the map using a vector source.
- Also compatible with GeoJSON sources.
- Many style customization options.
- No default image available.
- User interactions are not built-in and will require writing custom code.
- Need to learn the APIs and usage of layers which can be time intensive.
- Might need to learn how to use expressions to control the source data or use data-driven styling.
Use the Mapbox Maps SDK for iOS to add, remove, and modify layers rendered in a map style.
API reference documentation for adding style layers using the Maps SDK.