mirror of
https://github.com/russok/FitoTrack.git
synced 2025-10-29 00:32:11 -07:00
Use ThunderForest tiles only to level 19 because of licence to reduce tile requests
This commit is contained in:
parent
5e5203848d
commit
dfdb2dbac3
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Jannis Scheibe <jannis@tadris.de>
|
||||
* Copyright (c) 2020 Jannis Scheibe <jannis@tadris.de>
|
||||
*
|
||||
* This file is part of FitoTrack
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
|
||||
package de.tadris.fitness.map;
|
||||
|
||||
import org.mapsforge.core.model.LatLong;
|
||||
import org.mapsforge.map.android.graphics.AndroidGraphicFactory;
|
||||
import org.mapsforge.map.android.util.AndroidUtil;
|
||||
import org.mapsforge.map.android.view.MapView;
|
||||
@ -42,7 +41,9 @@ public class MapManager {
|
||||
switch (chosenTileLayer){
|
||||
case "osm.humanitarian": tileSource= HumanitarianTileSource.INSTANCE; break;
|
||||
case "thunderforest.outdoors": tileSource= ThunderforestTileSource.OUTDOORS; break;
|
||||
case "thunderforest.cycle": tileSource= ThunderforestTileSource.CYLE_MAP; break;
|
||||
case "thunderforest.cycle":
|
||||
tileSource = ThunderforestTileSource.CYCLE_MAP;
|
||||
break;
|
||||
default: tileSource= MapnikTileSource.INSTANCE; break; // Inclusive "osm.mapnik"
|
||||
}
|
||||
tileSource.setUserAgent("mapsforge-android");
|
||||
|
||||
@ -29,10 +29,10 @@ public class ThunderforestTileSource extends FitoTrackTileSource{
|
||||
private static final String API_KEY = "87b07337e42c405db6d8d39b1c0c179e";
|
||||
|
||||
public static final ThunderforestTileSource OUTDOORS = new ThunderforestTileSource("outdoors", "Outdoor");
|
||||
public static final ThunderforestTileSource CYLE_MAP = new ThunderforestTileSource("cycle", "Cycle Map");
|
||||
public static final ThunderforestTileSource CYCLE_MAP = new ThunderforestTileSource("cycle", "Cycle Map");
|
||||
private static final int PARALLEL_REQUESTS_LIMIT = 8;
|
||||
private static final String PROTOCOL = "https";
|
||||
private static final int ZOOM_LEVEL_MAX = 22;
|
||||
private static final int ZOOM_LEVEL_MAX = 19;
|
||||
private static final int ZOOM_LEVEL_MIN = 0;
|
||||
|
||||
private final String mapName;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Jannis Scheibe <jannis@tadris.de>
|
||||
* Copyright (c) 2020 Jannis Scheibe <jannis@tadris.de>
|
||||
*
|
||||
* This file is part of FitoTrack
|
||||
*
|
||||
@ -23,7 +23,7 @@ package de.tadris.fitness.map.tilesource;
|
||||
public class TileSources {
|
||||
|
||||
public static FitoTrackTileSource[] tileSources= new FitoTrackTileSource[]{
|
||||
MapnikTileSource.INSTANCE, HumanitarianTileSource.INSTANCE, ThunderforestTileSource.OUTDOORS, ThunderforestTileSource.CYLE_MAP
|
||||
MapnikTileSource.INSTANCE, HumanitarianTileSource.INSTANCE, ThunderforestTileSource.OUTDOORS, ThunderforestTileSource.CYCLE_MAP
|
||||
};
|
||||
|
||||
public enum Purpose{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user