[core] *Tile ↔ *TileData

Tile is now the main base class; RasterTile, VectorTile, etc are its subclasses. GeometryTileData and its subclasses form the piece that's passed to the worker.
This commit is contained in:
John Firebaugh
2016-06-13 10:59:33 -07:00
parent 3ab7c1cca3
commit 5c7dfd948f
58 changed files with 814 additions and 820 deletions

View File

@@ -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;