diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-20 17:11:50 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-02 08:45:09 -0700 |
commit | 3f0c89d633a5056006557ad5f4b9e446807d00ee (patch) | |
tree | 5405c50dd26a5a393a982e8e0f76b764dbbccf48 /src/mbgl/style/tile_source_impl.cpp | |
parent | 197751bace6181f2c2dbe4c890f277a0dc7e58b1 (diff) | |
download | qtlocation-mapboxgl-3f0c89d633a5056006557ad5f4b9e446807d00ee.tar.gz |
[core] Refactor Source::*Impls into RenderSources and TilePyramid
Diffstat (limited to 'src/mbgl/style/tile_source_impl.cpp')
-rw-r--r-- | src/mbgl/style/tile_source_impl.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/mbgl/style/tile_source_impl.cpp b/src/mbgl/style/tile_source_impl.cpp index 9ea596d38b..4623714794 100644 --- a/src/mbgl/style/tile_source_impl.cpp +++ b/src/mbgl/style/tile_source_impl.cpp @@ -82,26 +82,7 @@ void TileSourceImpl::loadDescription(FileSource& fileSource) { return; } - // Check whether previous information specifies different tile - bool attributionChanged = false; - if (tileset.tiles != newTileset.tiles) { - // Tile URLs changed: force tiles to be reloaded. - invalidateTiles(); - - // Tile size changed: We need to recalculate the tiles we need to load because we - // might have to load tiles for a different zoom level - // This is done automatically when we trigger the onSourceLoaded observer below. - - // Min/Max zoom changed: We need to recalculate what tiles to load, if we have tiles - // loaded that are outside the new zoom range - // This is done automatically when we trigger the onSourceLoaded observer below. - - // Attribution changed: We need to notify the embedding application that this - // changed. - attributionChanged = true; - - // Center/bounds changed: We're not using these values currently - } + bool attributionChanged = tileset.attribution != newTileset.attribution; tileset = newTileset; loaded = true; @@ -114,9 +95,9 @@ void TileSourceImpl::loadDescription(FileSource& fileSource) { }); } -optional<Range<uint8_t>> TileSourceImpl::getZoomRange() const { +optional<Tileset> TileSourceImpl::getTileset() const { if (loaded) { - return tileset.zoomRange; + return tileset; } return {}; } |