Revert "Do not hold a reference to the Style at the [Live|Vector]TileData"

This reverts commit 044454417b.
This commit is contained in:
John Firebaugh
2015-06-18 18:23:03 -07:00
parent 424629d7fc
commit 4eff674c1d
7 changed files with 24 additions and 27 deletions

View File

@@ -295,7 +295,7 @@ TileData::State Source::addTile(MapData& data,
// If we don't find working tile data, we're just going to load it.
if (info.type == SourceType::Vector) {
new_tile.data =
std::make_shared<VectorTileData>(normalized_id, style.layers, style.workers, glyphAtlas,
std::make_shared<VectorTileData>(normalized_id, style, glyphAtlas,
glyphStore, spriteAtlas, sprite, info,
transformState.getAngle(), data.getCollisionDebug());
new_tile.data->request(style.workers, transformState.getPixelRatio(), callback);
@@ -305,7 +305,7 @@ TileData::State Source::addTile(MapData& data,
style.workers, transformState.getPixelRatio(), callback);
} else if (info.type == SourceType::Annotations) {
new_tile.data = std::make_shared<LiveTileData>(normalized_id, data.annotationManager,
style.layers, style.workers, glyphAtlas,
style, glyphAtlas,
glyphStore, spriteAtlas, sprite, info,
transformState.getAngle(), data.getCollisionDebug());
new_tile.data->reparse(style.workers, callback);