[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:
@@ -157,9 +157,9 @@ void AnnotationManager::updateStyle(Style& style) {
|
||||
source->baseImpl->enabled = true;
|
||||
style.addSource(std::move(source));
|
||||
|
||||
std::unique_ptr<SymbolLayer> layer = std::make_unique<SymbolLayer>(PointLayerID);
|
||||
std::unique_ptr<SymbolLayer> layer = std::make_unique<SymbolLayer>(PointLayerID, SourceID);
|
||||
|
||||
layer->setSource(SourceID, PointLayerID);
|
||||
layer->setSourceLayer(PointLayerID);
|
||||
layer->setIconImage({"{sprite}"});
|
||||
layer->setIconAllowOverlap(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user