Style layers
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.
Benefits:
- Efficient and performant when adding many features to the map using a vector source.
- Compatible with GeoJSON or vector sources.
- Many style customization options.
- Could exclude the Annotation API when installing the SDK to reduce the SDK size.
Limitations:
- 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.
RELATED
Map styles: Work with layers
Use the Mapbox Maps SDK for Android to add, remove, and modify layers rendered in a map style.
この{Type}は役に立ちましたか?