summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-10-09 17:33:10 -0700
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-10-10 16:53:14 -0700
commit648e74109dd995d5594795b9ddc1e249929b9630 (patch)
tree0a2dead672eee2195d67287e7b444e991a046d9b /src/mbgl/style
parent135217fcee675da1f9be6bca63c43753e19d01b4 (diff)
downloadqtlocation-mapboxgl-648e74109dd995d5594795b9ddc1e249929b9630.tar.gz
[core] Cleanup headers, includes, and external type references
Diffstat (limited to 'src/mbgl/style')
-rw-r--r--src/mbgl/style/custom_tile_loader.cpp2
-rw-r--r--src/mbgl/style/custom_tile_loader.hpp9
-rw-r--r--src/mbgl/style/sources/custom_vector_source.cpp3
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mbgl/style/custom_tile_loader.cpp b/src/mbgl/style/custom_tile_loader.cpp
index 91832f82ba..da4ade6734 100644
--- a/src/mbgl/style/custom_tile_loader.cpp
+++ b/src/mbgl/style/custom_tile_loader.cpp
@@ -53,7 +53,7 @@ void CustomTileLoader::removeTile(const OverscaledTileID& tileID) {
}
-void CustomTileLoader::setTileData(const CanonicalTileID& tileID, const mapbox::geojson::geojson& data) {
+void CustomTileLoader::setTileData(const CanonicalTileID& tileID, const GeoJSON& data) {
auto iter = tileCallbackMap.find(tileID);
if (iter == tileCallbackMap.end()) return;
dataCache[tileID] = std::make_unique<mapbox::geojson::geojson>(std::move(data));
diff --git a/src/mbgl/style/custom_tile_loader.hpp b/src/mbgl/style/custom_tile_loader.hpp
index 6f390cfe35..12b2dd525b 100644
--- a/src/mbgl/style/custom_tile_loader.hpp
+++ b/src/mbgl/style/custom_tile_loader.hpp
@@ -1,17 +1,16 @@
#pragma once
#include <mbgl/style/sources/custom_vector_source.hpp>
-#include <mbgl/actor/scheduler.hpp>
#include <mbgl/tile/tile_id.hpp>
+#include <mbgl/util/geojson.hpp>
#include <mbgl/actor/actor_ref.hpp>
-#include <tuple>
#include <map>
namespace mbgl {
namespace style {
-using SetTileDataFunction = std::function<void(const mapbox::geojson::geojson&)>;
+using SetTileDataFunction = std::function<void(const GeoJSON&)>;
class CustomTileLoader : private util::noncopyable {
public:
@@ -24,13 +23,13 @@ public:
void cancelTile(const OverscaledTileID& tileID);
void removeTile(const OverscaledTileID& tileID);
- void setTileData(const CanonicalTileID& tileID, const mapbox::geojson::geojson& data);
+ void setTileData(const CanonicalTileID& tileID, const GeoJSON& data);
private:
TileFunction fetchTileFunction;
TileFunction cancelTileFunction;
std::unordered_map<CanonicalTileID, std::vector<OverscaledIDFunctionTuple>> tileCallbackMap;
- std::map<CanonicalTileID, std::unique_ptr<mapbox::geojson::geojson>> dataCache;
+ std::map<CanonicalTileID, std::unique_ptr<GeoJSON>> dataCache;
};
} // namespace style
diff --git a/src/mbgl/style/sources/custom_vector_source.cpp b/src/mbgl/style/sources/custom_vector_source.cpp
index fc2f8f548e..c10d0bd2ab 100644
--- a/src/mbgl/style/sources/custom_vector_source.cpp
+++ b/src/mbgl/style/sources/custom_vector_source.cpp
@@ -22,13 +22,14 @@ CustomVectorSource::~CustomVectorSource() = default;
const CustomVectorSource::Impl& CustomVectorSource::impl() const {
return static_cast<const CustomVectorSource::Impl&>(*baseImpl);
}
+
void CustomVectorSource::loadDescription(FileSource&) {
baseImpl = makeMutable<CustomVectorSource::Impl>(impl(), ActorRef<CustomTileLoader>(*loader, mailbox));
loaded = true;
}
void CustomVectorSource::setTileData(const CanonicalTileID& tileID,
- const mapbox::geojson::geojson& data) {
+ const GeoJSON& data) {
loader->setTileData(tileID, data);
}