diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-10-25 13:58:25 +0200 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2016-10-25 16:11:36 +0200 |
commit | 6277dca8985156e313004464337c02128e13cae7 (patch) | |
tree | eface3bd88d2b8d32f69035f43aea4d0d44b9e0f /src | |
parent | b0485bccd9ddc5d6a3589c433cd1f3a103f857ea (diff) | |
download | qtlocation-mapboxgl-6277dca8985156e313004464337c02128e13cae7.tar.gz |
[core] geojson source - clear cache when json content is set
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/source_impl.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/style/sources/geojson_source_impl.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/style/source_impl.hpp b/src/mbgl/style/source_impl.hpp index 608a552835..14ed9cd01c 100644 --- a/src/mbgl/style/source_impl.hpp +++ b/src/mbgl/style/source_impl.hpp @@ -86,6 +86,7 @@ protected: Source& base; SourceObserver* observer = nullptr; std::map<OverscaledTileID, std::unique_ptr<Tile>> tiles; + TileCache cache; private: // TileObserver implementation. @@ -97,7 +98,6 @@ private: virtual std::unique_ptr<Tile> createTile(const OverscaledTileID&, const UpdateParameters&) = 0; std::map<UnwrappedTileID, RenderTile> renderTiles; - TileCache cache; }; } // namespace style diff --git a/src/mbgl/style/sources/geojson_source_impl.cpp b/src/mbgl/style/sources/geojson_source_impl.cpp index 0406cb22e5..f9dfcfb310 100644 --- a/src/mbgl/style/sources/geojson_source_impl.cpp +++ b/src/mbgl/style/sources/geojson_source_impl.cpp @@ -54,6 +54,8 @@ optional<std::string> GeoJSONSource::Impl::getURL() { void GeoJSONSource::Impl::setGeoJSON(const GeoJSON& geoJSON) { double scale = util::EXTENT / util::tileSize; + cache.clear(); + if (!options.cluster) { mapbox::geojsonvt::Options vtOptions; vtOptions.maxZoom = options.maxzoom; |