Remove some bitmap map sources due to licenses, closes #110
This commit is contained in:
parent
435cc602a7
commit
a922ae7e78
@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2016 devemux86
|
||||||
|
*
|
||||||
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package org.oscim.test;
|
package org.oscim.test;
|
||||||
|
|
||||||
import com.badlogic.gdx.Input;
|
import com.badlogic.gdx.Input;
|
||||||
@ -9,7 +25,7 @@ import org.oscim.renderer.MapRenderer;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import static org.oscim.tiling.source.bitmap.DefaultSources.HD_HILLSHADE;
|
import static org.oscim.tiling.source.bitmap.DefaultSources.HIKEBIKE_HILLSHADE;
|
||||||
import static org.oscim.tiling.source.bitmap.DefaultSources.OPENSTREETMAP;
|
import static org.oscim.tiling.source.bitmap.DefaultSources.OPENSTREETMAP;
|
||||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
||||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_WATERCOLOR;
|
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_WATERCOLOR;
|
||||||
@ -38,7 +54,7 @@ public class BitmapLayerTest extends GdxMap {
|
|||||||
mMap.layers().remove(mShaded);
|
mMap.layers().remove(mShaded);
|
||||||
mShaded = null;
|
mShaded = null;
|
||||||
} else {
|
} else {
|
||||||
mShaded = new BitmapTileLayer(mMap, HD_HILLSHADE.build());
|
mShaded = new BitmapTileLayer(mMap, HIKEBIKE_HILLSHADE.build());
|
||||||
mMap.layers().add(mShaded);
|
mMap.layers().add(mShaded);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 Andrey Novikov
|
* Copyright 2016 Andrey Novikov
|
||||||
|
* Copyright 2016 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -21,10 +22,17 @@ import org.oscim.tiling.source.bitmap.BitmapTileSource.Builder;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Do not use in applications unless you read through and comply to
|
* Do not use in applications unless you read through and comply to
|
||||||
* their terms of use! Only added here for testing puposes.
|
* their terms of use! Only added here for testing purposes.
|
||||||
*/
|
*/
|
||||||
public class DefaultSources {
|
public class DefaultSources {
|
||||||
|
|
||||||
|
private static final FadeStep[] FADE_STEPS = new FadeStep[]{
|
||||||
|
new FadeStep(0, 8 - 1, 1, 0.7f),
|
||||||
|
// dont fade between zoom-min/max
|
||||||
|
// fade above zoom max + 2, interpolate 1 to 0
|
||||||
|
new FadeStep(8 - 1, 8 + 1, 0.7f, 0)
|
||||||
|
};
|
||||||
|
|
||||||
public static Builder<?> OPENSTREETMAP = BitmapTileSource.builder()
|
public static Builder<?> OPENSTREETMAP = BitmapTileSource.builder()
|
||||||
.url("http://tile.openstreetmap.org")
|
.url("http://tile.openstreetmap.org")
|
||||||
.zoomMax(18);
|
.zoomMax(18);
|
||||||
@ -47,36 +55,11 @@ public class DefaultSources {
|
|||||||
.tilePath("/{Z}/{X}/{Y}.jpg")
|
.tilePath("/{Z}/{X}/{Y}.jpg")
|
||||||
.zoomMax(6);
|
.zoomMax(6);
|
||||||
|
|
||||||
final static FadeStep[] fadeSteps = new FadeStep[]{
|
|
||||||
new FadeStep(0, 8 - 1, 1, 0.7f),
|
|
||||||
// dont fade between zoom-min/max
|
|
||||||
// fade above zoom max + 2, interpolate 1 to 0
|
|
||||||
new FadeStep(8 - 1, 8 + 1, 0.7f, 0)
|
|
||||||
};
|
|
||||||
|
|
||||||
public static Builder<?> MAPQUEST_AERIAL = BitmapTileSource.builder()
|
|
||||||
.url("http://otile1.mqcdn.com/tiles/1.0.0/sat")
|
|
||||||
.tilePath("/{Z}/{X}/{Y}.jpg")
|
|
||||||
.fadeSteps(fadeSteps)
|
|
||||||
.zoomMax(8);
|
|
||||||
|
|
||||||
public static Builder<?> NE_LANDCOVER = BitmapTileSource.builder()
|
public static Builder<?> NE_LANDCOVER = BitmapTileSource.builder()
|
||||||
.url("http://opensciencemap.org/tiles/ne")
|
.url("http://opensciencemap.org/tiles/ne")
|
||||||
.fadeSteps(fadeSteps)
|
.fadeSteps(FADE_STEPS)
|
||||||
.zoomMax(8);
|
.zoomMax(8);
|
||||||
|
|
||||||
public static Builder<?> ARCGIS_RELIEF = BitmapTileSource.builder()
|
|
||||||
.url("http://server.arcgisonline.com/ArcGIS/rest/services" +
|
|
||||||
"/World_Shaded_Relief/MapServer/tile/")
|
|
||||||
.tilePath("{Z}/{Y}/{X}")
|
|
||||||
.zoomMax(13);
|
|
||||||
|
|
||||||
public static Builder<?> HD_HILLSHADE = BitmapTileSource.builder()
|
|
||||||
.url("http://korona.geog.uni-heidelberg.de/tiles/asterh/")
|
|
||||||
.tilePath("?x={X}&y={Y}&z={Z}")
|
|
||||||
.zoomMin(2)
|
|
||||||
.zoomMax(16);
|
|
||||||
|
|
||||||
public static Builder<?> HIKEBIKE = BitmapTileSource.builder()
|
public static Builder<?> HIKEBIKE = BitmapTileSource.builder()
|
||||||
.url("http://tiles.wmflabs.org/hikebike")
|
.url("http://tiles.wmflabs.org/hikebike")
|
||||||
.tilePath("/{Z}/{X}/{Y}.png")
|
.tilePath("/{Z}/{X}/{Y}.png")
|
||||||
@ -86,15 +69,4 @@ public class DefaultSources {
|
|||||||
.url("http://tiles.wmflabs.org/hillshading")
|
.url("http://tiles.wmflabs.org/hillshading")
|
||||||
.tilePath("/{Z}/{X}/{Y}.png")
|
.tilePath("/{Z}/{X}/{Y}.png")
|
||||||
.zoomMax(14);
|
.zoomMax(14);
|
||||||
|
|
||||||
/**
|
|
||||||
* https://github.com/opensciencemap/vtm/issues/18
|
|
||||||
* https://developers.google.com/maps/faq
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static Builder<?> GOOGLE_MAPS = BitmapTileSource.builder()
|
|
||||||
.url("INSERT URL")
|
|
||||||
.tilePath("/vt/x={X}&y={Y}&z={Z}&s=Galileo&scale=2")
|
|
||||||
.zoomMin(1)
|
|
||||||
.zoomMax(20);
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user