Commit 6490ce19 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Use a set of discrete tile levels 13, 15, 17 for now

parent c8156f7d
......@@ -54,7 +54,7 @@
<vectortile name="geojson_data" expire="604800" >
<sourcedir format="OSM.ZIP"> earth/vectorosm </sourcedir>
<tileSize width="256" height="256" />
<storageLayout levelZeroColumns="1" levelZeroRows="1" minimumTileLevel="18" maximumTileLevel="18" mode="OpenStreetMap" />
<storageLayout levelZeroColumns="1" levelZeroRows="1" tileLevels="13,15,17" mode="OpenStreetMap" />
<projection name="Mercator" />
<downloadUrl protocol="http" host="maps.kde.org" path="/earth/vectorosm/" />
<downloadPolicy usage="Browse" maximumConnections="20" />
......
......@@ -88,8 +88,12 @@ void VectorTileModel::setViewport( const GeoDataLatLonBox &bbox, int radius )
// roughly equals the global texture width
if ( tileZoomLevel > m_layer->maximumTileLevel() )
tileZoomLevel = m_layer->maximumTileLevel();
QVector<int> tileLevels = m_layer->tileLevels();
auto iter = qLowerBound(tileLevels, tileZoomLevel);
if (*iter != tileZoomLevel && iter != tileLevels.begin()) {
--iter;
tileZoomLevel = *iter;
}
// if zoom level has changed, empty vectortile cache
if ( tileZoomLevel != m_tileZoomLevel ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment