Mapilion: more hillshading options #614
This commit is contained in:
parent
8c2f788069
commit
ef87bae51f
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 devemux86
|
* Copyright 2018-2019 devemux86
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* 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
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@ -59,7 +59,7 @@ public class MapilionMvtActivity extends MapActivity {
|
|||||||
mMap.setTheme(VtmThemes.OPENMAPTILES);
|
mMap.setTheme(VtmThemes.OPENMAPTILES);
|
||||||
|
|
||||||
// Hillshading
|
// Hillshading
|
||||||
UrlTileSource shadedTileSource = DefaultSources.MAPILION_HILLSHADE
|
UrlTileSource shadedTileSource = DefaultSources.MAPILION_HILLSHADE_2
|
||||||
.apiKey(API_KEY)
|
.apiKey(API_KEY)
|
||||||
.httpFactory(factory)
|
.httpFactory(factory)
|
||||||
.build();
|
.build();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 devemux86
|
* Copyright 2018-2019 devemux86
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* 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
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@ -61,7 +61,7 @@ public class MapilionMvtTest extends GdxMapApp {
|
|||||||
mMap.setTheme(VtmThemes.OPENMAPTILES);
|
mMap.setTheme(VtmThemes.OPENMAPTILES);
|
||||||
|
|
||||||
// Hillshading
|
// Hillshading
|
||||||
UrlTileSource shadedTileSource = DefaultSources.MAPILION_HILLSHADE
|
UrlTileSource shadedTileSource = DefaultSources.MAPILION_HILLSHADE_2
|
||||||
.apiKey(API_KEY)
|
.apiKey(API_KEY)
|
||||||
.httpFactory(factory)
|
.httpFactory(factory)
|
||||||
.build();
|
.build();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016 Andrey Novikov
|
* Copyright 2016 Andrey Novikov
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 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).
|
||||||
*
|
*
|
||||||
@ -19,6 +19,7 @@
|
|||||||
package org.oscim.tiling.source.bitmap;
|
package org.oscim.tiling.source.bitmap;
|
||||||
|
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer.FadeStep;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer.FadeStep;
|
||||||
|
import org.oscim.map.Viewport;
|
||||||
import org.oscim.tiling.source.bitmap.BitmapTileSource.Builder;
|
import org.oscim.tiling.source.bitmap.BitmapTileSource.Builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,9 +64,18 @@ public class DefaultSources {
|
|||||||
.zoomMax(14);
|
.zoomMax(14);
|
||||||
|
|
||||||
// Needs an API key
|
// Needs an API key
|
||||||
public static Builder<?> MAPILION_HILLSHADE = BitmapTileSource.builder()
|
public static Builder<?> MAPILION_HILLSHADE_1 = BitmapTileSource.builder()
|
||||||
.url("https://tiles.mapilion.com/hillshades")
|
.url("https://tiles.mapilion.com/hillshades/v1")
|
||||||
.tilePath("/{Z}/{X}/{Y}.png")
|
.tilePath("/{Z}/{X}/{Y}.png")
|
||||||
.zoomMin(1)
|
.zoomMin(1)
|
||||||
.zoomMax(12);
|
.zoomMax(12);
|
||||||
|
|
||||||
|
// Needs an API key
|
||||||
|
public static Builder<?> MAPILION_HILLSHADE_2 = BitmapTileSource.builder()
|
||||||
|
.url("https://tiles.mapilion.com/hillshades/v2")
|
||||||
|
.tilePath("/{Z}/{X}/{Y}.png")
|
||||||
|
.fadeSteps(new FadeStep[]{
|
||||||
|
new FadeStep(0, Viewport.MAX_ZOOM_LEVEL, 1, 0.2f)
|
||||||
|
})
|
||||||
|
.zoomMax(12);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user