fix passing of annotation manager

This commit is contained in:
Justin R. Miller
2015-03-17 17:45:09 -07:00
parent e049ce6df1
commit 76f8a3d846
3 changed files with 5 additions and 5 deletions

View File

@@ -8,7 +8,7 @@
using namespace mbgl;
LiveTileData::LiveTileData(Tile::ID const& id_,
util::ptr<AnnotationManager> annotationManager_,
AnnotationManager& annotationManager_,
float mapMaxZoom,
util::ptr<Style> style_,
GlyphAtlas& glyphAtlas_,
@@ -37,7 +37,7 @@ void LiveTileData::parse() {
}
if (source.type == SourceType::Annotations) {
const std::unique_ptr<LiveTile>& tile = annotationManager->getTile(id);
const std::unique_ptr<LiveTile>& tile = annotationManager.getTile(id);
if (tile) {
// Parsing creates state that is encapsulated in TileParser. While parsing,

View File

@@ -10,7 +10,7 @@ class AnnotationManager;
class LiveTileData : public VectorTileData {
public:
LiveTileData(Tile::ID const&,
util::ptr<AnnotationManager>,
AnnotationManager&,
float mapMaxZoom,
util::ptr<Style>,
GlyphAtlas&,
@@ -24,7 +24,7 @@ public:
void parse() override;
private:
util::ptr<AnnotationManager> annotationManager;
AnnotationManager& annotationManager;
};
}

View File

@@ -196,7 +196,7 @@ TileData::State Source::addTile(Map &map, Environment &env, uv::worker &worker,
new_tile.data = std::make_shared<RasterTileData>(normalized_id, texturePool, info, env);
new_tile.data->request(worker, map.getState().getPixelRatio(), callback);
} else if (info.type == SourceType::Annotations) {
util::ptr<AnnotationManager> annotationManager = map.getAnnotationManager();
AnnotationManager& annotationManager = map.getAnnotationManager();
new_tile.data = std::make_shared<LiveTileData>(normalized_id,
annotationManager,
map.getMaxZoom(), style,