diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-05-19 15:34:08 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-06-10 12:42:14 +0200 |
commit | e8d8f52d2ea8b788a0dbe859549ec86fc0732df3 (patch) | |
tree | 80e8d41f1bbd8de633e851086be523860b8979db /src/mbgl/tile/vector_tile.cpp | |
parent | 6998479d05497baf57eb264e92807d327920f7d6 (diff) | |
download | qtlocation-mapboxgl-e8d8f52d2ea8b788a0dbe859549ec86fc0732df3.tar.gz |
[core] *TileMonitor => *TileSource
Diffstat (limited to 'src/mbgl/tile/vector_tile.cpp')
-rw-r--r-- | src/mbgl/tile/vector_tile.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/mbgl/tile/vector_tile.cpp b/src/mbgl/tile/vector_tile.cpp index 5126d0ce83..0a59bafecd 100644 --- a/src/mbgl/tile/vector_tile.cpp +++ b/src/mbgl/tile/vector_tile.cpp @@ -220,28 +220,4 @@ std::string VectorTileLayer::getName() const { return name; } -VectorTileMonitor::VectorTileMonitor(const OverscaledTileID& tileID_, float pixelRatio_, - const std::string& urlTemplate_, FileSource& fileSource_) - : tileID(tileID_), - pixelRatio(pixelRatio_), - urlTemplate(urlTemplate_), - fileSource(fileSource_) { -} - -std::unique_ptr<AsyncRequest> VectorTileMonitor::monitorTile(const GeometryTileMonitor::Callback& callback) { - const Resource resource = Resource::tile(urlTemplate, pixelRatio, tileID.canonical.x, - tileID.canonical.y, tileID.canonical.z); - return fileSource.request(resource, [callback, this](Response res) { - if (res.error) { - callback(std::make_exception_ptr(std::runtime_error(res.error->message)), nullptr, res.modified, res.expires); - } else if (res.notModified) { - return; - } else if (res.noContent) { - callback(nullptr, nullptr, res.modified, res.expires); - } else { - callback(nullptr, std::make_unique<VectorTile>(res.data), res.modified, res.expires); - } - }); -} - } // namespace mbgl |