[core] geojson source - clear cache when json content is set
This commit is contained in:
committed by
Ivo van Dongen
parent
b0485bccd9
commit
6277dca898
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user