fix passing of annotation manager
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user