move vtm-jeo-android to vtm-android-example
This commit is contained in:
parent
5f14a87abd
commit
04391815e4
@ -14,4 +14,3 @@ include ':vtm-web-js'
|
||||
include ':vtm-ios'
|
||||
include ':vtm-jeo'
|
||||
include ':vtm-jeo-desktop'
|
||||
include ':vtm-jeo-android'
|
||||
|
@ -62,6 +62,11 @@
|
||||
android:name="org.oscim.android.test.ThemeStylerActivity"
|
||||
android:label="@string/title_activity_map" >
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="org.oscim.android.test.JeoIndoorMapActivity"
|
||||
android:label="@string/title_activity_map" >
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -10,9 +10,8 @@ buildscript {
|
||||
apply plugin: 'android'
|
||||
|
||||
dependencies {
|
||||
//compile 'org.oscim:vtm-android:0.5.9-SNAPSHOT'
|
||||
//compile 'org.oscim:vtm-themes:0.5.9-SNAPSHOT'
|
||||
compile project(':vtm-android')
|
||||
compile project(':vtm-jeo')
|
||||
compile project(':vtm-themes')
|
||||
}
|
||||
|
||||
@ -32,6 +31,9 @@ android {
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'META-INF/services/org.jeo.data.Driver'
|
||||
}
|
||||
}
|
||||
|
||||
// Including configurations into Eclipse
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.oscim.jeo.android;
|
||||
package org.oscim.android.test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -8,15 +8,11 @@ import java.util.Arrays;
|
||||
|
||||
import org.jeo.data.VectorDataset;
|
||||
import org.jeo.map.Style;
|
||||
import org.oscim.android.MapActivity;
|
||||
import org.oscim.layers.OSMIndoorLayer;
|
||||
import org.oscim.layers.tile.vector.BuildingLayer;
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||
import org.oscim.renderer.MapRenderer;
|
||||
import org.oscim.test.JeoTest;
|
||||
import org.oscim.theme.VtmThemes;
|
||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||
import org.oscim.utils.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -27,8 +23,8 @@ import android.view.View;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
public class TestActivity extends MapActivity {
|
||||
public static final Logger log = LoggerFactory.getLogger(TestActivity.class);
|
||||
public class JeoIndoorMapActivity extends BaseMapActivity {
|
||||
public static final Logger log = LoggerFactory.getLogger(JeoIndoorMapActivity.class);
|
||||
|
||||
// from http://overpass-turbo.eu/s/2vp
|
||||
String PATH = "https://gist.github.com/anonymous/8960337/raw/overpass.geojson";
|
||||
@ -36,12 +32,13 @@ public class TestActivity extends MapActivity {
|
||||
|
||||
private OSMIndoorLayer mIndoorLayer;
|
||||
|
||||
public JeoIndoorMapActivity() {
|
||||
super(R.layout.jeo_indoor_map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_map);
|
||||
|
||||
MapRenderer.setBackgroundColor(0xff909090);
|
||||
|
||||
mMap.addTask(new Runnable() {
|
||||
@Override
|
||||
@ -49,9 +46,9 @@ public class TestActivity extends MapActivity {
|
||||
showToast("load data");
|
||||
InputStream is = null;
|
||||
try {
|
||||
//File file = new File(Environment.getExternalStorageDirectory()
|
||||
// File file = new File(Environment.getExternalStorageDirectory()
|
||||
// .getAbsolutePath(), "osmindoor.json");
|
||||
//is = new FileInputStream(file);
|
||||
// is = new FileInputStream(file);
|
||||
|
||||
URL url = new URL(PATH);
|
||||
URLConnection conn = url.openConnection();
|
||||
@ -65,10 +62,9 @@ public class TestActivity extends MapActivity {
|
||||
}
|
||||
});
|
||||
|
||||
VectorTileLayer baseLayer = mMap.setBaseMap(new OSciMap4TileSource());
|
||||
mMap.layers().add(new BuildingLayer(mMap, baseLayer));
|
||||
mMap.layers().add(new LabelLayer(mMap, baseLayer));
|
||||
mMap.setTheme(VtmThemes.NEWTRON);
|
||||
mMap.layers().add(new BuildingLayer(mMap, mBaseLayer));
|
||||
mMap.layers().add(new LabelLayer(mMap, mBaseLayer));
|
||||
mMap.setTheme(VtmThemes.TRONRENDER);
|
||||
|
||||
//mMap.setMapPosition(49.417, 8.673, 1 << 17);
|
||||
mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
|
@ -47,6 +47,7 @@ public class Samples extends Activity {
|
||||
linearLayout.addView(createButton(MarkerOverlayActivity.class));
|
||||
linearLayout.addView(createButton(ThemeStylerActivity.class));
|
||||
linearLayout.addView(createButton(S3DBMapActivity.class));
|
||||
linearLayout.addView(createButton(JeoIndoorMapActivity.class));
|
||||
}
|
||||
|
||||
private Button createButton(final Class<?> clazz) {
|
||||
|
@ -1,30 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.oscim.jeo.android"
|
||||
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="19" />
|
||||
|
||||
<application
|
||||
android:label="JeoMap"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||
<activity
|
||||
android:name=".TestActivity"
|
||||
android:label="JeoMap" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -1,91 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.8.+'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android'
|
||||
|
||||
dependencies {
|
||||
compile project(':vtm-jeo')
|
||||
compile project(':vtm-android')
|
||||
compile project(':vtm-themes')
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion '19.0.1'
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['src', 'assets']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
//exclude 'META-INF/**/*'
|
||||
exclude 'META-INF/services/org.jeo.data.Driver'
|
||||
}
|
||||
// ignore deprecated
|
||||
lintOptions.abortOnError false
|
||||
}
|
||||
|
||||
// Including configurations into Eclipse
|
||||
eclipse {
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
// Configuring Eclipse classpath
|
||||
classpath {
|
||||
plusConfigurations += configurations.compile
|
||||
|
||||
defaultOutputDir = file('bin/classes')
|
||||
|
||||
file {
|
||||
// Direct manipulation of the generated classpath XML
|
||||
withXml {
|
||||
def node = it.asNode()
|
||||
node.appendNode('classpathentry kind="src" path="src"')
|
||||
node.appendNode('classpathentry kind="src" path="gen"')
|
||||
}
|
||||
|
||||
// whenMerged { classpath ->
|
||||
// classpath.entries.removeAll { entry ->
|
||||
// entry.path.contains('vtm-android-0.5.9') }
|
||||
// classpath.entries.removeAll { entry ->
|
||||
// entry.path.contains('vtm-0.5.9') }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
project {
|
||||
natures = ['com.android.ide.eclipse.adt.AndroidNature',
|
||||
'org.eclipse.jdt.core.javanature']
|
||||
|
||||
buildCommand 'com.android.ide.eclipse.adt.ResourceManagerBuilder'
|
||||
buildCommand 'com.android.ide.eclipse.adt.PreCompilerBuilder'
|
||||
buildCommand 'com.android.ide.eclipse.adt.ApkBuilder'
|
||||
}
|
||||
}
|
||||
|
||||
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.jeo.android/.TestActivity"
|
||||
def proc = cmd.execute()
|
||||
proc.in.eachLine {line -> println line}
|
||||
proc.err.eachLine {line -> System.err.println( 'ERROR: ' + line)}
|
||||
proc.waitFor()
|
||||
}
|
||||
}
|
@ -1,15 +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-19
|
||||
android.library.reference.1=../../vtm-android
|
Binary file not shown.
Before Width: | Height: | Size: 41 KiB |
Loading…
x
Reference in New Issue
Block a user