#include #include #include #include namespace mbgl { using namespace style; LineAnnotationImpl::LineAnnotationImpl(const AnnotationID id_, const LineAnnotation& annotation_, const uint8_t maxZoom_) : ShapeAnnotationImpl(id_, maxZoom_), annotation(annotation_) { } void LineAnnotationImpl::updateStyle(Style& style) const { if (style.getLayer(layerID)) return; std::unique_ptr layer = std::make_unique(layerID); layer->setSource(AnnotationManager::SourceID, layerID); layer->setLineJoin(LineJoinType::Round); layer->setLineOpacity(annotation.opacity); layer->setLineWidth(annotation.width); layer->setLineColor(annotation.color); style.addLayer(std::move(layer), AnnotationManager::PointLayerID); } const ShapeAnnotationGeometry& LineAnnotationImpl::geometry() const { return annotation.geometry; } } // namespace mbgl