diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-27 14:43:28 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-06 12:52:14 -0700 |
commit | 5b4f6335e384169bcd88633e38d59a500319a47b (patch) | |
tree | 0c4f98790ab6d2814b2db26f6fa72454213c6551 /src/mbgl/style/source_impl.cpp | |
parent | 21dc12ee93e890325c61daa0e4183dd1e795f0a9 (diff) | |
download | qtlocation-mapboxgl-5b4f6335e384169bcd88633e38d59a500319a47b.tar.gz |
[core] Add Source::Impl::reload
Diffstat (limited to 'src/mbgl/style/source_impl.cpp')
-rw-r--r-- | src/mbgl/style/source_impl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mbgl/style/source_impl.cpp b/src/mbgl/style/source_impl.cpp index ba2fbb7c30..d5e33caa55 100644 --- a/src/mbgl/style/source_impl.cpp +++ b/src/mbgl/style/source_impl.cpp @@ -182,6 +182,15 @@ bool Source::Impl::parseTiles(const UpdateParameters& parameters) { return allTilesUpdated; } +void Source::Impl::reload() { + cache.clear(); + + for (auto& pair : tiles) { + auto tile = pair.second.get(); + tile->redoLayout(); + } +} + static Point<int16_t> coordinateToTilePoint(const UnwrappedTileID& tileID, const Point<double>& p) { auto zoomedCoord = TileCoordinate { p, 0 }.zoomTo(tileID.canonical.z); return { |