summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/annotation_manager.cpp24
-rw-r--r--src/mbgl/annotation/annotation_manager.hpp8
-rw-r--r--src/mbgl/annotation/annotation_tile.cpp18
-rw-r--r--src/mbgl/annotation/annotation_tile.hpp8
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.cpp4
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.hpp4
6 files changed, 33 insertions, 33 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp
index 5b87b41f61..c6fb4546d7 100644
--- a/src/mbgl/annotation/annotation_manager.cpp
+++ b/src/mbgl/annotation/annotation_manager.cpp
@@ -80,13 +80,13 @@ AnnotationIDs AnnotationManager::getPointAnnotationsInBounds(const LatLngBounds&
return result;
}
-std::unique_ptr<AnnotationTile> AnnotationManager::getTile(const CanonicalTileID& tileID) {
+std::unique_ptr<AnnotationTileData> AnnotationManager::getTileData(const CanonicalTileID& tileID) {
if (symbolAnnotations.empty() && shapeAnnotations.empty())
return nullptr;
- auto tile = std::make_unique<AnnotationTile>();
+ auto tileData = std::make_unique<AnnotationTileData>();
- AnnotationTileLayer& pointLayer = *tile->layers.emplace(
+ AnnotationTileLayer& pointLayer = *tileData->layers.emplace(
PointLayerID,
std::make_unique<AnnotationTileLayer>(PointLayerID)).first->second;
@@ -98,10 +98,10 @@ std::unique_ptr<AnnotationTile> AnnotationManager::getTile(const CanonicalTileID
}));
for (const auto& shape : shapeAnnotations) {
- shape.second->updateTile(tileID, *tile);
+ shape.second->updateTileData(tileID, *tileData);
}
- return tile;
+ return tileData;
}
void AnnotationManager::updateStyle(Style& style) {
@@ -134,18 +134,18 @@ void AnnotationManager::updateStyle(Style& style) {
obsoleteShapeAnnotationLayers.clear();
- for (auto& data : monitors) {
- data->setData(getTile(data->id.canonical), {}, {});
+ for (auto& tile : tiles) {
+ tile->setData(getTileData(tile->id.canonical), {}, {});
}
}
-void AnnotationManager::addTileData(AnnotationTileData& data) {
- monitors.insert(&data);
- data.setData(getTile(data.id.canonical), {}, {});
+void AnnotationManager::addTile(AnnotationTile& tile) {
+ tiles.insert(&tile);
+ tile.setData(getTileData(tile.id.canonical), {}, {});
}
-void AnnotationManager::removeTileData(AnnotationTileData& data) {
- monitors.erase(&data);
+void AnnotationManager::removeTile(AnnotationTile& tile) {
+ tiles.erase(&tile);
}
void AnnotationManager::addIcon(const std::string& name, std::shared_ptr<const SpriteImage> sprite) {
diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp
index 2285366123..73b6a00a4f 100644
--- a/src/mbgl/annotation/annotation_manager.hpp
+++ b/src/mbgl/annotation/annotation_manager.hpp
@@ -41,8 +41,8 @@ public:
void updateStyle(style::Style&);
- void addTileData(AnnotationTileData&);
- void removeTileData(AnnotationTileData&);
+ void addTile(AnnotationTile&);
+ void removeTile(AnnotationTile&);
static const std::string SourceID;
static const std::string PointLayerID;
@@ -53,7 +53,7 @@ private:
void add(const AnnotationID&, const FillAnnotation&, const uint8_t);
void add(const AnnotationID&, const StyleSourcedAnnotation&, const uint8_t);
- std::unique_ptr<AnnotationTile> getTile(const CanonicalTileID&);
+ std::unique_ptr<AnnotationTileData> getTileData(const CanonicalTileID&);
AnnotationID nextID = 0;
@@ -65,7 +65,7 @@ private:
SymbolAnnotationMap symbolAnnotations;
ShapeAnnotationMap shapeAnnotations;
std::vector<std::string> obsoleteShapeAnnotationLayers;
- std::set<AnnotationTileData*> monitors;
+ std::set<AnnotationTile*> tiles;
SpriteStore spriteStore;
SpriteAtlas spriteAtlas;
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp
index 48415c4f34..92234f5000 100644
--- a/src/mbgl/annotation/annotation_tile.cpp
+++ b/src/mbgl/annotation/annotation_tile.cpp
@@ -8,19 +8,19 @@
namespace mbgl {
-AnnotationTileData::AnnotationTileData(const OverscaledTileID& overscaledTileID,
- std::string sourceID,
- const style::UpdateParameters& parameters)
- : GeometryTileData(overscaledTileID, sourceID, parameters.style, parameters.mode),
+AnnotationTile::AnnotationTile(const OverscaledTileID& overscaledTileID,
+ std::string sourceID,
+ const style::UpdateParameters& parameters)
+ : GeometryTile(overscaledTileID, sourceID, parameters.style, parameters.mode),
annotationManager(parameters.annotationManager) {
- annotationManager.addTileData(*this);
+ annotationManager.addTile(*this);
}
-AnnotationTileData::~AnnotationTileData() {
- annotationManager.removeTileData(*this);
+AnnotationTile::~AnnotationTile() {
+ annotationManager.removeTile(*this);
}
-void AnnotationTileData::setNecessity(Necessity) {}
+void AnnotationTile::setNecessity(Necessity) {}
AnnotationTileFeature::AnnotationTileFeature(FeatureType type_, GeometryCollection geometries_,
std::unordered_map<std::string, std::string> properties_)
@@ -39,7 +39,7 @@ optional<Value> AnnotationTileFeature::getValue(const std::string& key) const {
AnnotationTileLayer::AnnotationTileLayer(const std::string &name_)
: name(name_) {}
-util::ptr<GeometryTileLayer> AnnotationTile::getLayer(const std::string& name) const {
+util::ptr<GeometryTileLayer> AnnotationTileData::getLayer(const std::string& name) const {
auto it = layers.find(name);
if (it != layers.end()) {
return it->second;
diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp
index 0046253665..1a0ae1b7ef 100644
--- a/src/mbgl/annotation/annotation_tile.hpp
+++ b/src/mbgl/annotation/annotation_tile.hpp
@@ -11,12 +11,12 @@ namespace style {
class UpdateParameters;
}
-class AnnotationTileData : public GeometryTileData {
+class AnnotationTile : public GeometryTile {
public:
- AnnotationTileData(const OverscaledTileID&,
+ AnnotationTile(const OverscaledTileID&,
std::string sourceID,
const style::UpdateParameters&);
- ~AnnotationTileData();
+ ~AnnotationTile();
void setNecessity(Necessity) final;
@@ -52,7 +52,7 @@ private:
std::string name;
};
-class AnnotationTile : public GeometryTile {
+class AnnotationTileData : public GeometryTileData {
public:
util::ptr<GeometryTileLayer> getLayer(const std::string&) const override;
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp
index be6e12558d..c9d13e6486 100644
--- a/src/mbgl/annotation/shape_annotation_impl.cpp
+++ b/src/mbgl/annotation/shape_annotation_impl.cpp
@@ -85,7 +85,7 @@ private:
}
};
-void ShapeAnnotationImpl::updateTile(const CanonicalTileID& tileID, AnnotationTile& tile) {
+void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, AnnotationTileData& data) {
static const double baseTolerance = 4;
if (!shapeTiler) {
@@ -108,7 +108,7 @@ void ShapeAnnotationImpl::updateTile(const CanonicalTileID& tileID, AnnotationTi
if (!shapeTile)
return;
- AnnotationTileLayer& layer = *tile.layers.emplace(layerID,
+ AnnotationTileLayer& layer = *data.layers.emplace(layerID,
std::make_unique<AnnotationTileLayer>(layerID)).first->second;
for (auto& shapeFeature : shapeTile.features) {
diff --git a/src/mbgl/annotation/shape_annotation_impl.hpp b/src/mbgl/annotation/shape_annotation_impl.hpp
index e6ba9a4bd7..60762f248d 100644
--- a/src/mbgl/annotation/shape_annotation_impl.hpp
+++ b/src/mbgl/annotation/shape_annotation_impl.hpp
@@ -9,7 +9,7 @@
namespace mbgl {
-class AnnotationTile;
+class AnnotationTileData;
class CanonicalTileID;
namespace style {
@@ -24,7 +24,7 @@ public:
virtual void updateStyle(style::Style&) const = 0;
virtual const ShapeAnnotationGeometry& geometry() const = 0;
- void updateTile(const CanonicalTileID&, AnnotationTile&);
+ void updateTileData(const CanonicalTileID&, AnnotationTileData&);
const AnnotationID id;
const uint8_t maxZoom;