[core] move invariant Source ID from SourceInfo to Source

This commit is contained in:
Konstantin Käfer
2016-01-13 12:02:31 +01:00
committed by John Firebaugh
parent 8cca5c89b2
commit cef05b9017
7 changed files with 20 additions and 21 deletions

View File

@@ -112,8 +112,7 @@ std::unique_ptr<AnnotationTile> AnnotationManager::getTile(const TileID& tileID)
void AnnotationManager::updateStyle(Style& style) {
// Create annotation source, point layer, and point bucket
if (!style.getSource(SourceID)) {
std::unique_ptr<Source> source = std::make_unique<Source>(SourceType::Annotations);
source->info.source_id = SourceID;
std::unique_ptr<Source> source = std::make_unique<Source>(SourceType::Annotations, SourceID);
source->enabled = true;
style.addSource(std::move(source));