[core] Adjust layer source properties to better reflect reality
* Layer source ID is immutable; must be provided to the constructor * Layer source layer is mutable * Layers with GeoJSON sources do not have a source layer While here, make Layer::copy impl-private.
This commit is contained in:
@@ -16,8 +16,8 @@ void LineAnnotationImpl::updateStyle(Style& style) const {
|
||||
if (style.getLayer(layerID))
|
||||
return;
|
||||
|
||||
std::unique_ptr<LineLayer> layer = std::make_unique<LineLayer>(layerID);
|
||||
layer->setSource(AnnotationManager::SourceID, layerID);
|
||||
std::unique_ptr<LineLayer> layer = std::make_unique<LineLayer>(layerID, AnnotationManager::SourceID);
|
||||
layer->setSourceLayer(layerID);
|
||||
layer->setLineJoin(LineJoinType::Round);
|
||||
layer->setLineOpacity(annotation.opacity);
|
||||
layer->setLineWidth(annotation.width);
|
||||
|
||||
Reference in New Issue
Block a user