Android 9 compatibility, fix #550

This commit is contained in:
Emux 2018-06-10 16:00:50 +03:00
parent e6a90a8da5
commit 4ebca73023
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3
7 changed files with 24 additions and 25 deletions

View File

@ -29,6 +29,7 @@
- ViewController refactor [#523](https://github.com/mapsforge/vtm/pull/523) - ViewController refactor [#523](https://github.com/mapsforge/vtm/pull/523)
- `ViewController.setScreenSize` renamed to `setViewSize` - `ViewController.setScreenSize` renamed to `setViewSize`
- `ViewController.setMapScreenCenter` renamed to `setMapViewCenter` - `ViewController.setMapScreenCenter` renamed to `setMapViewCenter`
- Android 9 compatibility [#550](https://github.com/mapsforge/vtm/issues/550)
- JTS (LocationTech) [#484](https://github.com/mapsforge/vtm/issues/484) - JTS (LocationTech) [#484](https://github.com/mapsforge/vtm/issues/484)
- Many other minor improvements and bug fixes - Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.10.0) - [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.10.0)

View File

@ -15,6 +15,10 @@ implementation 'org.slf4j:slf4j-api:1.7.25'
### Android ### Android
```groovy ```groovy
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi'
@ -23,11 +27,15 @@ implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-mips'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-mips64' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-mips64'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86_64' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86_64'
implementation 'com.caverock:androidsvg:1.2.2-beta-1' implementation 'com.caverock:androidsvg:1.3-SNAPSHOT'
``` ```
### Android (libGDX) ### Android (libGDX)
```groovy ```groovy
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi' implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi'
@ -43,7 +51,7 @@ implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64' implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
implementation 'com.badlogicgames.gdx:gdx:1.9.8' implementation 'com.badlogicgames.gdx:gdx:1.9.8'
implementation 'com.badlogicgames.gdx:gdx-backend-android:1.9.8' implementation 'com.badlogicgames.gdx:gdx-backend-android:1.9.8'
implementation 'com.caverock:androidsvg:1.2.2-beta-1' implementation 'com.caverock:androidsvg:1.3-SNAPSHOT'
``` ```
### iOS ### iOS

View File

@ -12,7 +12,8 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"> android:label="@string/app_name"
android:usesCleartextTraffic="true">
<activity <activity
android:name=".Samples" android:name=".Samples"
android:configChanges="keyboardHidden|orientation|screenSize"> android:configChanges="keyboardHidden|orientation|screenSize">

View File

@ -3,7 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'
dependencies { dependencies {
api project(':vtm') api project(':vtm')
api 'com.caverock:androidsvg:1.2.2-beta-1' api 'com.caverock:androidsvg:1.3-SNAPSHOT'
} }
android { android {

View File

@ -15,7 +15,8 @@
android:name=".App" android:name=".App"
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/application_name"> android:label="@string/application_name"
android:usesCleartextTraffic="true">
<!-- android:theme="@style/Theme.TileMap" --> <!-- android:theme="@style/Theme.TileMap" -->
<activity <activity

View File

@ -100,12 +100,8 @@ class GwtMap extends GdxMap {
ts = DefaultSources.STAMEN_TONER.build(); ts = DefaultSources.STAMEN_TONER.build();
else if ("osm".equals(mapName)) else if ("osm".equals(mapName))
ts = DefaultSources.OPENSTREETMAP.build(); ts = DefaultSources.OPENSTREETMAP.build();
else if ("osm-transport".equals(mapName))
ts = DefaultSources.OSM_TRANSPORT.build();
else if ("watercolor".equals(mapName)) else if ("watercolor".equals(mapName))
ts = DefaultSources.STAMEN_WATERCOLOR.build(); ts = DefaultSources.STAMEN_WATERCOLOR.build();
else if ("imagico".equals(mapName))
ts = DefaultSources.IMAGICO_LANDCOVER.build();
else if ("ne-landcover".equals(mapName)) else if ("ne-landcover".equals(mapName))
ts = DefaultSources.NE_LANDCOVER.build(); ts = DefaultSources.NE_LANDCOVER.build();
else if ("hikebike".equals(mapName)) else if ("hikebike".equals(mapName))

View File

@ -1,6 +1,7 @@
/* /*
* Copyright 2013 Hannes Janetzek
* Copyright 2016 Andrey Novikov * Copyright 2016 Andrey Novikov
* Copyright 2016 devemux86 * Copyright 2016-2018 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).
* *
@ -28,45 +29,36 @@ public class DefaultSources {
private static final FadeStep[] FADE_STEPS = new FadeStep[]{ private static final FadeStep[] FADE_STEPS = new FadeStep[]{
new FadeStep(0, 8 - 1, 1, 0.7f), new FadeStep(0, 8 - 1, 1, 0.7f),
// dont fade between zoom-min/max // don't fade between zoom-min/max
// fade above zoom max + 2, interpolate 1 to 0 // fade above zoom max + 2, interpolate 1 to 0
new FadeStep(8 - 1, 8 + 1, 0.7f, 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("https://tile.openstreetmap.org")
.zoomMax(18);
public static Builder<?> OSM_TRANSPORT = BitmapTileSource.builder()
.url("http://a.tile.thunderforest.com/transport")
.zoomMax(18); .zoomMax(18);
public static Builder<?> STAMEN_TONER = BitmapTileSource.builder() public static Builder<?> STAMEN_TONER = BitmapTileSource.builder()
.url("http://a.tile.stamen.com/toner") .url("https://stamen-tiles.a.ssl.fastly.net/toner")
.zoomMax(18); .zoomMax(18);
public static Builder<?> STAMEN_WATERCOLOR = BitmapTileSource.builder() public static Builder<?> STAMEN_WATERCOLOR = BitmapTileSource.builder()
.url("http://a.tile.stamen.com/watercolor") .url("https://stamen-tiles.a.ssl.fastly.net/watercolor")
.tilePath("/{Z}/{X}/{Y}.jpg") .tilePath("/{Z}/{X}/{Y}.jpg")
.zoomMax(18); .zoomMax(18);
public static Builder<?> IMAGICO_LANDCOVER = BitmapTileSource.builder()
.url("http://www.imagico.de/map/tiles/landcover")
.tilePath("/{Z}/{X}/{Y}.jpg")
.zoomMax(6);
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(FADE_STEPS) .fadeSteps(FADE_STEPS)
.zoomMax(8); .zoomMax(8);
public static Builder<?> HIKEBIKE = BitmapTileSource.builder() public static Builder<?> HIKEBIKE = BitmapTileSource.builder()
.url("http://tiles.wmflabs.org/hikebike") .url("https://tiles.wmflabs.org/hikebike")
.tilePath("/{Z}/{X}/{Y}.png") .tilePath("/{Z}/{X}/{Y}.png")
.zoomMax(17); .zoomMax(17);
public static Builder<?> HIKEBIKE_HILLSHADE = BitmapTileSource.builder() public static Builder<?> HIKEBIKE_HILLSHADE = BitmapTileSource.builder()
.url("http://tiles.wmflabs.org/hillshading") .url("https://tiles.wmflabs.org/hillshading")
.tilePath("/{Z}/{X}/{Y}.png") .tilePath("/{Z}/{X}/{Y}.png")
.zoomMax(14); .zoomMax(14);
} }