Deprecate vtm-android-start module, closes #184
This commit is contained in:
@@ -6,7 +6,6 @@ include ':vtm-tests'
|
|||||||
include ':vtm-extras'
|
include ':vtm-extras'
|
||||||
include ':vtm-android'
|
include ':vtm-android'
|
||||||
include ':vtm-android-example'
|
include ':vtm-android-example'
|
||||||
include ':vtm-android-start'
|
|
||||||
include ':vtm-themes'
|
include ':vtm-themes'
|
||||||
include ':vtm-gdx'
|
include ':vtm-gdx'
|
||||||
include ':vtm-desktop'
|
include ':vtm-desktop'
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
package="org.oscim.android.start"
|
|
||||||
android:installLocation="auto"
|
|
||||||
android:versionCode="1"
|
|
||||||
android:versionName="1.0">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
|
|
||||||
<uses-sdk
|
|
||||||
android:minSdkVersion="10"
|
|
||||||
android:targetSdkVersion="22" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:allowBackup="true"
|
|
||||||
android:icon="@drawable/ic_launcher"
|
|
||||||
android:label="@string/app_name">
|
|
||||||
<activity
|
|
||||||
android:name=".TestActivity"
|
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
</application>
|
|
||||||
|
|
||||||
</manifest>
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
apply plugin: 'com.android.application'
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':vtm-android')
|
|
||||||
compile project(':vtm-themes')
|
|
||||||
compile 'com.noveogroup.android:android-logger:1.3.6'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion androidCompileSdk()
|
|
||||||
buildToolsVersion "$androidBuildVersionTools"
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
versionCode versionCode()
|
|
||||||
versionName versionName()
|
|
||||||
minSdkVersion androidMinSdk()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
|
||||||
java.srcDirs = ['src']
|
|
||||||
resources.srcDirs = ['src']
|
|
||||||
res.srcDirs = ['res']
|
|
||||||
assets.srcDirs = ['assets']
|
|
||||||
file("${rootDir}/vtm-android/natives").eachDir() { dir ->
|
|
||||||
jniLibs.srcDirs += "${dir.path}/lib"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
debug.setRoot('build-types/debug')
|
|
||||||
release.setRoot('build-types/release')
|
|
||||||
}
|
|
||||||
|
|
||||||
lintOptions { abortOnError false }
|
|
||||||
}
|
|
||||||
|
|
||||||
task run(dependsOn: 'installDebug') {
|
|
||||||
doFirst {
|
|
||||||
println(">> adb run <<")
|
|
||||||
String adb = System.getenv()['ANDROID_HOME'] + '/platform-tools/adb'
|
|
||||||
String cmd = "${adb} shell am start -n org.oscim.android.start/.TestActivity"
|
|
||||||
def proc = cmd.execute()
|
|
||||||
proc.in.eachLine { line -> println line }
|
|
||||||
proc.err.eachLine { line -> System.err.println('ERROR: ' + line) }
|
|
||||||
proc.waitFor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# This file is automatically generated by Android Tools.
|
|
||||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
|
||||||
#
|
|
||||||
# This file must be checked in Version Control Systems.
|
|
||||||
#
|
|
||||||
# To customize properties used by the Ant build system edit
|
|
||||||
# "ant.properties", and override values to adapt the script to your
|
|
||||||
# project structure.
|
|
||||||
#
|
|
||||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
|
||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
|
||||||
|
|
||||||
# Project target.
|
|
||||||
target=android-23
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
@@ -1,10 +0,0 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<org.oscim.android.MapView
|
|
||||||
android:id="@+id/mapView"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"></org.oscim.android.MapView>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<string name="app_name">VTM Start</string>
|
|
||||||
</resources>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
root=DEBUG:%logger
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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.android.start;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import org.oscim.android.MapPreferences;
|
|
||||||
import org.oscim.android.MapView;
|
|
||||||
import org.oscim.core.Tile;
|
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
|
||||||
import org.oscim.map.Map;
|
|
||||||
import org.oscim.theme.VtmThemes;
|
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
|
||||||
|
|
||||||
public class TestActivity extends Activity {
|
|
||||||
MapView mMapView;
|
|
||||||
MapPreferences mPrefs;
|
|
||||||
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
Tile.SIZE = Tile.calculateTileSize(getResources().getDisplayMetrics().scaledDensity);
|
|
||||||
setContentView(R.layout.activity_map);
|
|
||||||
|
|
||||||
mMapView = (MapView) findViewById(R.id.mapView);
|
|
||||||
Map map = mMapView.map();
|
|
||||||
mPrefs = new MapPreferences(TestActivity.class.getName(), this);
|
|
||||||
|
|
||||||
VectorTileLayer baseLayer = map.setBaseMap(new OSciMap4TileSource());
|
|
||||||
map.layers().add(new BuildingLayer(map, baseLayer));
|
|
||||||
map.layers().add(new LabelLayer(map, baseLayer));
|
|
||||||
map.layers().add(new TileGridLayer(map));
|
|
||||||
map.setTheme(VtmThemes.DEFAULT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
|
|
||||||
mPrefs.load(mMapView.map());
|
|
||||||
mMapView.onResume();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
|
|
||||||
mMapView.onPause();
|
|
||||||
mPrefs.save(mMapView.map());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user