Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5f77157c9 | ||
|
|
8e0d467ceb | ||
|
|
044c8ce74f | ||
|
|
87dc04251d | ||
|
|
0a2f47ee57 | ||
|
|
172664c55b | ||
|
|
cd90e95a4a | ||
|
|
b3f18a92d2 | ||
|
|
774ceced8b | ||
|
|
2ea8e006a3 | ||
|
|
f04b8d36f8 | ||
|
|
37363b31da | ||
|
|
44a1756229 | ||
|
|
a184e25348 | ||
|
|
6f64e97faf | ||
|
|
30ad6f1cef | ||
|
|
bd965750a9 | ||
|
|
f076544993 | ||
|
|
bb03b40075 | ||
|
|
634a2e5c0d | ||
|
|
c3203b3cb4 | ||
|
|
a82275315c | ||
|
|
12a58e5827 | ||
|
|
9895921a5c | ||
|
|
ba8b800ee0 | ||
|
|
8be9211ed6 | ||
|
|
b8983007d2 | ||
|
|
bd24ba12d5 | ||
|
|
5de7070f15 | ||
|
|
e2c901d1e5 | ||
|
|
156fda15cd | ||
|
|
425e5dac61 | ||
|
|
8f15859f9b | ||
|
|
6d29d11499 | ||
|
|
6da37d481d | ||
|
|
62015eee0b |
32
.github/workflows/android.yml
vendored
Normal file
32
.github/workflows/android.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Android CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: set up JDK 11
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: '11'
|
||||||
|
distribution: 'adopt'
|
||||||
|
cache: gradle
|
||||||
|
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
|
- name: Build with Gradle
|
||||||
|
run: ./gradlew build
|
||||||
|
- name: Publish
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
env:
|
||||||
|
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
|
||||||
|
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
|
||||||
|
run: ./gradlew -PSONATYPE_USERNAME="$SONATYPE_USERNAME" -PSONATYPE_PASSWORD="$SONATYPE_PASSWORD" publish
|
||||||
32
.travis.yml
32
.travis.yml
@@ -1,32 +0,0 @@
|
|||||||
sudo: false
|
|
||||||
language: android
|
|
||||||
jdk:
|
|
||||||
- openjdk8
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- ANDROID=30
|
|
||||||
- ANDROID_BUILD_TOOLS=30.0.3
|
|
||||||
- GRADLE_OPTS="-Xmx2048m"
|
|
||||||
- secure: sW674wuFZOuoX7jHQHDbX3j8NxL8JxR07cyq+CrrqJ537dU9lxWQmMBRUpOb+p/q7sQ74PUtiKJkmFgKCSJSAKY+nr6GJ8P/q6u5TUKbmUWODSn8znehX2zualfvFwpF4PILok/wUzXBQE62jn4lUua7cMdsHRMNHbLmKqBoVL0meObDDjsaJ/RCbOPuruy3FmgvXPp0+Y4zl1GsklDSyjFzg4LBzjAk9Ryvh1O4zvJBkkyfCgurLKCnOKIPy3v5fPMS9oDfO1aarAVGoZZe416pvTW4hb8cdB6kn9XWYDob4NDFX/sP5k7XIhd/NAIn9LrKFg0sLtATaKLX+BcasF1CgDR/u6+SEeQd5QaRF7Go2Nq5Ltuu4OIFONI2qhEeVDDK6Otf2WSWj9KPno2GHuumBfbg4ypWoJgmZrMXk8JeVV/OP/0jIQz3p/7yfF21X1XBEqYaVHPAMKdEYYkCSa46KfACyOt6LfnkuCHtoTOpFo7sq0omIA2HOtpIx1u3vMBUyAbQqT6cokkKB1b6gNTFwhHc+8ybfLFPljJB8cWshI+V/b06S6fekRmvTNxvDykWNsdlkENBYqc9hMfjcT4hO4K+76SWN62mimQYODvFyfTVMC7WkQ3k/XEnmqUPV5XkbaILbS1d/tA57N148FiJ5/QXtI6Y94imubYyVqU=
|
|
||||||
- secure: AdKSZKA4gMuKXI4X4dQNJqcMv5OmPIHdN8fpy55Y9yoOQPQHZE3Zwc4QDWBh20q298jyEC854tVTPTysdZ7h+2s2FhsprYv1Bt/QNzKIrLpeIMj2quuVGMbdPuk08y55gost94KwVLJv0sIDpRlB/PEQkA7Mg/UDsT9zR8E1Ms5x+ul2C8e1ag0zzNl1wVnT5jY8WCp74uA/XXCcJl/80qT1stUERazCKwbKNo007hi7rdm4HA7YGevORq8e2r67je+WIBZUAwrHT0Zjuo4ibwUii4LdwvjuN3w0Z6e9Wf4x5bBqGgnih0T31uom2yPjNx+U/c2AWI+Nxfy/SEF2U+9bjBEZ3ZhI7F1B9ofXo2mhvvsVDiUrymMBbG2V64C9kAzeUh7xIBTqIrbdtpAEBV9FlLAtF2swVTwtCgZgcVTOt3RKXCi3X3nk3cuH7PAorFa/QGfT4xxVu2011FVAt2Rm7SD0ZWztZTSTz/4Nt/egtGBOJfrCc7oLEygLzDmLqsqCwCROITVQjWLjrtqDyLteaNiSXeNIQMKun3izApbXnHmXB+FV3R3EZocboqk3v5bmPTahnG6Ghc2zknWyyxSx+O9qIfOpHUL8JMJiT82lUQUeibtCn7DCE8wVQ/gYC5i+a+KO/d3NemSzIFlZ8aoUiEPYq18dYlsDXeLXwF0=
|
|
||||||
android:
|
|
||||||
components:
|
|
||||||
- tools
|
|
||||||
- platform-tools
|
|
||||||
- tools
|
|
||||||
- build-tools-$ANDROID_BUILD_TOOLS
|
|
||||||
- android-$ANDROID
|
|
||||||
before_install:
|
|
||||||
- yes | sdkmanager "platforms;android-$ANDROID"
|
|
||||||
script:
|
|
||||||
- ./gradlew clean build
|
|
||||||
after_success:
|
|
||||||
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
|
||||||
./gradlew uploadArchives -PSONATYPE_USERNAME="${SONATYPE_USERNAME}" -PSONATYPE_PASSWORD="${SONATYPE_PASSWORD}";
|
|
||||||
fi
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
recipients:
|
|
||||||
- secure: fOInp4SGBqiIMgnsGceQTa0SuFLaAoxAF15W0crhuljGlqSgnbnBjh0xFEF4P5+q3VT3DgDZs53GVVo6S9gEl8AWJy84KGuUX1M/CQKUQC4bwNXJdHfY3MIy6D50da6UfwWeNS4ienKh2Rj6w2TapN9M8C9nJJZk9aJFc9NWZmWTVboHZd4oUDeeRBJ6KSk1Ay7L/mmxv4cMCXaW7pPJixvUFESKNYgK4KAN3zYpym2UijrQ8zf7OVcYnTorcAuXUZDk8EvwdHl3rIAdlbVqvyZ8rmoQ2Da/Q2VlWUL/HrHUVJtCPZ+T+dNUag4a8joIDqWKwcyk76PElmgft3azb7GERb+bkZz1ToQc2IvuOeUk2SsuXWZugoEQImKWl/yWeirWBLrwzieaVh4j04dMSn/Npc1yL5kjX9EuiM6MFHdYPianMpvhFiaYKihjzW0GPV6sfuY7xS8cA9L9DjAsXoHIXIxc/+hRA+bpPUl+qMaQdGjJmNJJ2VPFnOY0XCsDDQDIVa3nZOA6aXMUG2c4H26RJZPe7uvfRiuL86n3KAmkoXSwne9t8WYMgl89LMsU5XxjBvwz2Qa1HqG09tVs6nhB23easrhEYEf/ZsGg0DIIL1FImUHj+wUUfZXeyFmbiE6lD/i2+3a5DqzZGHbXUDCoUIagObMf8fe2z5+0K/Q=
|
|
||||||
on_success: always
|
|
||||||
on_failure: always
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
[](https://search.maven.org/search?q=g:org.mapsforge)
|
[](https://search.maven.org/search?q=g:org.mapsforge)
|
||||||
[](https://travis-ci.org/mapsforge/vtm)
|
|
||||||
[](http://www.gnu.org/licenses/lgpl-3.0)
|
[](http://www.gnu.org/licenses/lgpl-3.0)
|
||||||
|
|
||||||
# V™
|
# V™
|
||||||
|
|||||||
11
build.gradle
11
build.gradle
@@ -4,17 +4,14 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
classpath 'com.android.tools.build:gradle:7.0.4'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = 'org.mapsforge'
|
group = 'org.mapsforge'
|
||||||
version = 'master-SNAPSHOT'
|
version = 'master-SNAPSHOT'
|
||||||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
|
||||||
|
|
||||||
ext.androidBuildVersionTools = "30.0.3"
|
|
||||||
ext.gdxVersion = "1.9.10"
|
ext.gdxVersion = "1.9.10"
|
||||||
ext.gwtVersion = "2.8.2"
|
ext.gwtVersion = "2.8.2"
|
||||||
ext.slf4jVersion = "1.7.28"
|
ext.slf4jVersion = "1.7.28"
|
||||||
@@ -28,12 +25,12 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static def androidCompileSdk() { return 30 }
|
static def androidCompileSdk() { return 31 }
|
||||||
|
|
||||||
// 14 for Support Library, 16 for sqlite-android
|
// 14 for Support Library, 16 for sqlite-android
|
||||||
static def androidMinSdk() { return 16 }
|
static def androidMinSdk() { return 21 }
|
||||||
|
|
||||||
static def androidTargetSdk() { return 30 }
|
static def androidTargetSdk() { return 31 }
|
||||||
|
|
||||||
static def versionCode() { return 1 }
|
static def versionCode() { return 1 }
|
||||||
|
|
||||||
|
|||||||
111
deploy.gradle
111
deploy.gradle
@@ -1,84 +1,63 @@
|
|||||||
apply plugin: 'signing'
|
apply plugin: 'signing'
|
||||||
|
|
||||||
if (project.hasProperty("android")) {
|
java {
|
||||||
task sourcesJar(type: Jar) {
|
withJavadocJar()
|
||||||
classifier = 'sources'
|
withSourcesJar()
|
||||||
from android.sourceSets.main.java.srcDirs
|
|
||||||
}
|
|
||||||
|
|
||||||
task javadoc(type: Javadoc) {
|
|
||||||
source = android.sourceSets.main.java.srcDirs
|
|
||||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
|
||||||
classpath += project.android.libraryVariants.toList().first().javaCompileProvider.get().classpath
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
task sourcesJar(type: Jar) {
|
|
||||||
classifier = 'sources'
|
|
||||||
from sourceSets.main.allSource
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
publishing {
|
||||||
classifier = 'javadoc'
|
publications {
|
||||||
from javadoc.destinationDir
|
maven(MavenPublication) {
|
||||||
}
|
pom {
|
||||||
|
name = 'VTM'
|
||||||
artifacts {
|
description = 'OpenGL vector map library - running on Android, iOS, Desktop and browser.'
|
||||||
archives javadocJar
|
url = 'https://github.com/mapsforge/vtm'
|
||||||
archives sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
signing {
|
|
||||||
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
|
|
||||||
sign configurations.archives
|
|
||||||
}
|
|
||||||
|
|
||||||
uploadArchives {
|
|
||||||
repositories {
|
|
||||||
mavenDeployer {
|
|
||||||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
||||||
|
|
||||||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
||||||
authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD)
|
|
||||||
}
|
|
||||||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
||||||
authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD)
|
|
||||||
}
|
|
||||||
|
|
||||||
pom.project {
|
|
||||||
packaging 'jar'
|
|
||||||
|
|
||||||
name 'vtm'
|
|
||||||
description 'OpenGL vector map library written in Java - running on Android, iOS, Desktop and within the browser.'
|
|
||||||
url 'https://github.com/mapsforge/vtm'
|
|
||||||
|
|
||||||
licenses {
|
licenses {
|
||||||
license {
|
license {
|
||||||
name 'GNU Lesser GPL'
|
name = 'GNU Lesser GPL'
|
||||||
url 'http://www.gnu.org/licenses/lgpl.html'
|
url = 'https://www.gnu.org/licenses/lgpl.html'
|
||||||
distribution 'repo'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scm {
|
|
||||||
connection 'scm:git:https://github.com/mapsforge/vtm'
|
|
||||||
developerConnection 'scm:git:https://github.com/mapsforge/vtm'
|
|
||||||
url 'https://github.com/mapsforge/vtm'
|
|
||||||
}
|
|
||||||
|
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
id 'hannes.janetzek'
|
id = 'hannes.janetzek'
|
||||||
name 'Hannes Janetzek'
|
name = 'Hannes Janetzek'
|
||||||
email 'hannes.janetzek@gmail.com'
|
email = 'hannes.janetzek@gmail.com'
|
||||||
}
|
}
|
||||||
developer {
|
developer {
|
||||||
id 'devemux86'
|
id = 'devemux86'
|
||||||
name 'Emux'
|
name = 'Emux'
|
||||||
email 'devemux86@gmail.com'
|
email = 'devemux86@gmail.com'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
scm {
|
||||||
|
connection = 'scm:git:https://github.com/mapsforge/vtm'
|
||||||
|
developerConnection = 'scm:git:https://github.com/mapsforge/vtm'
|
||||||
|
url = 'https://github.com/mapsforge/vtm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
|
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
|
||||||
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
||||||
|
credentials {
|
||||||
|
username = SONATYPE_USERNAME
|
||||||
|
password = SONATYPE_PASSWORD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
required { !version.endsWith('SNAPSHOT') }
|
||||||
|
sign publishing.publications.maven
|
||||||
|
}
|
||||||
|
|
||||||
|
javadoc {
|
||||||
|
if (JavaVersion.current().isJava9Compatible()) {
|
||||||
|
options.addBooleanOption('html5', true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,19 +4,19 @@
|
|||||||
|--------|--------|----------------|-------------|-----------|
|
|--------|--------|----------------|-------------|-----------|
|
||||||
| [AdvRider WD](https://play.google.com/store/apps/details?id=com.abware.watchdog_client) | Tool-set for the adventure rider | Proprietary/Free | Android | Closed |
|
| [AdvRider WD](https://play.google.com/store/apps/details?id=com.abware.watchdog_client) | Tool-set for the adventure rider | Proprietary/Free | Android | Closed |
|
||||||
| [Cachebox 3.0](https://github.com/Longri/cachebox3.0) | Geocaching application | Apache 2.0/Free | Android, Desktop, iOS | Open |
|
| [Cachebox 3.0](https://github.com/Longri/cachebox3.0) | Geocaching application | Apache 2.0/Free | Android, Desktop, iOS | Open |
|
||||||
| [Cruiser](http://wiki.openstreetmap.org/wiki/Cruiser) | Map and navigation application | Proprietary/Free | Android, Desktop | Closed |
|
| [Cruiser](https://wiki.openstreetmap.org/wiki/Cruiser) | Map and navigation platform | Proprietary/Free | Android, Desktop | Closed |
|
||||||
| [GCDroid](https://play.google.com/store/apps/details?id=com.gcdroid) | Geocaching App | Proprietary/Free and Commercial | Android | Closed |
|
| [GCDroid](https://play.google.com/store/apps/details?id=com.gcdroid) | Geocaching App | Proprietary/Free and Commercial | Android | Closed |
|
||||||
| [GPSLogger II](https://play.google.com/store/apps/details?id=com.emacberry.gpslogger) | Map and navigation, Fitness & Cycling application | Proprietary/Free | Android | Closed |
|
| [GPSLogger II](https://play.google.com/store/apps/details?id=com.emacberry.gpslogger) | Map and navigation, Fitness & Cycling application | Proprietary/Free | Android | Closed |
|
||||||
| [HabanaTrans](https://play.google.com/store/apps/details?id=cu.pabloapk.habanatrans&hl=es_419) | Public transport, map offline, gps, routing | Proprietary/Free | Android | Closed |
|
| [HabanaTrans](https://play.google.com/store/apps/details?id=cu.pabloapk.habanatrans&hl=es_419) | Public transport, map offline, gps, routing | Proprietary/Free | Android | Closed |
|
||||||
| [Hunt Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application for hunters | Proprietary/Free and Commercial | Android | Closed |
|
| [Hunt Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application for hunters | Proprietary/Free and Commercial | Android | Closed |
|
||||||
| [Kurviger](https://kurviger.de/en) | Route planner specialized on motorcyclists | Proprietary/Free (in-app purchases) | Android | Closed |
|
| [Kurviger](https://play.google.com/store/apps/details?id=gr.talent.kurviger) | Route planner specialized on motorcyclists | Proprietary/Free (in-app purchases) | Android | Closed |
|
||||||
| [MapTrek](http://maptrek.mobi) | Application for outdoor activities | GPL3/Free and Commercial | Android | Open |
|
|
||||||
| [MyRunningApp](https://play.google.com/store/apps/details?id=it.nimarsolutions.rungpstracker) | Fitness app | Proprietary/Free | Android | Closed |
|
| [MyRunningApp](https://play.google.com/store/apps/details?id=it.nimarsolutions.rungpstracker) | Fitness app | Proprietary/Free | Android | Closed |
|
||||||
| [MyTourbook](http://mytourbook.sourceforge.net/mytourbook/) | Visualize and analyze tours | GPL2/Free | Desktop | Open |
|
| [MyTourbook](http://mytourbook.sourceforge.net/mytourbook/) | Visualize and analyze tours | GPL2/Free | Desktop | Open |
|
||||||
| [Navi Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application | Proprietary/Free and Commercial | Android | Closed |
|
| [Navi Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application | Proprietary/Free and Commercial | Android | Closed |
|
||||||
| [Pocket Maps](https://github.com/junjunguo/PocketMaps) | Offline maps, routing & tracking functions | MIT/Free | Android | Open |
|
| [Pocket Maps](https://github.com/junjunguo/PocketMaps) | Offline maps, routing & tracking functions | MIT/Free | Android | Open |
|
||||||
| Tokyo Ogiqvo | Visualize App | Commercial | [Android](https://play.google.com/store/apps/details?id=com.ogiqvo.view.tokyo&hl=ja), [iOS](https://itunes.apple.com/us/app/tokyo-ogiqvo/id1097100677?mt=8) | Closed |
|
| Tokyo Ogiqvo | Visualize App | Commercial | [Android](https://play.google.com/store/apps/details?id=com.ogiqvo.view.tokyo&hl=ja), [iOS](https://itunes.apple.com/us/app/tokyo-ogiqvo/id1097100677?mt=8) | Closed |
|
||||||
| [topoGuide](http://www.topoguide.gr/index-en.php) | Digital guides for the outdoor | Proprietary/Free and Commercial | Android | Closed |
|
| [topoGuide](http://www.topoguide.gr/index-en.php) | Digital guides for the outdoor | Proprietary/Free and Commercial | Android | Closed |
|
||||||
|
| [Trekarta](https://github.com/andreynovikov/trekarta) | Application for outdoor activities | GPL3/Free and Commercial | Android | Open |
|
||||||
| [Ubitrek](https://play.google.com/store/apps/details?id=ubicarta.ubitrek) | Hiking with IGN maps | Proprietary/Free | Android | Closed |
|
| [Ubitrek](https://play.google.com/store/apps/details?id=ubicarta.ubitrek) | Hiking with IGN maps | Proprietary/Free | Android | Closed |
|
||||||
| [VTM with Eclipse RCP](https://github.com/wolfgang-ch/vtm-with-rcp) | VTM with an Eclipse RCP application | GPL3/Free | Desktop | Open |
|
| [VTM with Eclipse RCP](https://github.com/wolfgang-ch/vtm-with-rcp) | VTM with an Eclipse RCP application | GPL3/Free | Desktop | Open |
|
||||||
| [Walkaholic](https://play.google.com/store/apps/details?id=com.walkaholic.hikeapp) | Hiking app with official routes and online/offline maps | Proprietary/Free (in-app purchases) | Android | Closed |
|
| [Walkaholic](https://play.google.com/store/apps/details?id=com.walkaholic.hikeapp) | Hiking app with official routes and online/offline maps | Proprietary/Free (in-app purchases) | Android | Closed |
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## New since 0.16.0
|
## New since 0.17.0
|
||||||
|
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.18.0)
|
||||||
|
|
||||||
|
## Version 0.17.0 (2022-01-03)
|
||||||
|
|
||||||
|
- Drawable style point reduction option [#862](https://github.com/mapsforge/vtm/pull/862)
|
||||||
|
- Drawable style texture repeat option [#862](https://github.com/mapsforge/vtm/pull/862)
|
||||||
|
- Draggable marker Android sample [#869](https://github.com/mapsforge/vtm/pull/869)
|
||||||
|
- Move cluster experiment in samples [#858](https://github.com/mapsforge/vtm/pull/858)
|
||||||
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.17.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.17.0)
|
||||||
|
|
||||||
## Version 0.16.0 (2021-05-27)
|
## Version 0.16.0 (2021-05-27)
|
||||||
@@ -13,7 +22,7 @@
|
|||||||
- Nautical unit adapter with feet [#803](https://github.com/mapsforge/vtm/pull/803)
|
- Nautical unit adapter with feet [#803](https://github.com/mapsforge/vtm/pull/803)
|
||||||
- Distant labels rendering option [#844](https://github.com/mapsforge/vtm/pull/844)
|
- Distant labels rendering option [#844](https://github.com/mapsforge/vtm/pull/844)
|
||||||
- `Parameters.DISTANT_LABELS`
|
- `Parameters.DISTANT_LABELS`
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.16.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.16.0)
|
||||||
|
|
||||||
## Version 0.15.0 (2021-01-01)
|
## Version 0.15.0 (2021-01-01)
|
||||||
@@ -24,7 +33,7 @@
|
|||||||
- Render theme xml pull parser [#786](https://github.com/mapsforge/vtm/pull/786)
|
- Render theme xml pull parser [#786](https://github.com/mapsforge/vtm/pull/786)
|
||||||
- Symbol scale option [#790](https://github.com/mapsforge/vtm/pull/790)
|
- Symbol scale option [#790](https://github.com/mapsforge/vtm/pull/790)
|
||||||
- `Parameters.SYMBOL_SCALING`
|
- `Parameters.SYMBOL_SCALING`
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.15.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.15.0)
|
||||||
|
|
||||||
## Version 0.14.0 (2020-08-25)
|
## Version 0.14.0 (2020-08-25)
|
||||||
@@ -34,7 +43,7 @@
|
|||||||
- Marker renderer sort option
|
- Marker renderer sort option
|
||||||
- `Parameters.MARKER_SORT`
|
- `Parameters.MARKER_SORT`
|
||||||
- Update vtm-jeo module [#770](https://github.com/mapsforge/vtm/pull/770)
|
- Update vtm-jeo module [#770](https://github.com/mapsforge/vtm/pull/770)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.14.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.14.0)
|
||||||
|
|
||||||
## Version 0.13.0 (2020-01-12)
|
## Version 0.13.0 (2020-01-12)
|
||||||
@@ -49,7 +58,7 @@
|
|||||||
- `MapView.OPENGL_VERSION`
|
- `MapView.OPENGL_VERSION`
|
||||||
- Android: threaded system initialization
|
- Android: threaded system initialization
|
||||||
- `Parameters.THREADED_INIT`
|
- `Parameters.THREADED_INIT`
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.13.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.13.0)
|
||||||
|
|
||||||
## Version 0.12.0 (2019-09-17)
|
## Version 0.12.0 (2019-09-17)
|
||||||
@@ -66,14 +75,14 @@
|
|||||||
- `Parameters.POLY_LABEL`
|
- `Parameters.POLY_LABEL`
|
||||||
- Android 10 compatibility [#728](https://github.com/mapsforge/vtm/issues/728)
|
- Android 10 compatibility [#728](https://github.com/mapsforge/vtm/issues/728)
|
||||||
- libGDX 1.9.10 [#731](https://github.com/mapsforge/vtm/issues/731)
|
- libGDX 1.9.10 [#731](https://github.com/mapsforge/vtm/issues/731)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.12.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.12.0)
|
||||||
|
|
||||||
## Version 0.11.1 (2019-04-12)
|
## Version 0.11.1 (2019-04-12)
|
||||||
|
|
||||||
- MBTiles raster tile source (Android) [#708](https://github.com/mapsforge/vtm/pull/708)
|
- MBTiles raster tile source (Android) [#708](https://github.com/mapsforge/vtm/pull/708)
|
||||||
- Fix Android 4.2 crash [#713](https://github.com/mapsforge/vtm/issues/713)
|
- Fix Android 4.2 crash [#713](https://github.com/mapsforge/vtm/issues/713)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.11.1)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.11.1)
|
||||||
|
|
||||||
## Version 0.11.0 (2019-03-25)
|
## Version 0.11.0 (2019-03-25)
|
||||||
@@ -99,7 +108,7 @@
|
|||||||
- OpenGL ES 3.0 support [#646](https://github.com/mapsforge/vtm/issues/646)
|
- OpenGL ES 3.0 support [#646](https://github.com/mapsforge/vtm/issues/646)
|
||||||
- OpenGL ES 2.0 complete [#642](https://github.com/mapsforge/vtm/pull/642)
|
- OpenGL ES 2.0 complete [#642](https://github.com/mapsforge/vtm/pull/642)
|
||||||
- libGDX 1.9.9 [#635](https://github.com/mapsforge/vtm/issues/635)
|
- libGDX 1.9.9 [#635](https://github.com/mapsforge/vtm/issues/635)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.11.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.11.0)
|
||||||
|
|
||||||
## Version 0.10.0 (2018-08-28)
|
## Version 0.10.0 (2018-08-28)
|
||||||
@@ -135,7 +144,7 @@
|
|||||||
- Android 9 compatibility [#550](https://github.com/mapsforge/vtm/issues/550)
|
- 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)
|
||||||
- SVG Salamander (JitPack) [#560](https://github.com/mapsforge/vtm/issues/560)
|
- SVG Salamander (JitPack) [#560](https://github.com/mapsforge/vtm/issues/560)
|
||||||
- Many other minor improvements and bug fixes
|
- 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)
|
||||||
|
|
||||||
## Version 0.9.2 (2018-01-04)
|
## Version 0.9.2 (2018-01-04)
|
||||||
@@ -148,7 +157,7 @@
|
|||||||
|
|
||||||
- LwHttp engine fix http headers [#460](https://github.com/mapsforge/vtm/issues/460)
|
- LwHttp engine fix http headers [#460](https://github.com/mapsforge/vtm/issues/460)
|
||||||
- S3DBLayer renamed to S3DBTileLayer [#452](https://github.com/mapsforge/vtm/issues/452)
|
- S3DBLayer renamed to S3DBTileLayer [#452](https://github.com/mapsforge/vtm/issues/452)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.9.1)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.9.1)
|
||||||
|
|
||||||
## Version 0.9.0 (2017-12-03)
|
## Version 0.9.0 (2017-12-03)
|
||||||
@@ -177,7 +186,7 @@
|
|||||||
- Gradle 4 / Android plugin 3 support [#433](https://github.com/mapsforge/vtm/issues/433)
|
- Gradle 4 / Android plugin 3 support [#433](https://github.com/mapsforge/vtm/issues/433)
|
||||||
- libGDX 1.9.7 [#434](https://github.com/mapsforge/vtm/issues/434)
|
- libGDX 1.9.7 [#434](https://github.com/mapsforge/vtm/issues/434)
|
||||||
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.9.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.9.0)
|
||||||
|
|
||||||
## Version 0.8.0 (2017-07-19)
|
## Version 0.8.0 (2017-07-19)
|
||||||
@@ -203,7 +212,7 @@
|
|||||||
- Gretty plugin at web modules [#338](https://github.com/mapsforge/vtm/issues/338)
|
- Gretty plugin at web modules [#338](https://github.com/mapsforge/vtm/issues/338)
|
||||||
- libGDX 1.9.6 [#333](https://github.com/mapsforge/vtm/issues/333)
|
- libGDX 1.9.6 [#333](https://github.com/mapsforge/vtm/issues/333)
|
||||||
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.8.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.8.0)
|
||||||
|
|
||||||
## Version 0.7.0 (2017-02-26)
|
## Version 0.7.0 (2017-02-26)
|
||||||
@@ -231,7 +240,7 @@
|
|||||||
- Fix theme parsing in non-Latin locales [#297](https://github.com/mapsforge/vtm/issues/297)
|
- Fix theme parsing in non-Latin locales [#297](https://github.com/mapsforge/vtm/issues/297)
|
||||||
- libGDX 1.9.5 [#270](https://github.com/mapsforge/vtm/issues/270)
|
- libGDX 1.9.5 [#270](https://github.com/mapsforge/vtm/issues/270)
|
||||||
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.7.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.7.0)
|
||||||
|
|
||||||
## Version 0.6.0 (2016-10-28) - VTM revival
|
## Version 0.6.0 (2016-10-28) - VTM revival
|
||||||
@@ -262,5 +271,5 @@
|
|||||||
- SNAPSHOT builds publish to Sonatype OSSRH [#165](https://github.com/mapsforge/vtm/issues/165)
|
- SNAPSHOT builds publish to Sonatype OSSRH [#165](https://github.com/mapsforge/vtm/issues/165)
|
||||||
- libGDX 1.9.4 [#164](https://github.com/mapsforge/vtm/issues/164)
|
- libGDX 1.9.4 [#164](https://github.com/mapsforge/vtm/issues/164)
|
||||||
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
|
||||||
- Many other minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.6.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.6.0)
|
||||||
|
|||||||
@@ -14,4 +14,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|||||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
# Android operating system, and which are packaged with your app"s APK
|
# Android operating system, and which are packaged with your app"s APK
|
||||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
# Automatically convert third-party libraries to use AndroidX
|
||||||
|
android.enableJetifier=true
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
53
gradlew
vendored
53
gradlew
vendored
@@ -1,5 +1,21 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
## Gradle start up script for UN*X
|
## Gradle start up script for UN*X
|
||||||
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
|||||||
APP_BASE_NAME=`basename "$0"`
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS=""
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD="maximum"
|
||||||
@@ -66,6 +82,7 @@ esac
|
|||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
@@ -109,10 +126,11 @@ if $darwin; then
|
|||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if $cygwin ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
@@ -138,19 +156,19 @@ if $cygwin ; then
|
|||||||
else
|
else
|
||||||
eval `echo args$i`="\"$arg\""
|
eval `echo args$i`="\"$arg\""
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
case $i in
|
case $i in
|
||||||
(0) set -- ;;
|
0) set -- ;;
|
||||||
(1) set -- "$args0" ;;
|
1) set -- "$args0" ;;
|
||||||
(2) set -- "$args0" "$args1" ;;
|
2) set -- "$args0" "$args1" ;;
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -159,14 +177,9 @@ save () {
|
|||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
APP_ARGS=$(save "$@")
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
43
gradlew.bat
vendored
43
gradlew.bat
vendored
@@ -1,3 +1,19 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS=
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
@@ -35,7 +54,7 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
@@ -45,28 +64,14 @@ echo location of your Java installation.
|
|||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
|
||||||
@rem Get command-line arguments, handling Windows variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api "com.badlogicgames.gdx:gdx-jnigen:$gdxVersion"
|
implementation "com.badlogicgames.gdx:gdx-jnigen:$gdxVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0">
|
android:versionName="1.0">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission
|
<uses-permission
|
||||||
@@ -19,7 +20,8 @@
|
|||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".Samples"
|
android:name=".Samples"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize">
|
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
@@ -34,6 +36,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ClusterMarkerOverlayActivity"
|
android:name=".ClusterMarkerOverlayActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
<activity
|
||||||
|
android:name=".DraggableMarkerOverlayActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".FragmentActivity"
|
android:name=".FragmentActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
|||||||
@@ -16,27 +16,26 @@ dependencies {
|
|||||||
implementation project(':vtm-gdx')
|
implementation project(':vtm-gdx')
|
||||||
implementation project(':vtm-gdx-poi3d')
|
implementation project(':vtm-gdx-poi3d')
|
||||||
|
|
||||||
implementation 'org.mapsforge:mapsforge-poi-android:0.16.0'
|
implementation 'org.mapsforge:mapsforge-poi-android:0.17.0'
|
||||||
implementation 'org.mapsforge:sqlite-android:0.16.0:natives-armeabi-v7a'
|
implementation 'org.mapsforge:sqlite-android:0.17.0:natives-armeabi-v7a'
|
||||||
implementation 'org.mapsforge:sqlite-android:0.16.0:natives-arm64-v8a'
|
implementation 'org.mapsforge:sqlite-android:0.17.0:natives-arm64-v8a'
|
||||||
implementation 'org.mapsforge:sqlite-android:0.16.0:natives-x86'
|
implementation 'org.mapsforge:sqlite-android:0.17.0:natives-x86'
|
||||||
implementation 'org.mapsforge:sqlite-android:0.16.0:natives-x86_64'
|
implementation 'org.mapsforge:sqlite-android:0.17.0:natives-x86_64'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion androidCompileSdk()
|
compileSdk androidCompileSdk()
|
||||||
buildToolsVersion "$androidBuildVersionTools"
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
versionCode project.versionCode()
|
versionCode project.versionCode()
|
||||||
versionName project.versionName()
|
versionName project.versionName()
|
||||||
minSdkVersion androidMinSdk()
|
minSdk androidMinSdk()
|
||||||
targetSdkVersion androidTargetSdk()
|
targetSdk androidTargetSdk()
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
10
vtm-android-example/res/layout/activity_map_draggable.xml
Normal file
10
vtm-android-example/res/layout/activity_map_draggable.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<org.oscim.android.drag.DragMapView
|
||||||
|
android:id="@+id/mapView"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<string name="search_value">void or value</string>
|
<string name="search_value">void or value</string>
|
||||||
<string name="now">Now</string>
|
<string name="now">Now</string>
|
||||||
<string name="warning">Warning</string>
|
<string name="warning">Warning</string>
|
||||||
<string name="startup_message_mbtiles">To run this sample activity, you need an MBTiles database installed on storage.\n\nadb push %s %s</string>
|
<string name="startup_message_mbtiles">To run this sample activity, you need an MBTiles database installed on storage.</string>
|
||||||
<string name="exit">Exit</string>
|
<string name="exit">Exit</string>
|
||||||
<string name="replace_fragment">Replace fragment</string>
|
<string name="replace_fragment">Replace fragment</string>
|
||||||
<string name="empty_fragment_text">This is a fragment to test the back stack behaviour of the map fragment.</string>
|
<string name="empty_fragment_text">This is a fragment to test the back stack behaviour of the map fragment.</string>
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
* You should have received a copy of the GNU Lesser General Public License along with
|
* 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/>.
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.oscim.layers.marker;
|
package org.oscim.android.cluster;
|
||||||
|
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
import org.oscim.core.MercatorProjection;
|
import org.oscim.core.MercatorProjection;
|
||||||
import org.oscim.core.PointF;
|
import org.oscim.core.PointF;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.layers.marker.utils.ScreenUtils;
|
import org.oscim.layers.marker.*;
|
||||||
import org.oscim.layers.marker.utils.SparseIntArray;
|
import org.oscim.layers.marker.utils.SparseIntArray;
|
||||||
import org.oscim.renderer.GLViewport;
|
import org.oscim.renderer.GLViewport;
|
||||||
import org.oscim.renderer.bucket.SymbolItem;
|
import org.oscim.renderer.bucket.SymbolItem;
|
||||||
@@ -45,7 +45,7 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
/**
|
/**
|
||||||
* default color of number inside the icon. Would be super-cool to cook this into the map theme
|
* default color of number inside the icon. Would be super-cool to cook this into the map theme
|
||||||
*/
|
*/
|
||||||
private static int CLUSTER_COLORTEXT = 0xff8000c0;
|
private static final int CLUSTER_COLORTEXT = 0xff8000c0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* default color of circle background
|
* default color of circle background
|
||||||
@@ -84,12 +84,12 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
* We use a flat Sparse array to calculate the clusters. The sparse array models a 2D map where every (x,y) denotes
|
* We use a flat Sparse array to calculate the clusters. The sparse array models a 2D map where every (x,y) denotes
|
||||||
* a grid slot, ie. 64x64dp. For efficiency I use a linear sparsearray with ARRindex = SLOTypos * max_x + SLOTxpos"
|
* a grid slot, ie. 64x64dp. For efficiency I use a linear sparsearray with ARRindex = SLOTypos * max_x + SLOTxpos"
|
||||||
*/
|
*/
|
||||||
private SparseIntArray mGridMap = new SparseIntArray(200); // initial space for 200 markers, that's not a lot of memory, and in most cases will avoid resizing the array
|
private final SparseIntArray mGridMap = new SparseIntArray(200); // initial space for 200 markers, that's not a lot of memory, and in most cases will avoid resizing the array
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to enable clustering or disable the functionality
|
* Whether to enable clustering or disable the functionality
|
||||||
*/
|
*/
|
||||||
private boolean mClusteringEnabled = false;
|
private final boolean mClusteringEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a clustered marker renderer
|
* Constructs a clustered marker renderer
|
||||||
@@ -139,18 +139,18 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
*/
|
*/
|
||||||
private void repopulateCluster(int size, double scale) {
|
private void repopulateCluster(int size, double scale) {
|
||||||
/* the grid slot size in px. increase to group more aggressively. currently set to marker size */
|
/* the grid slot size in px. increase to group more aggressively. currently set to marker size */
|
||||||
final int GRIDSIZE = ScreenUtils.getPixels(MAP_GRID_SIZE_DP);
|
final int GRIDSIZE = ClusterUtils.getPixels(MAP_GRID_SIZE_DP);
|
||||||
|
|
||||||
/* the factor to map into Grid Coordinates (discrete squares of GRIDSIZE x GRIDSIZE) */
|
/* the factor to map into Grid Coordinates (discrete squares of GRIDSIZE x GRIDSIZE) */
|
||||||
final double factor = (scale / GRIDSIZE);
|
final double factor = (scale / GRIDSIZE);
|
||||||
|
|
||||||
InternalItem.Clustered[] tmp = new InternalItem.Clustered[size];
|
Clustered[] tmp = new Clustered[size];
|
||||||
|
|
||||||
// clear grid map to count items that share the same "grid slot"
|
// clear grid map to count items that share the same "grid slot"
|
||||||
mGridMap.clear();
|
mGridMap.clear();
|
||||||
|
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
InternalItem.Clustered it = tmp[i] = new InternalItem.Clustered();
|
Clustered it = tmp[i] = new Clustered();
|
||||||
|
|
||||||
it.item = mMarkerLayer.createItem(i);
|
it.item = mMarkerLayer.createItem(i);
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
it.py = mMapPoint.y;
|
it.py = mMapPoint.y;
|
||||||
|
|
||||||
// items can be declared non-clusterable
|
// items can be declared non-clusterable
|
||||||
if (!(it.item instanceof MarkerItem.NonClusterable)) {
|
if (!(it.item instanceof NonClusterable)) {
|
||||||
|
|
||||||
final int
|
final int
|
||||||
absposx = (int) (it.px * factor), // absolute item X position in the grid
|
absposx = (int) (it.px * factor), // absolute item X position in the grid
|
||||||
@@ -244,7 +244,7 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
int numVisible = 0;
|
int numVisible = 0;
|
||||||
|
|
||||||
// Increase view to show items that are partially visible
|
// Increase view to show items that are partially visible
|
||||||
mMarkerLayer.map().viewport().getMapExtents(mBox, Tile.SIZE / 2);
|
mMarkerLayer.map().viewport().getMapExtents(mBox, Tile.SIZE >> 1);
|
||||||
|
|
||||||
long flip = (long) (Tile.SIZE * v.pos.scale) >> 1;
|
long flip = (long) (Tile.SIZE * v.pos.scale) >> 1;
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
|
|
||||||
/* check visibility */
|
/* check visibility */
|
||||||
for (InternalItem itm : mItems) {
|
for (InternalItem itm : mItems) {
|
||||||
InternalItem.Clustered it = (InternalItem.Clustered) itm;
|
Clustered it = (Clustered) itm;
|
||||||
|
|
||||||
it.changes = false;
|
it.changes = false;
|
||||||
it.x = (float) ((it.px - mx) * scale);
|
it.x = (float) ((it.px - mx) * scale);
|
||||||
@@ -318,7 +318,7 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
//log.debug(Arrays.toString(mItems));
|
//log.debug(Arrays.toString(mItems));
|
||||||
|
|
||||||
for (InternalItem itm : mItems) {
|
for (InternalItem itm : mItems) {
|
||||||
InternalItem.Clustered it = (InternalItem.Clustered) itm;
|
Clustered it = (Clustered) itm;
|
||||||
|
|
||||||
// skip invisible AND clustered-out
|
// skip invisible AND clustered-out
|
||||||
if ((!it.visible) || (it.clusteredOut))
|
if ((!it.visible) || (it.clusteredOut))
|
||||||
@@ -387,7 +387,7 @@ public class ClusterMarkerRenderer extends MarkerRenderer {
|
|||||||
// create and cache bitmap. This is unacceptable inside the GL thread,
|
// create and cache bitmap. This is unacceptable inside the GL thread,
|
||||||
// so we'll call this routine at the beginning to pre-cache all bitmaps
|
// so we'll call this routine at the beginning to pre-cache all bitmaps
|
||||||
|
|
||||||
ScreenUtils.ClusterDrawable drawable = new ScreenUtils.ClusterDrawable(
|
ClusterUtils.ClusterDrawable drawable = new ClusterUtils.ClusterDrawable(
|
||||||
MAP_MARKER_CLUSTER_SIZE_DP - CLUSTER_MAXSIZE + size, // make size dependent on cluster size
|
MAP_MARKER_CLUSTER_SIZE_DP - CLUSTER_MAXSIZE + size, // make size dependent on cluster size
|
||||||
mStyleForeground,
|
mStyleForeground,
|
||||||
mStyleBackground,
|
mStyleBackground,
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU Lesser General Public License along with
|
* 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/>.
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.oscim.layers.marker.utils;
|
package org.oscim.android.cluster;
|
||||||
|
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
@@ -25,7 +25,7 @@ import org.oscim.backend.canvas.Paint;
|
|||||||
* A simple utility class to make clustered markers functionality self-contained.
|
* A simple utility class to make clustered markers functionality self-contained.
|
||||||
* Includes a method to translate between DPs and PXs and a circular icon generator.
|
* Includes a method to translate between DPs and PXs and a circular icon generator.
|
||||||
*/
|
*/
|
||||||
public class ScreenUtils {
|
public class ClusterUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get pixels from DPs
|
* Get pixels from DPs
|
||||||
@@ -38,8 +38,9 @@ public class ScreenUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class ClusterDrawable {
|
public static class ClusterDrawable {
|
||||||
private Paint mPaintText = CanvasAdapter.newPaint();
|
private final Paint mPaintText = CanvasAdapter.newPaint();
|
||||||
private Paint mPaintCircle = CanvasAdapter.newPaint(), mPaintBorder = CanvasAdapter.newPaint();
|
private final Paint mPaintCircle = CanvasAdapter.newPaint();
|
||||||
|
private final Paint mPaintBorder = CanvasAdapter.newPaint();
|
||||||
private int mSize;
|
private int mSize;
|
||||||
private String mText;
|
private String mText;
|
||||||
|
|
||||||
@@ -57,8 +58,8 @@ public class ScreenUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setup(int sizedp, int foregroundColor, int backgroundColor) {
|
private void setup(int sizedp, int foregroundColor, int backgroundColor) {
|
||||||
mSize = ScreenUtils.getPixels(sizedp);
|
mSize = ClusterUtils.getPixels(sizedp);
|
||||||
mPaintText.setTextSize(ScreenUtils.getPixels((int) (sizedp * 0.6666666)));
|
mPaintText.setTextSize(ClusterUtils.getPixels((int) (sizedp * 0.6666666)));
|
||||||
mPaintText.setColor(foregroundColor);
|
mPaintText.setColor(foregroundColor);
|
||||||
|
|
||||||
mPaintCircle.setColor(backgroundColor);
|
mPaintCircle.setColor(backgroundColor);
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2017 nebular
|
||||||
|
* Copyright 2017 devemux86
|
||||||
|
*
|
||||||
|
* 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.cluster;
|
||||||
|
|
||||||
|
import org.oscim.layers.marker.InternalItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extension for clustered items.
|
||||||
|
*/
|
||||||
|
public class Clustered extends InternalItem {
|
||||||
|
/**
|
||||||
|
* If this is >0, this item will be displayed as a cluster circle, with size clusterSize+1.
|
||||||
|
*/
|
||||||
|
public int clusterSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this is true, this item is hidden (because it's represented by another InternalItem acting as cluster.
|
||||||
|
*/
|
||||||
|
public boolean clusteredOut;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2017 nebular
|
||||||
|
* Copyright 2017 devemux86
|
||||||
|
*
|
||||||
|
* 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.cluster;
|
||||||
|
|
||||||
|
import org.oscim.core.GeoPoint;
|
||||||
|
import org.oscim.layers.marker.MarkerItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If a MarkerItem is created using this convenience class instead of MarkerItem,
|
||||||
|
* this specific item will not be clusterable.
|
||||||
|
*/
|
||||||
|
public class NonClusterable extends MarkerItem {
|
||||||
|
public NonClusterable(String title, String description, GeoPoint geoPoint) {
|
||||||
|
super(null, title, description, geoPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NonClusterable(Object uid, String title, String description, GeoPoint geoPoint) {
|
||||||
|
super(uid, title, description, geoPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2021 Frank Knoll
|
||||||
|
*
|
||||||
|
* 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.drag;
|
||||||
|
|
||||||
|
import org.oscim.core.GeoPoint;
|
||||||
|
|
||||||
|
public interface DragAndDropListener {
|
||||||
|
|
||||||
|
void startDragItemAtGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint);
|
||||||
|
|
||||||
|
void ongoingDragItemToGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint);
|
||||||
|
|
||||||
|
void dropItemAtGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint);
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2016 devemux86
|
||||||
|
* Copyright 2021 Frank Knoll
|
||||||
|
*
|
||||||
|
* 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.drag;
|
||||||
|
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import org.oscim.android.input.AndroidMotionEvent;
|
||||||
|
import org.oscim.android.input.GestureHandler;
|
||||||
|
import org.oscim.event.Gesture;
|
||||||
|
import org.oscim.map.Map;
|
||||||
|
|
||||||
|
class DragGestureHandler extends GestureHandler {
|
||||||
|
|
||||||
|
public static final Gesture START_DRAG = new Gesture() {
|
||||||
|
};
|
||||||
|
public static final Gesture ONGOING_DRAG = new Gesture() {
|
||||||
|
};
|
||||||
|
public static final Gesture END_DRAG = new Gesture() {
|
||||||
|
};
|
||||||
|
|
||||||
|
private final AndroidMotionEvent mMotionEvent;
|
||||||
|
private final Map mMap;
|
||||||
|
private boolean scrolling = false;
|
||||||
|
|
||||||
|
public DragGestureHandler(Map map) {
|
||||||
|
super(map);
|
||||||
|
mMotionEvent = new AndroidMotionEvent();
|
||||||
|
mMap = map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isScrolling() {
|
||||||
|
return scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScrolling(boolean scrolling) {
|
||||||
|
this.scrolling = scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onShowPress(MotionEvent e) {
|
||||||
|
scrolling = true;
|
||||||
|
mMap.handleGesture(START_DRAG, mMotionEvent.wrap(e));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||||
|
scrolling = true;
|
||||||
|
return mMap.handleGesture(ONGOING_DRAG, mMotionEvent.wrap(e2));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012 Hannes Janetzek
|
||||||
|
* Copyright 2016-2020 devemux86
|
||||||
|
* Copyright 2018-2019 Gustl22
|
||||||
|
* Copyright 2021 Frank Knoll
|
||||||
|
*
|
||||||
|
* 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.drag;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.GestureDetector;
|
||||||
|
import org.oscim.android.MapView;
|
||||||
|
import org.oscim.map.Map;
|
||||||
|
import org.oscim.utils.Parameters;
|
||||||
|
|
||||||
|
public class DragMapView extends MapView {
|
||||||
|
|
||||||
|
private DragGestureHandler gestureHandler;
|
||||||
|
|
||||||
|
public DragMapView(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragMapView(Context context, AttributeSet attributeSet) {
|
||||||
|
super(context, attributeSet);
|
||||||
|
|
||||||
|
if (!Parameters.MAP_EVENT_LAYER2) {
|
||||||
|
gestureHandler = new DragGestureHandler(mMap);
|
||||||
|
mGestureDetector = new GestureDetector(context, gestureHandler);
|
||||||
|
mGestureDetector.setOnDoubleTapListener(gestureHandler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(android.view.MotionEvent motionEvent) {
|
||||||
|
if (!isClickable()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (motionEvent.getAction() == android.view.MotionEvent.ACTION_UP) {
|
||||||
|
if (gestureHandler.isScrolling()) {
|
||||||
|
gestureHandler.setScrolling(false);
|
||||||
|
return ((Map) mMap).handleGesture(DragGestureHandler.END_DRAG, mMotionEvent.wrap(motionEvent));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onTouchEvent(motionEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012 osmdroid authors: Nicolas Gramlich, Theodore Hong, Fred Eisele
|
||||||
|
*
|
||||||
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2016-2021 devemux86
|
||||||
|
* Copyright 2016 Stephan Leuschner
|
||||||
|
* Copyright 2016 Pedinel
|
||||||
|
* Copyright 2019 Carlos Alberto Martínez Gadea
|
||||||
|
* Copyright 2021 Frank Knoll
|
||||||
|
*
|
||||||
|
* 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.drag;
|
||||||
|
|
||||||
|
import org.oscim.core.GeoPoint;
|
||||||
|
import org.oscim.event.Gesture;
|
||||||
|
import org.oscim.event.GestureListener;
|
||||||
|
import org.oscim.event.MotionEvent;
|
||||||
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
import org.oscim.layers.marker.MarkerInterface;
|
||||||
|
import org.oscim.layers.marker.MarkerSymbol;
|
||||||
|
import org.oscim.map.Map;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.oscim.android.drag.DragGestureHandler.*;
|
||||||
|
|
||||||
|
public class DraggableItemizedLayer extends ItemizedLayer implements GestureListener {
|
||||||
|
|
||||||
|
private final ItemDragger itemDragger;
|
||||||
|
|
||||||
|
public DraggableItemizedLayer(Map map,
|
||||||
|
List<MarkerInterface> markerItems,
|
||||||
|
MarkerSymbol defaultMarker,
|
||||||
|
OnItemGestureListener<MarkerInterface> listener) {
|
||||||
|
super(map, markerItems, defaultMarker, listener);
|
||||||
|
itemDragger = new ItemDragger(this, map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean activateSelectedItems(MotionEvent event, ActiveItem task) {
|
||||||
|
return super.activateSelectedItems(event, task);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<MarkerInterface> getMarkerItems() {
|
||||||
|
return mItemList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onGesture(Gesture gesture, MotionEvent event) {
|
||||||
|
if (!isEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gesture == START_DRAG) {
|
||||||
|
return itemDragger.startDragItem(event, getGeoPoint(event));
|
||||||
|
} else if (gesture == ONGOING_DRAG) {
|
||||||
|
return itemDragger.ongoingDragItemTo(getGeoPoint(event));
|
||||||
|
} else if (gesture == END_DRAG) {
|
||||||
|
return itemDragger.dropItemAt(getGeoPoint(event));
|
||||||
|
} else {
|
||||||
|
itemDragger.noDrag();
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onGesture(gesture, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
private GeoPoint getGeoPoint(MotionEvent event) {
|
||||||
|
return map().viewport().fromScreenPoint(event.getX(), event.getY());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012 osmdroid authors:
|
||||||
|
* Copyright 2012 Nicolas Gramlich
|
||||||
|
* Copyright 2012 Theodore Hong
|
||||||
|
* Copyright 2012 Fred Eisele
|
||||||
|
*
|
||||||
|
* Copyright 2014 Hannes Janetzek
|
||||||
|
* Copyright 2016 devemux86
|
||||||
|
* Copyright 2016 Erik Duisters
|
||||||
|
* Copyright 2017 Longri
|
||||||
|
* Copyright 2021 Frank Knoll
|
||||||
|
*
|
||||||
|
* 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.drag;
|
||||||
|
|
||||||
|
import org.oscim.core.GeoPoint;
|
||||||
|
import org.oscim.layers.marker.MarkerItem;
|
||||||
|
|
||||||
|
public class DraggableMarkerItem extends MarkerItem {
|
||||||
|
|
||||||
|
private final DragAndDropListener dragAndDropListener;
|
||||||
|
|
||||||
|
public DraggableMarkerItem(String title, String description, GeoPoint geoPoint, DragAndDropListener dragAndDropListener) {
|
||||||
|
super(title, description, geoPoint);
|
||||||
|
this.dragAndDropListener = dragAndDropListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragAndDropListener getDragAndDropListener() {
|
||||||
|
return dragAndDropListener;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2021 Frank Knoll
|
||||||
|
*
|
||||||
|
* 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.drag;
|
||||||
|
|
||||||
|
import org.oscim.core.GeoPoint;
|
||||||
|
import org.oscim.event.MotionEvent;
|
||||||
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
import org.oscim.layers.marker.MarkerItem;
|
||||||
|
import org.oscim.layers.marker.MarkerLayer;
|
||||||
|
import org.oscim.map.Map;
|
||||||
|
|
||||||
|
class ItemDragger {
|
||||||
|
|
||||||
|
private final DraggableItemizedLayer draggableItemizedLayer;
|
||||||
|
private final DragAndDropListener dragItemAndRedrawListener;
|
||||||
|
private DraggableMarkerItem dragItem;
|
||||||
|
|
||||||
|
public ItemDragger(DraggableItemizedLayer draggableItemizedLayer, Map map) {
|
||||||
|
this.draggableItemizedLayer = draggableItemizedLayer;
|
||||||
|
this.dragItemAndRedrawListener = createDragItemAndRedrawListener(draggableItemizedLayer, map);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean startDragItem(MotionEvent event, final GeoPoint geoPoint) {
|
||||||
|
dragItem = null;
|
||||||
|
return draggableItemizedLayer.activateSelectedItems(
|
||||||
|
event,
|
||||||
|
new ItemizedLayer.ActiveItem() {
|
||||||
|
@Override
|
||||||
|
public boolean run(int index) {
|
||||||
|
dragItem = (DraggableMarkerItem) draggableItemizedLayer.getMarkerItems().get(index);
|
||||||
|
dragItemAndRedrawListener.startDragItemAtGeoPoint(dragItem, geoPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean ongoingDragItemTo(GeoPoint geoPoint) {
|
||||||
|
if (dragItem == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
dragItemAndRedrawListener.ongoingDragItemToGeoPoint(dragItem, geoPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean dropItemAt(GeoPoint geoPoint) {
|
||||||
|
if (dragItem == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
dragItemAndRedrawListener.dropItemAtGeoPoint(dragItem, geoPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void noDrag() {
|
||||||
|
dragItem = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DragAndDropListener createDragItemAndRedrawListener(final MarkerLayer markerLayer, final Map map) {
|
||||||
|
return new DragAndDropListener() {
|
||||||
|
@Override
|
||||||
|
public void startDragItemAtGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint) {
|
||||||
|
item.getDragAndDropListener().startDragItemAtGeoPoint(item, geoPoint);
|
||||||
|
updateLocationOfMarkerItemAndRedraw(item, geoPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ongoingDragItemToGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint) {
|
||||||
|
item.getDragAndDropListener().ongoingDragItemToGeoPoint(item, geoPoint);
|
||||||
|
updateLocationOfMarkerItemAndRedraw(item, geoPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dropItemAtGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint) {
|
||||||
|
item.getDragAndDropListener().dropItemAtGeoPoint(item, geoPoint);
|
||||||
|
updateLocationOfMarkerItemAndRedraw(item, geoPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateLocationOfMarkerItemAndRedraw(MarkerItem markerItem, GeoPoint location) {
|
||||||
|
markerItem.geoPoint = location;
|
||||||
|
markerLayer.populate();
|
||||||
|
map.render();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -192,6 +192,7 @@ public class FilePicker extends Activity implements AdapterView.OnItemClickListe
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
protected Dialog onCreateDialog(int id) {
|
protected Dialog onCreateDialog(int id) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
|
|||||||
@@ -14,14 +14,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import android.app.Fragment;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class BlankFragment extends Fragment {
|
public class BlankFragment extends android.app.Fragment {
|
||||||
|
|
||||||
static BlankFragment newInstance() {
|
static BlankFragment newInstance() {
|
||||||
BlankFragment instance = new BlankFragment();
|
BlankFragment instance = new BlankFragment();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ package org.oscim.android.test;
|
|||||||
|
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import org.oscim.android.canvas.AndroidBitmap;
|
import org.oscim.android.canvas.AndroidBitmap;
|
||||||
|
import org.oscim.android.cluster.ClusterMarkerRenderer;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
import org.oscim.backend.canvas.Color;
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.core.GeoPoint;
|
import org.oscim.core.GeoPoint;
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2014 Hannes Janetzek
|
||||||
|
* Copyright 2016-2020 devemux86
|
||||||
|
* Copyright 2021 Frank Knoll
|
||||||
|
*
|
||||||
|
* 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.test;
|
||||||
|
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import org.oscim.android.canvas.AndroidBitmap;
|
||||||
|
import org.oscim.android.drag.DragAndDropListener;
|
||||||
|
import org.oscim.android.drag.DraggableItemizedLayer;
|
||||||
|
import org.oscim.android.drag.DraggableMarkerItem;
|
||||||
|
import org.oscim.core.GeoPoint;
|
||||||
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
import org.oscim.layers.marker.MarkerInterface;
|
||||||
|
import org.oscim.layers.marker.MarkerSymbol;
|
||||||
|
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
||||||
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DraggableMarkerOverlayActivity extends MapActivity {
|
||||||
|
|
||||||
|
public DraggableMarkerOverlayActivity() {
|
||||||
|
super(R.layout.activity_map_draggable);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
createLayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
void createLayers() {
|
||||||
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-android-example"));
|
||||||
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
|
ItemizedLayer mMarkerLayer = new DraggableItemizedLayer(
|
||||||
|
mMap,
|
||||||
|
new ArrayList<MarkerInterface>(),
|
||||||
|
new MarkerSymbol(
|
||||||
|
new AndroidBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.marker_poi)),
|
||||||
|
HotspotPlace.BOTTOM_CENTER),
|
||||||
|
null);
|
||||||
|
mMap.layers().add(mMarkerLayer);
|
||||||
|
|
||||||
|
DragAndDropListener dragAndDropListener = new DragAndDropListener() {
|
||||||
|
@Override
|
||||||
|
public void startDragItemAtGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint) {
|
||||||
|
Log.i(DraggableMarkerOverlayActivity.this.getClass().getSimpleName(), "startDragItemAtGeoPoint: " + geoPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ongoingDragItemToGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint) {
|
||||||
|
Log.i(DraggableMarkerOverlayActivity.this.getClass().getSimpleName(), "ongoingDragItemToGeoPoint: " + geoPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dropItemAtGeoPoint(DraggableMarkerItem item, GeoPoint geoPoint) {
|
||||||
|
Log.i(DraggableMarkerOverlayActivity.this.getClass().getSimpleName(), "dropItemAtGeoPoint: " + geoPoint);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
|
for (double lat = -90; lat <= 90; lat += 45) {
|
||||||
|
for (double lon = -180; lon <= 180; lon += 45) {
|
||||||
|
pts.add(new DraggableMarkerItem(lat + "/" + lon, "", new GeoPoint(lat, lon), dragAndDropListener));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mMarkerLayer.addItems(pts);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
|
/* ignore saved position */
|
||||||
|
mMap.setMapPosition(0, 0, 1 << 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,15 +15,13 @@
|
|||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
|
||||||
import android.app.FragmentTransaction;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class FragmentActivity extends Activity {
|
public class FragmentActivity extends Activity {
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -32,8 +30,8 @@ public class FragmentActivity extends Activity {
|
|||||||
setTitle(getClass().getSimpleName());
|
setTitle(getClass().getSimpleName());
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
Fragment mapFragment = MapFragment.newInstance();
|
android.app.Fragment mapFragment = MapFragment.newInstance();
|
||||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
android.app.FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||||
ft.add(R.id.fragment_container, mapFragment).commit();
|
ft.add(R.id.fragment_container, mapFragment).commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,12 +42,11 @@ public class FragmentActivity extends Activity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == R.id.replace_fragment) {
|
if (item.getItemId() == R.id.replace_fragment) {
|
||||||
Fragment blankFragment = BlankFragment.newInstance();
|
android.app.Fragment blankFragment = BlankFragment.newInstance();
|
||||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
android.app.FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||||
ft.replace(R.id.fragment_container, blankFragment);
|
ft.replace(R.id.fragment_container, blankFragment);
|
||||||
ft.addToBackStack(null);
|
ft.addToBackStack(null);
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2021 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
|
||||||
@@ -96,6 +96,7 @@ public class LocationActivity extends BitmapTileActivity implements LocationList
|
|||||||
public void onProviderEnabled(String provider) {
|
public void onProviderEnabled(String provider) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||||
}
|
}
|
||||||
@@ -103,7 +104,7 @@ public class LocationActivity extends BitmapTileActivity implements LocationList
|
|||||||
private void enableAvailableProviders() {
|
private void enableAvailableProviders() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||||
requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 0);
|
requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2021 devemux86
|
||||||
* Copyright 2018 Longri
|
* Copyright 2018 Longri
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -126,6 +126,7 @@ public class LocationTextureActivity extends BitmapTileActivity implements Locat
|
|||||||
public void onProviderEnabled(String provider) {
|
public void onProviderEnabled(String provider) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||||
}
|
}
|
||||||
@@ -133,7 +134,7 @@ public class LocationTextureActivity extends BitmapTileActivity implements Locat
|
|||||||
private void enableAvailableProviders() {
|
private void enableAvailableProviders() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||||
requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 0);
|
requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class MBTilesBitmapActivity extends BitmapTileActivity {
|
|||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this)
|
AlertDialog.Builder builder = new AlertDialog.Builder(this)
|
||||||
.setTitle(R.string.warning)
|
.setTitle(R.string.warning)
|
||||||
.setMessage(getResources().getString(R.string.startup_message_mbtiles, file.getName(), file.getAbsolutePath()))
|
.setMessage(getResources().getString(R.string.startup_message_mbtiles))
|
||||||
.setPositiveButton(R.string.exit, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.exit, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class MBTilesMvtActivity extends MapActivity {
|
|||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this)
|
AlertDialog.Builder builder = new AlertDialog.Builder(this)
|
||||||
.setTitle(R.string.warning)
|
.setTitle(R.string.warning)
|
||||||
.setMessage(getResources().getString(R.string.startup_message_mbtiles, file.getName(), file.getAbsolutePath()))
|
.setMessage(getResources().getString(R.string.startup_message_mbtiles))
|
||||||
.setPositiveButton(R.string.exit, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.exit, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import android.app.Fragment;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -40,7 +39,7 @@ import java.io.File;
|
|||||||
* You'll need a map with filename berlin.map from download.mapsforge.org in device storage.
|
* You'll need a map with filename berlin.map from download.mapsforge.org in device storage.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class MapFragment extends Fragment {
|
public class MapFragment extends android.app.Fragment {
|
||||||
|
|
||||||
private MapView mapView;
|
private MapView mapView;
|
||||||
private IRenderTheme theme;
|
private IRenderTheme theme;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ package org.oscim.android.test;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
@@ -58,6 +57,7 @@ import java.util.List;
|
|||||||
* Long press on map to search inside visible bounding box.<br/>
|
* Long press on map to search inside visible bounding box.<br/>
|
||||||
* Tap on POIs to show their name (in default locale).
|
* Tap on POIs to show their name (in default locale).
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLayer.OnItemGestureListener<MarkerInterface> {
|
public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLayer.OnItemGestureListener<MarkerInterface> {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(PoiSearchActivity.class);
|
private static final Logger log = LoggerFactory.getLogger(PoiSearchActivity.class);
|
||||||
@@ -275,7 +275,7 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PoiSearchTask extends AsyncTask<BoundingBox, Void, Collection<PointOfInterest>> {
|
private class PoiSearchTask extends android.os.AsyncTask<BoundingBox, Void, Collection<PointOfInterest>> {
|
||||||
private final WeakReference<PoiSearchActivity> weakActivity;
|
private final WeakReference<PoiSearchActivity> weakActivity;
|
||||||
private final String category;
|
private final String category;
|
||||||
private final List<Tag> patterns;
|
private final List<Tag> patterns;
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ public class Samples extends Activity {
|
|||||||
linearLayout.addView(createButton(JeoIndoorActivity.class));
|
linearLayout.addView(createButton(JeoIndoorActivity.class));
|
||||||
linearLayout.addView(createButton(GdxPoi3DActivity.class));
|
linearLayout.addView(createButton(GdxPoi3DActivity.class));
|
||||||
linearLayout.addView(createButton(OverpassActivity.class));
|
linearLayout.addView(createButton(OverpassActivity.class));
|
||||||
|
linearLayout.addView(createButton(DraggableMarkerOverlayActivity.class));
|
||||||
linearLayout.addView(createButton(ClusterMarkerOverlayActivity.class));
|
linearLayout.addView(createButton(ClusterMarkerOverlayActivity.class));
|
||||||
linearLayout.addView(createButton(FragmentActivity.class));
|
linearLayout.addView(createButton(FragmentActivity.class));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<manifest package="org.oscim.gdx" />
|
|
||||||
@@ -1,57 +1,31 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly files("${System.env.ANDROID_HOME}/platforms/android-${androidCompileSdk()}/android.jar")
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
sourceSets {
|
||||||
compileSdkVersion androidCompileSdk()
|
main.java.srcDirs = ['src']
|
||||||
buildToolsVersion "$androidBuildVersionTools"
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
versionCode project.versionCode()
|
|
||||||
versionName project.versionName()
|
|
||||||
minSdkVersion androidMinSdk()
|
|
||||||
targetSdkVersion androidTargetSdk()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
|
||||||
java.srcDirs = ['src']
|
|
||||||
}
|
|
||||||
debug.setRoot('build-types/debug')
|
|
||||||
release.setRoot('build-types/release')
|
|
||||||
}
|
|
||||||
|
|
||||||
lintOptions { abortOnError false }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android.libraryVariants.all { variant ->
|
file('natives').eachDir() { dir ->
|
||||||
def name = variant.buildType.name
|
task("nativesJar-${dir.name}", type: Jar) {
|
||||||
if (name == "debug")
|
classifier "natives-${dir.name}"
|
||||||
return
|
from(dir.path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
publishing {
|
||||||
jar.dependsOn variant.javaCompileProvider
|
publications {
|
||||||
jar.exclude '**/BuildConfig.class'
|
maven(MavenPublication) {
|
||||||
jar.exclude '**/R.class'
|
from components.java
|
||||||
jar.exclude '**/R$*.class'
|
file('natives').eachDir() { dir ->
|
||||||
jar.from variant.javaCompileProvider.get().destinationDir
|
artifact tasks["nativesJar-${dir.name}"]
|
||||||
artifacts.add('archives', jar)
|
}
|
||||||
|
}
|
||||||
file('natives').eachDir() { dir ->
|
|
||||||
def nativesJar = project.tasks.create "nativesJar${name.capitalize()}-${dir.name}", Jar
|
|
||||||
nativesJar.classifier = "natives-${dir.name}"
|
|
||||||
nativesJar.from(dir.path)
|
|
||||||
artifacts.add('archives', nativesJar)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -35,12 +35,12 @@ package org.oscim.gdx;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.opengl.GLES30;
|
import android.opengl.GLES30;
|
||||||
|
|
||||||
import org.oscim.backend.GL30;
|
import org.oscim.backend.GL30;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGL30.java
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGL30.java
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class AndroidGL30 extends AndroidGL implements GL30 {
|
public class AndroidGL30 extends AndroidGL implements GL30 {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<manifest package="org.oscim.android.mvt" />
|
|
||||||
@@ -1,51 +1,22 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly files("${System.env.ANDROID_HOME}/platforms/android-${androidCompileSdk()}/android.jar")
|
||||||
api project(':vtm-android')
|
api project(':vtm-android')
|
||||||
api project(':vtm-mvt')
|
api project(':vtm-mvt')
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
sourceSets {
|
||||||
compileSdkVersion androidCompileSdk()
|
main.java.srcDirs = ['src']
|
||||||
buildToolsVersion "$androidBuildVersionTools"
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
versionCode project.versionCode()
|
|
||||||
versionName project.versionName()
|
|
||||||
minSdkVersion androidMinSdk()
|
|
||||||
targetSdkVersion androidTargetSdk()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
|
||||||
java.srcDirs = ['src']
|
|
||||||
}
|
|
||||||
debug.setRoot('build-types/debug')
|
|
||||||
release.setRoot('build-types/release')
|
|
||||||
}
|
|
||||||
|
|
||||||
lintOptions { abortOnError false }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android.libraryVariants.all { variant ->
|
publishing {
|
||||||
def name = variant.buildType.name
|
publications {
|
||||||
if (name == "debug")
|
maven(MavenPublication) {
|
||||||
return
|
from components.java
|
||||||
|
}
|
||||||
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
}
|
||||||
jar.dependsOn variant.javaCompileProvider
|
|
||||||
jar.exclude '**/BuildConfig.class'
|
|
||||||
jar.exclude '**/R.class'
|
|
||||||
jar.exclude '**/R$*.class'
|
|
||||||
jar.from variant.javaCompileProvider.get().destinationDir
|
|
||||||
artifacts.add('archives', jar)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<manifest package="org.oscim.android" />
|
|
||||||
@@ -1,57 +1,31 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly files("${System.env.ANDROID_HOME}/platforms/android-${androidCompileSdk()}/android.jar")
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api 'com.caverock:androidsvg:1.4'
|
api 'com.caverock:androidsvg:1.4'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
sourceSets {
|
||||||
compileSdkVersion androidCompileSdk()
|
main.java.srcDirs = ['src']
|
||||||
buildToolsVersion "$androidBuildVersionTools"
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
versionCode project.versionCode()
|
|
||||||
versionName project.versionName()
|
|
||||||
minSdkVersion androidMinSdk()
|
|
||||||
targetSdkVersion androidTargetSdk()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
|
||||||
java.srcDirs = ['src']
|
|
||||||
}
|
|
||||||
debug.setRoot('build-types/debug')
|
|
||||||
release.setRoot('build-types/release')
|
|
||||||
}
|
|
||||||
|
|
||||||
lintOptions { abortOnError false }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android.libraryVariants.all { variant ->
|
file('natives').eachDir() { dir ->
|
||||||
def name = variant.buildType.name
|
task("nativesJar-${dir.name}", type: Jar) {
|
||||||
if (name == "debug")
|
classifier "natives-${dir.name}"
|
||||||
return
|
from(dir.path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def jar = project.tasks.create "jar${name.capitalize()}", Jar
|
publishing {
|
||||||
jar.dependsOn variant.javaCompileProvider
|
publications {
|
||||||
jar.exclude '**/BuildConfig.class'
|
maven(MavenPublication) {
|
||||||
jar.exclude '**/R.class'
|
from components.java
|
||||||
jar.exclude '**/R$*.class'
|
file('natives').eachDir() { dir ->
|
||||||
jar.from variant.javaCompileProvider.get().destinationDir
|
artifact tasks["nativesJar-${dir.name}"]
|
||||||
artifacts.add('archives', jar)
|
}
|
||||||
|
}
|
||||||
file('natives').eachDir() { dir ->
|
|
||||||
def nativesJar = project.tasks.create "nativesJar${name.capitalize()}-${dir.name}", Jar
|
|
||||||
nativesJar.classifier = "natives-${dir.name}"
|
|
||||||
nativesJar.from(dir.path)
|
|
||||||
artifacts.add('archives', nativesJar)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -92,6 +92,7 @@ public class MapView extends GLSurfaceView {
|
|||||||
this(context, null);
|
this(context, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public MapView(Context context, AttributeSet attributeSet) {
|
public MapView(Context context, AttributeSet attributeSet) {
|
||||||
super(context, attributeSet);
|
super(context, attributeSet);
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,9 @@ public final class AndroidGraphics extends CanvasAdapter {
|
|||||||
return new AndroidBitmap(bitmap);
|
return new AndroidBitmap(bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
public static Bitmap drawableToBitmap(Resources res, int resId) {
|
public static Bitmap drawableToBitmap(Resources res, int resId) {
|
||||||
return drawableToBitmap(res.getDrawable(resId));
|
return drawableToBitmap(res.getDrawable(resId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ package org.oscim.android.gl;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.opengl.GLES30;
|
import android.opengl.GLES30;
|
||||||
|
|
||||||
import org.oscim.backend.GL30;
|
import org.oscim.backend.GL30;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGL30.java
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGL30.java
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class AndroidGL30 extends AndroidGL implements GL30 {
|
public class AndroidGL30 extends AndroidGL implements GL30 {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0">
|
android:versionName="1.0">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".TileMap"
|
android:name=".TileMap"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||||
|
android:exported="true"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|||||||
@@ -10,19 +10,18 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion androidCompileSdk()
|
compileSdk androidCompileSdk()
|
||||||
buildToolsVersion "$androidBuildVersionTools"
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
versionCode project.versionCode()
|
versionCode project.versionCode()
|
||||||
versionName project.versionName()
|
versionName project.versionName()
|
||||||
minSdkVersion androidMinSdk()
|
minSdk androidMinSdk()
|
||||||
targetSdkVersion androidTargetSdk()
|
targetSdk androidTargetSdk()
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* Copyright 2010, 2011, 2012 mapsforge.org
|
/* Copyright 2010, 2011, 2012 mapsforge.org
|
||||||
* Copyright 2012 Hannes Janetzek
|
* Copyright 2012 Hannes Janetzek
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2021 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
|
||||||
@@ -77,7 +77,7 @@ public class TileMap extends MapActivity implements MapEventsReceiver {
|
|||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)
|
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)
|
||||||
requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 0);
|
requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
setContentView(R.layout.activity_tilemap);
|
setContentView(R.layout.activity_tilemap);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm-desktop')
|
api project(':vtm-desktop')
|
||||||
@@ -7,8 +7,14 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main.java.srcDirs = ['src']
|
||||||
java.srcDirs = ['src']
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import java.nio.*;
|
|||||||
/**
|
/**
|
||||||
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGL30.java
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGL30.java
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class LwjglGL30 extends LwjglGL20 implements org.oscim.backend.GL30 {
|
public class LwjglGL30 extends LwjglGL20 implements org.oscim.backend.GL30 {
|
||||||
@Override
|
@Override
|
||||||
public void readBuffer(int mode) {
|
public void readBuffer(int mode) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm-desktop')
|
api project(':vtm-desktop')
|
||||||
@@ -7,8 +7,14 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main.java.srcDirs = ['src']
|
||||||
java.srcDirs = ['src']
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import java.nio.*;
|
|||||||
/**
|
/**
|
||||||
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3GL30.java
|
* See https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3GL30.java
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class Lwjgl3GL30 extends Lwjgl3GL20 implements org.oscim.backend.GL30 {
|
public class Lwjgl3GL30 extends Lwjgl3GL20 implements org.oscim.backend.GL30 {
|
||||||
@Override
|
@Override
|
||||||
public void readBuffer(int mode) {
|
public void readBuffer(int mode) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm-gdx')
|
api project(':vtm-gdx')
|
||||||
@@ -7,19 +7,24 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main.java.srcDirs = ['src']
|
||||||
java.srcDirs = ['src']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file('natives').eachDir() { dir ->
|
file('natives').eachDir() { dir ->
|
||||||
task("nativesJar-${dir.name}", type: Jar) {
|
task("nativesJar-${dir.name}", type: Jar) {
|
||||||
classifier = "natives-${dir.name}"
|
classifier "natives-${dir.name}"
|
||||||
from(dir.path)
|
from(dir.path)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
artifacts {
|
publishing {
|
||||||
archives tasks["nativesJar-${dir.name}"]
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
file('natives').eachDir() { dir ->
|
||||||
|
artifact tasks["nativesJar-${dir.name}"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
|
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2017 devemux86
|
* Copyright 2016-2021 devemux86
|
||||||
* Copyright 2017 nebular
|
* Copyright 2017 nebular
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
*
|
*
|
||||||
@@ -25,12 +25,7 @@ import org.oscim.backend.canvas.Canvas;
|
|||||||
import org.oscim.backend.canvas.Color;
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.backend.canvas.Paint;
|
import org.oscim.backend.canvas.Paint;
|
||||||
|
|
||||||
import java.awt.AlphaComposite;
|
import java.awt.*;
|
||||||
import java.awt.Composite;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.Image;
|
|
||||||
import java.awt.RenderingHints;
|
|
||||||
import java.awt.Shape;
|
|
||||||
import java.awt.font.TextLayout;
|
import java.awt.font.TextLayout;
|
||||||
import java.awt.geom.AffineTransform;
|
import java.awt.geom.AffineTransform;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
@@ -188,7 +183,7 @@ public class AwtCanvas implements Canvas {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillRectangle(float x, float y, float width, float height, int color) {
|
public void fillRectangle(float x, float y, float width, float height, int color) {
|
||||||
java.awt.Color awtColor = color == Color.TRANSPARENT ? TRANSPARENT : new java.awt.Color(color);
|
java.awt.Color awtColor = color == Color.TRANSPARENT ? TRANSPARENT : new java.awt.Color(color, true);
|
||||||
Composite originalComposite = this.canvas.getComposite();
|
Composite originalComposite = this.canvas.getComposite();
|
||||||
this.canvas.setComposite(AlphaComposite.getInstance(color == Color.TRANSPARENT ? AlphaComposite.CLEAR : AlphaComposite.SRC_OVER));
|
this.canvas.setComposite(AlphaComposite.getInstance(color == Color.TRANSPARENT ? AlphaComposite.CLEAR : AlphaComposite.SRC_OVER));
|
||||||
this.canvas.setColor(awtColor);
|
this.canvas.setColor(awtColor);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -13,6 +13,14 @@ sourceSets {
|
|||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm-gdx')
|
api project(':vtm-gdx')
|
||||||
@@ -10,6 +10,14 @@ sourceSets {
|
|||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -12,8 +12,19 @@ sourceSets {
|
|||||||
main.resources.srcDirs = ['src']
|
main.resources.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
tasks.named("sourcesJar") {
|
||||||
|
duplicatesStrategy DuplicatesStrategy.INCLUDE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -11,6 +11,14 @@ sourceSets {
|
|||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Charles Greb
|
* Copyright 2014 Charles Greb
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2017 devemux86
|
* Copyright 2017-2021 devemux86
|
||||||
* Copyright 2017 Mathieu De Brito
|
* Copyright 2017 Mathieu De Brito
|
||||||
*
|
*
|
||||||
* 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,8 +19,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.tiling.source;
|
package org.oscim.tiling.source;
|
||||||
|
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.utils.IOUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -31,10 +33,6 @@ import java.io.OutputStream;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import okhttp3.OkHttpClient;
|
|
||||||
import okhttp3.Request;
|
|
||||||
import okhttp3.Response;
|
|
||||||
|
|
||||||
public class OkHttpEngine implements HttpEngine {
|
public class OkHttpEngine implements HttpEngine {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(OkHttpEngine.class);
|
private static final Logger log = LoggerFactory.getLogger(OkHttpEngine.class);
|
||||||
@@ -100,7 +98,11 @@ public class OkHttpEngine implements HttpEngine {
|
|||||||
if (mInputStream == null)
|
if (mInputStream == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IOUtils.closeQuietly(mInputStream);
|
try {
|
||||||
|
mInputStream.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
mInputStream = null;
|
mInputStream = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,9 +119,7 @@ public class OkHttpEngine implements HttpEngine {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean requestCompleted(boolean success) {
|
public boolean requestCompleted(boolean success) {
|
||||||
IOUtils.closeQuietly(mInputStream);
|
close();
|
||||||
mInputStream = null;
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'robovm'
|
apply plugin: 'robovm'
|
||||||
|
|
||||||
sourceSets.main.java.srcDirs = ["src/"]
|
sourceSets.main.java.srcDirs = ["src/"]
|
||||||
@@ -42,7 +42,6 @@ task copyVtmThemesResources(type: Copy) {
|
|||||||
into("${buildDir}")
|
into("${buildDir}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
compileTask -> compileTask.dependsOn copyVtmResources
|
compileTask -> compileTask.dependsOn copyVtmResources
|
||||||
}
|
}
|
||||||
@@ -52,7 +51,8 @@ tasks.withType(JavaCompile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task nativesJar(type: Jar) {
|
task nativesJar(type: Jar) {
|
||||||
classifier = 'natives'
|
dependsOn copyVtmResources, copyVtmThemesResources
|
||||||
|
classifier 'natives'
|
||||||
from('natives')
|
from('natives')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,8 +60,20 @@ artifacts {
|
|||||||
archives nativesJar
|
archives nativesJar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
artifact nativesJar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
tasks.named("sourcesJar") {
|
||||||
|
dependsOn copyVtmResources, copyVtmThemesResources
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
package org.oscim.ios.backend;
|
package org.oscim.ios.backend;
|
||||||
|
|
||||||
import com.badlogic.gdx.backends.iosrobovm.IOSGLES30;
|
import com.badlogic.gdx.backends.iosrobovm.IOSGLES30;
|
||||||
|
|
||||||
import org.oscim.backend.GL30;
|
import org.oscim.backend.GL30;
|
||||||
|
|
||||||
import java.nio.Buffer;
|
import java.nio.Buffer;
|
||||||
@@ -26,6 +25,7 @@ import java.nio.LongBuffer;
|
|||||||
/**
|
/**
|
||||||
* iOS specific implementation of {@link GL30}.
|
* iOS specific implementation of {@link GL30}.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class IosGL30 extends IosGL implements GL30 {
|
public class IosGL30 extends IosGL implements GL30 {
|
||||||
|
|
||||||
private static final IOSGLES30 iOSGL = new IOSGLES30();
|
private static final IOSGLES30 iOSGL = new IOSGLES30();
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ public class SVGParser extends NSObject {
|
|||||||
public SVGParser() {
|
public SVGParser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
@SuppressWarnings("deprecation")
|
||||||
|
|
||||||
protected SVGParser(long handle) {
|
protected SVGParser(long handle) {
|
||||||
super(handle);
|
super(handle);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -12,6 +12,14 @@ sourceSets {
|
|||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -10,6 +10,14 @@ sourceSets {
|
|||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -11,6 +11,14 @@ sourceSets {
|
|||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2021 devemux86
|
||||||
* Copyright 2020 marq24
|
* Copyright 2020 marq24
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -32,6 +32,7 @@ import org.oscim.layers.vector.geometries.PointDrawable;
|
|||||||
import org.oscim.layers.vector.geometries.Style;
|
import org.oscim.layers.vector.geometries.Style;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.oscim.renderer.bucket.LineBucket;
|
import org.oscim.renderer.bucket.LineBucket;
|
||||||
|
import org.oscim.renderer.bucket.LineTexBucket;
|
||||||
import org.oscim.renderer.bucket.MeshBucket;
|
import org.oscim.renderer.bucket.MeshBucket;
|
||||||
import org.oscim.theme.styles.AreaStyle;
|
import org.oscim.theme.styles.AreaStyle;
|
||||||
import org.oscim.theme.styles.LineStyle;
|
import org.oscim.theme.styles.LineStyle;
|
||||||
@@ -235,6 +236,7 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> implements Gestur
|
|||||||
LineBucket ll = t.buckets.getLineBucket(level + 1);
|
LineBucket ll = t.buckets.getLineBucket(level + 1);
|
||||||
if (ll.line == null) {
|
if (ll.line == null) {
|
||||||
ll.line = new LineStyle(2, style.strokeColor, style.strokeWidth);
|
ll.line = new LineStyle(2, style.strokeColor, style.strokeWidth);
|
||||||
|
ll.setDropDistance(style.pointReduction ? LineBucket.MIN_DIST : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < points.getNumGeometries(); i++) {
|
for (int i = 0; i < points.getNumGeometries(); i++) {
|
||||||
@@ -273,6 +275,9 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> implements Gestur
|
|||||||
.strokeWidth(style.strokeWidth)
|
.strokeWidth(style.strokeWidth)
|
||||||
.texture(style.texture)
|
.texture(style.texture)
|
||||||
.build();
|
.build();
|
||||||
|
ll.setDropDistance(style.pointReduction ? LineBucket.MIN_DIST : 0);
|
||||||
|
if (ll instanceof LineTexBucket)
|
||||||
|
((LineTexBucket) ll).setTexRepeat(style.textureRepeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!style.fixed && style.strokeIncrease > 1)
|
if (!style.fixed && style.strokeIncrease > 1)
|
||||||
@@ -304,6 +309,7 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> implements Gestur
|
|||||||
LineBucket ll = t.buckets.getLineBucket(level + 1);
|
LineBucket ll = t.buckets.getLineBucket(level + 1);
|
||||||
if (ll.line == null) {
|
if (ll.line == null) {
|
||||||
ll.line = new LineStyle(2, style.strokeColor, style.strokeWidth);
|
ll.line = new LineStyle(2, style.strokeColor, style.strokeWidth);
|
||||||
|
ll.setDropDistance(style.pointReduction ? LineBucket.MIN_DIST : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style.generalization != Style.GENERALIZATION_NONE) {
|
if (style.generalization != Style.GENERALIZATION_NONE) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2021 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).
|
||||||
*
|
*
|
||||||
@@ -52,6 +52,8 @@ public class Style {
|
|||||||
public final int stippleColor;
|
public final int stippleColor;
|
||||||
public final float stippleWidth;
|
public final float stippleWidth;
|
||||||
public final TextureItem texture;
|
public final TextureItem texture;
|
||||||
|
public final boolean pointReduction;
|
||||||
|
public final boolean textureRepeat;
|
||||||
|
|
||||||
public final float heightOffset;
|
public final float heightOffset;
|
||||||
public final boolean randomOffset;
|
public final boolean randomOffset;
|
||||||
@@ -76,6 +78,8 @@ public class Style {
|
|||||||
stippleColor = builder.stippleColor;
|
stippleColor = builder.stippleColor;
|
||||||
stippleWidth = builder.stippleWidth;
|
stippleWidth = builder.stippleWidth;
|
||||||
texture = builder.texture;
|
texture = builder.texture;
|
||||||
|
pointReduction = builder.pointReduction;
|
||||||
|
textureRepeat = builder.textureRepeat;
|
||||||
|
|
||||||
heightOffset = builder.heightOffset;
|
heightOffset = builder.heightOffset;
|
||||||
randomOffset = builder.randomOffset;
|
randomOffset = builder.randomOffset;
|
||||||
@@ -111,6 +115,8 @@ public class Style {
|
|||||||
public int stippleColor = Color.GRAY;
|
public int stippleColor = Color.GRAY;
|
||||||
public float stippleWidth = 1;
|
public float stippleWidth = 1;
|
||||||
public TextureItem texture = null;
|
public TextureItem texture = null;
|
||||||
|
public boolean pointReduction = true;
|
||||||
|
public boolean textureRepeat = true;
|
||||||
|
|
||||||
public float heightOffset = 0;
|
public float heightOffset = 0;
|
||||||
public boolean randomOffset = true;
|
public boolean randomOffset = true;
|
||||||
@@ -248,6 +254,16 @@ public class Style {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder pointReduction(boolean pointReduction) {
|
||||||
|
this.pointReduction = pointReduction;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder textureRepeat(boolean textureRepeat) {
|
||||||
|
this.textureRepeat = textureRepeat;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder heightOffset(float heightOffset) {
|
public Builder heightOffset(float heightOffset) {
|
||||||
this.heightOffset = heightOffset;
|
this.heightOffset = heightOffset;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -14,18 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.utils.geom;
|
package org.oscim.utils.geom;
|
||||||
|
|
||||||
import org.locationtech.jts.geom.Coordinate;
|
import org.locationtech.jts.geom.*;
|
||||||
import org.locationtech.jts.geom.Geometry;
|
|
||||||
import org.locationtech.jts.geom.GeometryCollection;
|
|
||||||
import org.locationtech.jts.geom.GeometryFactory;
|
|
||||||
import org.locationtech.jts.geom.LineString;
|
|
||||||
import org.locationtech.jts.geom.LinearRing;
|
|
||||||
import org.locationtech.jts.geom.MultiLineString;
|
|
||||||
import org.locationtech.jts.geom.MultiPoint;
|
|
||||||
import org.locationtech.jts.geom.MultiPolygon;
|
|
||||||
import org.locationtech.jts.geom.Point;
|
|
||||||
import org.locationtech.jts.geom.Polygon;
|
|
||||||
import org.locationtech.jts.geom.PrecisionModel;
|
|
||||||
|
|
||||||
import java.lang.reflect.Array;
|
import java.lang.reflect.Array;
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
@@ -204,7 +193,7 @@ public class GeomBuilder {
|
|||||||
*/
|
*/
|
||||||
public GeomBuilder multiPoint() {
|
public GeomBuilder multiPoint() {
|
||||||
if (!cstack.isEmpty()) {
|
if (!cstack.isEmpty()) {
|
||||||
gstack.push(factory.createMultiPoint(cpopAll()));
|
gstack.push(factory.createMultiPointFromCoords(cpopAll()));
|
||||||
} else {
|
} else {
|
||||||
gstack.push(factory.createMultiPoint(gpopAll(Point.class)));
|
gstack.push(factory.createMultiPoint(gpopAll(Point.class)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -10,6 +10,14 @@ sourceSets {
|
|||||||
main.resources.srcDirs = ['resources']
|
main.resources.srcDirs = ['resources']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -10,6 +10,14 @@ sourceSets {
|
|||||||
main.java.srcDirs = ['src']
|
main.java.srcDirs = ['src']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -22,16 +22,7 @@ import com.wdtinc.mapbox_vector_tile.adapt.jts.MvtReader;
|
|||||||
import com.wdtinc.mapbox_vector_tile.adapt.jts.TagKeyValueMapConverter;
|
import com.wdtinc.mapbox_vector_tile.adapt.jts.TagKeyValueMapConverter;
|
||||||
import com.wdtinc.mapbox_vector_tile.adapt.jts.model.JtsLayer;
|
import com.wdtinc.mapbox_vector_tile.adapt.jts.model.JtsLayer;
|
||||||
import com.wdtinc.mapbox_vector_tile.adapt.jts.model.JtsMvt;
|
import com.wdtinc.mapbox_vector_tile.adapt.jts.model.JtsMvt;
|
||||||
|
import org.locationtech.jts.geom.*;
|
||||||
import org.locationtech.jts.geom.Coordinate;
|
|
||||||
import org.locationtech.jts.geom.Geometry;
|
|
||||||
import org.locationtech.jts.geom.GeometryFactory;
|
|
||||||
import org.locationtech.jts.geom.LineString;
|
|
||||||
import org.locationtech.jts.geom.MultiLineString;
|
|
||||||
import org.locationtech.jts.geom.MultiPoint;
|
|
||||||
import org.locationtech.jts.geom.MultiPolygon;
|
|
||||||
import org.locationtech.jts.geom.Point;
|
|
||||||
import org.locationtech.jts.geom.Polygon;
|
|
||||||
import org.oscim.core.MapElement;
|
import org.oscim.core.MapElement;
|
||||||
import org.oscim.core.Tag;
|
import org.oscim.core.Tag;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
@@ -63,6 +54,7 @@ public class TileDecoder implements ITileDecoder {
|
|||||||
mMapElement.layer = 5;
|
mMapElement.layer = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public boolean decode(Tile tile, ITileDataSink sink, InputStream is)
|
public boolean decode(Tile tile, ITileDataSink sink, InputStream is)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|||||||
@@ -18,10 +18,8 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main.java.srcDirs = ['src']
|
||||||
java.srcDirs = ['src']
|
main.resources.srcDirs = ['resources']
|
||||||
resources.srcDirs = ['resources']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mainClassName = "org.oscim.test.MapsforgeTest"
|
mainClassName = "org.oscim.test.MapsforgeTest"
|
||||||
@@ -31,8 +29,8 @@ run {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task fatJar(type: Jar, dependsOn: classes) {
|
task fatJar(type: Jar, dependsOn: configurations.runtimeClasspath) {
|
||||||
classifier = 'jar-with-dependencies'
|
classifier 'jar-with-dependencies'
|
||||||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF'
|
exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF'
|
||||||
manifest {
|
manifest {
|
||||||
|
|||||||
@@ -1,101 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2016-2020 devemux86
|
|
||||||
* Copyright 2017 nebular
|
|
||||||
*
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
import org.oscim.backend.CanvasAdapter;
|
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
|
||||||
import org.oscim.backend.canvas.Color;
|
|
||||||
import org.oscim.core.GeoPoint;
|
|
||||||
import org.oscim.gdx.GdxMapApp;
|
|
||||||
import org.oscim.layers.marker.*;
|
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
|
||||||
import org.oscim.tiling.source.UrlTileSource;
|
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ClusterMarkerLayerTest extends MarkerLayerTest {
|
|
||||||
|
|
||||||
private static final int COUNT = 5;
|
|
||||||
private static final float STEP = 100f / 110000f; // roughly 100 meters
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createLayers() {
|
|
||||||
try {
|
|
||||||
// Map events receiver
|
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
|
||||||
|
|
||||||
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
|
||||||
.build();
|
|
||||||
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
|
||||||
|
|
||||||
mMap.setMapPosition(53.08, 8.83, 1 << 15);
|
|
||||||
|
|
||||||
Bitmap bitmapPoi = CanvasAdapter.decodeBitmap(getClass().getResourceAsStream("/res/marker_poi.png"));
|
|
||||||
final MarkerSymbol symbol;
|
|
||||||
if (BILLBOARDS)
|
|
||||||
symbol = new MarkerSymbol(bitmapPoi, MarkerSymbol.HotspotPlace.BOTTOM_CENTER);
|
|
||||||
else
|
|
||||||
symbol = new MarkerSymbol(bitmapPoi, MarkerSymbol.HotspotPlace.CENTER, false);
|
|
||||||
|
|
||||||
MarkerRendererFactory markerRendererFactory = new MarkerRendererFactory() {
|
|
||||||
@Override
|
|
||||||
public MarkerRenderer create(MarkerLayer markerLayer) {
|
|
||||||
return new ClusterMarkerRenderer(markerLayer, symbol, new ClusterMarkerRenderer.ClusterStyle(Color.WHITE, Color.BLUE)) {
|
|
||||||
@Override
|
|
||||||
protected Bitmap getClusterBitmap(int size) {
|
|
||||||
// Can customize cluster bitmap here
|
|
||||||
return super.getClusterBitmap(size);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
mMarkerLayer = new ItemizedLayer(
|
|
||||||
mMap,
|
|
||||||
new ArrayList<MarkerInterface>(),
|
|
||||||
markerRendererFactory,
|
|
||||||
this);
|
|
||||||
mMap.layers().add(mMarkerLayer);
|
|
||||||
|
|
||||||
// Create some markers spaced STEP degrees
|
|
||||||
List<MarkerInterface> pts = new ArrayList<>();
|
|
||||||
GeoPoint center = mMap.getMapPosition().getGeoPoint();
|
|
||||||
for (int x = -COUNT; x < COUNT; x++) {
|
|
||||||
for (int y = -COUNT; y < COUNT; y++) {
|
|
||||||
double random = STEP * Math.random() * 2;
|
|
||||||
MarkerItem item = new MarkerItem(y + ", " + x, "",
|
|
||||||
new GeoPoint(center.getLatitude() + y * STEP + random, center.getLongitude() + x * STEP + random)
|
|
||||||
);
|
|
||||||
pts.add(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mMarkerLayer.addItems(pts);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
GdxMapApp.init();
|
|
||||||
GdxMapApp.run(new ClusterMarkerLayerTest());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -28,16 +28,15 @@ import org.oscim.layers.marker.ItemizedLayer;
|
|||||||
import org.oscim.layers.marker.MarkerInterface;
|
import org.oscim.layers.marker.MarkerInterface;
|
||||||
import org.oscim.layers.marker.MarkerItem;
|
import org.oscim.layers.marker.MarkerItem;
|
||||||
import org.oscim.layers.marker.MarkerSymbol;
|
import org.oscim.layers.marker.MarkerSymbol;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.oscim.theme.VtmThemes;
|
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
import static org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
||||||
@@ -53,14 +52,11 @@ public class MarkerLayerLabelsTest extends GdxMapApp implements ItemizedLayer.On
|
|||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
mMap.layers().add(new MapEventsReceiver(mMap));
|
||||||
|
|
||||||
TileSource tileSource = OSciMap4TileSource.builder()
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
|
||||||
|
|
||||||
mMap.setTheme(VtmThemes.DEFAULT);
|
|
||||||
|
|
||||||
// goto berlin
|
// goto berlin
|
||||||
mMap.setMapPosition(52.513452, 13.363791, 1 << 13);
|
mMap.setMapPosition(52.513452, 13.363791, 1 << 13);
|
||||||
|
|||||||
@@ -10,25 +10,23 @@ dependencies {
|
|||||||
implementation 'com.fifesoft:rsyntaxtextarea:2.6.1'
|
implementation 'com.fifesoft:rsyntaxtextarea:2.6.1'
|
||||||
implementation 'com.jtattoo:JTattoo:1.6.11'
|
implementation 'com.jtattoo:JTattoo:1.6.11'
|
||||||
|
|
||||||
implementation 'org.mapsforge:mapsforge-core:0.16.0'
|
implementation 'org.mapsforge:mapsforge-core:0.17.0'
|
||||||
implementation 'org.mapsforge:mapsforge-map:0.16.0'
|
implementation 'org.mapsforge:mapsforge-map:0.17.0'
|
||||||
implementation 'org.mapsforge:mapsforge-map-awt:0.16.0'
|
implementation 'org.mapsforge:mapsforge-map-awt:0.17.0'
|
||||||
implementation 'org.mapsforge:mapsforge-map-reader:0.16.0'
|
implementation 'org.mapsforge:mapsforge-map-reader:0.17.0'
|
||||||
implementation 'org.mapsforge:mapsforge-themes:0.16.0'
|
implementation 'org.mapsforge:mapsforge-themes:0.17.0'
|
||||||
implementation 'net.sf.kxml:kxml2:2.3.0'
|
implementation 'net.sf.kxml:kxml2:2.3.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main.java.srcDirs = ['src']
|
||||||
java.srcDirs = ['src']
|
main.resources.srcDirs = ['resources']
|
||||||
resources.srcDirs = ['resources']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mainClassName = "org.oscim.theme.comparator.Main"
|
mainClassName = "org.oscim.theme.comparator.Main"
|
||||||
|
|
||||||
task fatJar(type: Jar, dependsOn: classes) {
|
task fatJar(type: Jar, dependsOn: configurations.runtimeClasspath) {
|
||||||
classifier = 'jar-with-dependencies'
|
classifier 'jar-with-dependencies'
|
||||||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF'
|
exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF'
|
||||||
manifest {
|
manifest {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
@@ -10,6 +10,14 @@ sourceSets {
|
|||||||
main.resources.srcDirs = ['resources']
|
main.resources.srcDirs = ['resources']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 340 340" style="enable-background:new 0 0 340 340;" xml:space="preserve">
|
||||||
|
<path d="M286.5,34.7H153.2c-1.9,0-3.5,1.6-3.5,3.5v118.1c-13.5,0.2-27.7,4.1-41.1,11.3V136l13.3-0.1l14-42.9V76.8h-9.5
|
||||||
|
V41.2c0-1.9-1.6-3.5-3.5-3.5h-3.1c-1.9,0-3.5,1.6-3.5,3.5v35.7H88V41.6c0-1.9-1.6-3.5-3.5-3.5h-3.1c-1.9,0-3.5,1.6-3.5,3.5v35.2
|
||||||
|
H67.4v15.1l14.3,44.3l12.6-0.1l0,40.7C69.2,196,50,228.1,50,269.8c0,17.2,11.6,35.5,29.3,35.5c17.7,0,29.3-19.1,29.3-36.3v-85.5
|
||||||
|
c12.6-8.2,26.8-12.8,41.1-13v128.4c0,1.9,1.6,3.5,3.5,3.5h133.3c1.9,0,3.5-1.6,3.5-3.5V38.2C290,36.3,288.4,34.7,286.5,34.7z
|
||||||
|
M79.7,291.3c-9.4,0-15.8-11.5-15.8-21.5c0-30.9,12.3-57.2,30.6-75l0,74.5C94.4,279,88.1,291.3,79.7,291.3z M272,148.2
|
||||||
|
c0,2.3-1.9,4.2-4.2,4.2H172c-2.3,0-4.2-1.9-4.2-4.2V73.1c0-2.3,1.9-4.2,4.2-4.2h95.7c2.3,0,4.2,1.9,4.2,4.2V148.2z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M286.5,34.7H153.2c-1.9,0-3.5,1.6-3.5,3.5v118.1c-13.5,0.2-27.7,4.1-41.1,11.3V136l13.3-0.1l14-42.9V76.8h-9.5
|
||||||
|
V41.2c0-1.9-1.6-3.5-3.5-3.5h-3.1c-1.9,0-3.5,1.6-3.5,3.5v35.7H88V41.6c0-1.9-1.6-3.5-3.5-3.5h-3.1c-1.9,0-3.5,1.6-3.5,3.5v35.2
|
||||||
|
H67.4v15.1l14.3,44.3l12.6-0.1l0,40.7C69.2,196,50,228.1,50,269.8c0,17.2,11.6,35.5,29.3,35.5c17.7,0,29.3-19.1,29.3-36.3v-85.5
|
||||||
|
c12.6-8.2,26.8-12.8,41.1-13v128.4c0,1.9,1.6,3.5,3.5,3.5h133.3c1.9,0,3.5-1.6,3.5-3.5V38.2C290,36.3,288.4,34.7,286.5,34.7z
|
||||||
|
M79.7,291.3c-9.4,0-15.8-11.5-15.8-21.5c0-30.9,12.3-57.2,30.6-75l0,74.5C94.4,279,88.1,291.3,79.7,291.3z M272,148.2
|
||||||
|
c0,2.3-1.9,4.2-4.2,4.2H172c-2.3,0-4.2-1.9-4.2-4.2V73.1c0-2.3,1.9-4.2,4.2-4.2h95.7c2.3,0,4.2,1.9,4.2,4.2V148.2z" fill="#ac39ac"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,20 @@
|
|||||||
|
<svg width="580" height="580" viewBox="0 0 580 580" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M47.8789 429.041V59.166H187.402C211.959 59.1664 230.714 60.3438 243.666 62.6982C261.831 65.7262 277.053 71.4871 289.332 79.981C301.611 88.4755 311.493 100.376 318.978 115.682C326.463 130.988 330.205 147.809 330.205 166.142C330.205 197.596 320.197 224.214 300.181 245.996C280.165 267.778 244.002 278.669 191.691 278.669H96.8256V429.041H47.8789ZM96.8256 235.021H192.448C224.07 235.021 246.525 229.134 259.813 217.36C273.101 205.586 279.745 189.018 279.745 167.656C279.745 152.182 275.834 138.936 268.013 127.918C260.191 116.902 249.889 109.627 237.106 106.094C228.864 103.908 213.641 102.815 191.439 102.814H96.8256V235.021Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M406.184 276.12C402.122 260.466 387.834 248.873 370.962 248.873C350.803 248.873 334.521 265.081 334.521 285.203C334.521 288.599 334.928 291.7 335.777 294.728H350.397C351.468 297.239 352.649 298.678 352.649 298.678C357.043 305.029 364.39 309.127 372.697 309.127C386.173 309.127 397.138 298.162 397.138 284.686C397.138 281.584 397.913 278.778 396.621 276.12H406.184Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M405.187 493.396C401.348 497.272 396.068 500.263 390.124 500.263L390.087 421.069L444.876 405.341L458.611 432.366L405.187 493.396H405.187Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M359.185 312.265C355.566 308.241 350.361 305.693 344.49 305.693C338.251 305.693 332.676 308.573 329.095 313.114L285.603 379.534C283.83 382.487 282.833 385.958 282.833 389.613C282.833 396.48 286.304 402.461 291.547 405.969L349.881 438.348V493.433C349.881 501.223 356.194 507.573 363.984 507.573C371.737 507.573 378.088 501.223 378.088 493.433V424.65C378.088 424.65 379.934 413.685 367.492 407.704L331.125 388.653L357.634 348.189L371.7 370.267C374.506 374.734 378.309 376.469 381.78 376.396L417.888 376.248C432.582 376.248 432.582 357.123 417.888 357.197H388.61L359.185 312.265Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M519.049 402.535C519.64 403.125 519.935 403.827 519.935 404.787C519.935 406.522 518.495 407.962 516.76 407.962C516.28 407.962 515.985 407.962 515.615 407.814C509.376 405.156 505.425 403.495 498.152 403.495C493.352 403.495 487.408 405.156 480.541 410.694L474.191 398.141C482.129 395.778 488.627 393.674 495.42 393.674C506.275 393.674 511.96 395.926 519.049 402.535Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M276.483 412.208L337.697 445.953L337.844 459.503L267.918 420.995C262.86 418.411 256.066 416.897 251.23 416.897C244.03 416.897 240.006 418.558 233.803 421.217C233.397 421.364 233.065 421.364 232.659 421.364C230.924 421.364 229.447 419.924 229.447 418.189C229.447 417.266 229.816 416.528 230.37 415.937C237.458 409.291 244.695 407.076 255.512 407.076C261.087 407.076 267.807 407.741 276.483 412.208Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M282.169 536.371C302.106 536.371 318.277 520.2 318.277 500.226C318.277 480.252 302.106 464.081 282.169 464.081C262.232 464.081 246.061 480.252 246.061 500.226C246.061 520.2 262.232 536.371 282.169 536.371ZM230.074 500.263C230.074 471.502 253.408 448.132 282.169 448.132C310.966 448.132 334.3 471.502 334.3 500.263C334.3 529.024 310.966 552.395 282.169 552.395C253.408 552.395 230.074 529.024 230.074 500.263Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M497.635 536.371C517.572 536.371 533.78 520.2 533.78 500.226C533.78 480.252 517.609 464.081 497.635 464.081C477.661 464.081 461.527 480.252 461.527 500.226C461.527 520.2 477.698 536.371 497.635 536.371ZM445.541 500.263C445.541 471.502 468.837 448.132 497.635 448.132C526.396 448.132 549.729 471.502 549.729 500.263C549.729 529.024 526.396 552.395 497.635 552.395C468.837 552.395 445.541 529.024 445.541 500.263Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M486.116 440.674L460.789 390.056C457.466 384.001 451.005 379.829 443.584 379.829H427.044C423.832 379.829 421.21 382.487 421.21 385.736C421.21 388.985 423.832 391.57 427.044 391.57L443.584 391.496C446.353 391.496 449.454 393.379 450.636 396.111L474.486 444.698L486.116 440.674V440.674Z" mix-blend-mode="normal" solid-color="#000000" opacity="0.8" color-interpolation-filters="linearRGB" filter-gaussianBlur-deviation="0" color="#000000" image-rendering="auto" color-rendering="auto" stroke-width="32" isolation="auto" color-interpolation="sRGB" solid-opacity="1" fill="none" stroke-linejoin="round" filter-blend-mode="normal" stroke="#ffffff" shape-rendering="auto"/>
|
||||||
|
<path d="M47.8789 429.041V59.166H187.402C211.959 59.1664 230.714 60.3438 243.666 62.6982C261.831 65.7262 277.053 71.4871 289.332 79.981C301.611 88.4755 311.493 100.376 318.978 115.682C326.463 130.988 330.205 147.809 330.205 166.142C330.205 197.596 320.197 224.214 300.181 245.996C280.165 267.778 244.002 278.669 191.691 278.669H96.8256V429.041H47.8789ZM96.8256 235.021H192.448C224.07 235.021 246.525 229.134 259.813 217.36C273.101 205.586 279.745 189.018 279.745 167.656C279.745 152.182 275.834 138.936 268.013 127.918C260.191 116.902 249.889 109.627 237.106 106.094C228.864 103.908 213.641 102.815 191.439 102.814H96.8256V235.021Z" fill="#0092da"/>
|
||||||
|
<path d="M406.184 276.12C402.122 260.466 387.834 248.873 370.962 248.873C350.803 248.873 334.521 265.081 334.521 285.203C334.521 288.599 334.928 291.7 335.777 294.728H350.397C351.468 297.239 352.649 298.678 352.649 298.678C357.043 305.029 364.39 309.127 372.697 309.127C386.173 309.127 397.138 298.162 397.138 284.686C397.138 281.584 397.913 278.778 396.621 276.12H406.184Z" fill="#0092da"/>
|
||||||
|
<path d="M405.187 493.396C401.348 497.272 396.068 500.263 390.124 500.263L390.087 421.069L444.876 405.341L458.611 432.366L405.187 493.396H405.187Z" fill="#0092da"/>
|
||||||
|
<path d="M359.185 312.265C355.566 308.241 350.361 305.693 344.49 305.693C338.251 305.693 332.676 308.573 329.095 313.114L285.603 379.534C283.83 382.487 282.833 385.958 282.833 389.613C282.833 396.48 286.304 402.461 291.547 405.969L349.881 438.348V493.433C349.881 501.223 356.194 507.573 363.984 507.573C371.737 507.573 378.088 501.223 378.088 493.433V424.65C378.088 424.65 379.934 413.685 367.492 407.704L331.125 388.653L357.634 348.189L371.7 370.267C374.506 374.734 378.309 376.469 381.78 376.396L417.888 376.248C432.582 376.248 432.582 357.123 417.888 357.197H388.61L359.185 312.265Z" fill="#0092da"/>
|
||||||
|
<path d="M519.049 402.535C519.64 403.125 519.935 403.827 519.935 404.787C519.935 406.522 518.495 407.962 516.76 407.962C516.28 407.962 515.985 407.962 515.615 407.814C509.376 405.156 505.425 403.495 498.152 403.495C493.352 403.495 487.408 405.156 480.541 410.694L474.191 398.141C482.129 395.778 488.627 393.674 495.42 393.674C506.275 393.674 511.96 395.926 519.049 402.535Z" fill="#0092da"/>
|
||||||
|
<path d="M276.483 412.208L337.697 445.953L337.844 459.503L267.918 420.995C262.86 418.411 256.066 416.897 251.23 416.897C244.03 416.897 240.006 418.558 233.803 421.217C233.397 421.364 233.065 421.364 232.659 421.364C230.924 421.364 229.447 419.924 229.447 418.189C229.447 417.266 229.816 416.528 230.37 415.937C237.458 409.291 244.695 407.076 255.512 407.076C261.087 407.076 267.807 407.741 276.483 412.208Z" fill="#0092da"/>
|
||||||
|
<path d="M282.169 536.371C302.106 536.371 318.277 520.2 318.277 500.226C318.277 480.252 302.106 464.081 282.169 464.081C262.232 464.081 246.061 480.252 246.061 500.226C246.061 520.2 262.232 536.371 282.169 536.371ZM230.074 500.263C230.074 471.502 253.408 448.132 282.169 448.132C310.966 448.132 334.3 471.502 334.3 500.263C334.3 529.024 310.966 552.395 282.169 552.395C253.408 552.395 230.074 529.024 230.074 500.263Z" fill="#0092da"/>
|
||||||
|
<path d="M497.635 536.371C517.572 536.371 533.78 520.2 533.78 500.226C533.78 480.252 517.609 464.081 497.635 464.081C477.661 464.081 461.527 480.252 461.527 500.226C461.527 520.2 477.698 536.371 497.635 536.371ZM445.541 500.263C445.541 471.502 468.837 448.132 497.635 448.132C526.396 448.132 549.729 471.502 549.729 500.263C549.729 529.024 526.396 552.395 497.635 552.395C468.837 552.395 445.541 529.024 445.541 500.263Z" fill="#0092da"/>
|
||||||
|
<path d="M486.116 440.674L460.789 390.056C457.466 384.001 451.005 379.829 443.584 379.829H427.044C423.832 379.829 421.21 382.487 421.21 385.736C421.21 388.985 423.832 391.57 427.044 391.57L443.584 391.496C446.353 391.496 449.454 393.379 450.636 396.111L474.486 444.698L486.116 440.674V440.674Z" fill="#0092da"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 11 KiB |
@@ -2,6 +2,6 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" height="580" width="580" version="1.0">
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" height="580" width="580" version="1.0">
|
||||||
<metadata id="metadata2975"/>
|
<metadata id="metadata2975"/>
|
||||||
<path id="path8076" d="m 556.36,242.65 c -27.13,-0.43 -54.27,-0.86 -81.4,-1.29 -77.91,77.91 -155.81,155.81 -233.72,233.72 0,27.13 0,54.27 0,81.41 M 337.33,23.633 c 0.44,27.136 0.87,54.267 1.31,81.407 -77.91,77.91 -155.81,155.82 -233.72,233.72 -27.141,0 -54.271,0 -81.408,0" inkscape:connector-curvature="0" opacity="0.8" fill="none" stroke="#ffffff" stroke-linejoin="round" stroke-width="105.38"/>
|
<path id="path8076" d="m 556.36,242.65 c -27.13,-0.43 -54.27,-0.86 -81.4,-1.29 -77.91,77.91 -155.81,155.81 -233.72,233.72 0,27.13 0,54.27 0,81.41 M 337.33,23.633 c 0.44,27.136 0.87,54.267 1.31,81.407 -77.91,77.91 -155.81,155.82 -233.72,233.72 -27.141,0 -54.271,0 -81.408,0" inkscape:connector-curvature="0" opacity="0.8" fill="none" stroke="#ffffff" stroke-linejoin="round" stroke-width="105.38"/>
|
||||||
<path id="path3068" d="m 337.33,23.633 c 0.44,27.136 0.87,54.267 1.31,81.407 -77.91,77.91 -155.81,155.82 -233.72,233.72 -27.141,0 -54.271,0 -81.408,0" inkscape:connector-curvature="0" opacity="0.8" fill="none" stroke="#820000" stroke-width="63.23"/>
|
<path id="path3068" d="m 337.33,23.633 c 0.44,27.136 0.87,54.267 1.31,81.407 -77.91,77.91 -155.81,155.82 -233.72,233.72 -27.141,0 -54.271,0 -81.408,0" inkscape:connector-curvature="0" opacity="0.8" fill="none" stroke="#000000" stroke-width="63.23"/>
|
||||||
<path id="path3068-9" d="m 556.36,242.65 c -27.13,-0.43 -54.27,-0.86 -81.4,-1.29 -77.91,77.91 -155.81,155.81 -233.72,233.72 0,27.13 0,54.27 0,81.41" inkscape:connector-curvature="0" opacity="0.8" fill="none" stroke="#820000" stroke-width="63.23"/>
|
<path id="path3068-9" d="m 556.36,242.65 c -27.13,-0.43 -54.27,-0.86 -81.4,-1.29 -77.91,77.91 -155.81,155.81 -233.72,233.72 0,27.13 0,54.27 0,81.41" inkscape:connector-curvature="0" opacity="0.8" fill="none" stroke="#000000" stroke-width="63.23"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1276,7 +1276,15 @@
|
|||||||
<!-- place -->
|
<!-- place -->
|
||||||
<m k="place">
|
<m k="place">
|
||||||
<m v="locality" zoom-min="13">
|
<m v="locality" zoom-min="13">
|
||||||
<caption style="bold" fill="#606060" k="name" priority="5" size="14"
|
<caption style="bold" fill="#606060" k="name" priority="7" size="14"
|
||||||
|
stroke="#ffffff" stroke-width="2.0" />
|
||||||
|
</m>
|
||||||
|
<m v="neighbourhood" zoom-min="13">
|
||||||
|
<caption style="bold" fill="#404040" k="name" priority="6" size="14"
|
||||||
|
stroke="#ffffff" stroke-width="2.0" />
|
||||||
|
</m>
|
||||||
|
<m v="hamlet" zoom-min="13">
|
||||||
|
<caption style="bold" fill="#404040" k="name" priority="5" size="14"
|
||||||
stroke="#ffffff" stroke-width="2.0" />
|
stroke="#ffffff" stroke-width="2.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="suburb" zoom-max="14">
|
<m v="suburb" zoom-max="14">
|
||||||
|
|||||||
@@ -1284,7 +1284,11 @@
|
|||||||
|
|
||||||
<m k="place" select="first">
|
<m k="place" select="first">
|
||||||
<m v="locality" zoom-min="13">
|
<m v="locality" zoom-min="13">
|
||||||
<caption style="bold" fill="#606060" k="name" size="14" stroke="#ffffff"
|
<caption style="bold" fill="#606060" k="name" size="12" stroke="#ffffff"
|
||||||
|
stroke-width="2.0" />
|
||||||
|
</m>
|
||||||
|
<m v="neighbourhood" zoom-min="13">
|
||||||
|
<caption style="bold" fill="#000000" k="name" size="13" stroke="#ffffff"
|
||||||
stroke-width="2.0" />
|
stroke-width="2.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="hamlet" zoom-min="13">
|
<m v="hamlet" zoom-min="13">
|
||||||
|
|||||||
@@ -1287,7 +1287,11 @@
|
|||||||
|
|
||||||
<m k="place" select="first">
|
<m k="place" select="first">
|
||||||
<m v="locality" zoom-min="13">
|
<m v="locality" zoom-min="13">
|
||||||
<caption style="bold" fill="#606060" k="name" size="14" stroke="#ffffff"
|
<caption style="bold" fill="#606060" k="name" size="12" stroke="#ffffff"
|
||||||
|
stroke-width="2.0" />
|
||||||
|
</m>
|
||||||
|
<m v="neighbourhood" zoom-min="13">
|
||||||
|
<caption style="bold" fill="#000000" k="name" size="13" stroke="#ffffff"
|
||||||
stroke-width="2.0" />
|
stroke-width="2.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="hamlet" zoom-min="13">
|
<m v="hamlet" zoom-min="13">
|
||||||
|
|||||||
@@ -1287,7 +1287,11 @@
|
|||||||
|
|
||||||
<m k="place" select="first">
|
<m k="place" select="first">
|
||||||
<m v="locality" zoom-min="13">
|
<m v="locality" zoom-min="13">
|
||||||
<caption style="bold" fill="#606060" k="name" size="14" stroke="#ffffff"
|
<caption style="bold" fill="#606060" k="name" size="12" stroke="#ffffff"
|
||||||
|
stroke-width="2.0" />
|
||||||
|
</m>
|
||||||
|
<m v="neighbourhood" zoom-min="13">
|
||||||
|
<caption style="bold" fill="#000000" k="name" size="13" stroke="#ffffff"
|
||||||
stroke-width="2.0" />
|
stroke-width="2.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="hamlet" zoom-min="13">
|
<m v="hamlet" zoom-min="13">
|
||||||
|
|||||||
@@ -1276,7 +1276,11 @@
|
|||||||
|
|
||||||
<m k="place" select="first">
|
<m k="place" select="first">
|
||||||
<m v="locality" zoom-min="13">
|
<m v="locality" zoom-min="13">
|
||||||
<caption style="bold" fill="#606060" k="name" size="14" stroke="#ffffff"
|
<caption style="bold" fill="#606060" k="name" size="12" stroke="#ffffff"
|
||||||
|
stroke-width="2.0" />
|
||||||
|
</m>
|
||||||
|
<m v="neighbourhood" zoom-min="13">
|
||||||
|
<caption style="bold" fill="#000000" k="name" size="13" stroke="#ffffff"
|
||||||
stroke-width="2.0" />
|
stroke-width="2.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="hamlet" zoom-min="13">
|
<m v="hamlet" zoom-min="13">
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ buildscript {
|
|||||||
maven { url "https://plugins.gradle.org/m2/" }
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.wisepersist:gwt-gradle-plugin:1.0.13'
|
classpath 'org.wisepersist:gwt-gradle-plugin:1.1.15'
|
||||||
classpath 'gradle.plugin.org.gretty:gretty:3.0.3'
|
classpath 'org.gretty:gretty:4.0.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ buildscript {
|
|||||||
maven { url "https://plugins.gradle.org/m2/" }
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.wisepersist:gwt-gradle-plugin:1.0.13'
|
classpath 'org.wisepersist:gwt-gradle-plugin:1.1.15'
|
||||||
classpath 'gradle.plugin.org.gretty:gretty:3.0.3'
|
classpath 'org.gretty:gretty:4.0.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.wisepersist:gwt-gradle-plugin:1.0.13'
|
classpath 'org.wisepersist:gwt-gradle-plugin:1.1.15'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'gwt-base'
|
apply plugin: 'gwt-base'
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@@ -81,6 +81,14 @@ javadoc {
|
|||||||
options.addStringOption("sourcepath", "")
|
options.addStringOption("sourcepath", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import com.google.gwt.dom.client.NativeEvent;
|
|||||||
import com.google.gwt.dom.client.Touch;
|
import com.google.gwt.dom.client.Touch;
|
||||||
import com.google.gwt.event.dom.client.KeyCodes;
|
import com.google.gwt.event.dom.client.KeyCodes;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class GwtInput implements Input {
|
public class GwtInput implements Input {
|
||||||
static final int MAX_TOUCHES = 20;
|
static final int MAX_TOUCHES = 20;
|
||||||
boolean justTouched = false;
|
boolean justTouched = false;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api 'net.sf.kxml:kxml2:2.3.0'
|
api 'net.sf.kxml:kxml2:2.3.0'
|
||||||
@@ -12,6 +12,14 @@ sourceSets {
|
|||||||
main.resources.srcDirs = ['resources']
|
main.resources.srcDirs = ['resources']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (project.hasProperty("SONATYPE_USERNAME")) {
|
if (project.hasProperty("SONATYPE_USERNAME")) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
project.apply from: "${rootProject.projectDir}/deploy.gradle"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Copyright 2016 Izumi Kawashima
|
* Copyright 2016 Izumi Kawashima
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
* Copyright 2017-2020 devemux86
|
* Copyright 2017-2020 devemux86
|
||||||
* Copyright 2017 nebular
|
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -36,22 +35,4 @@ public class InternalItem {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "\n" + x + ":" + y + " / " + dy + " " + visible;
|
return "\n" + x + ":" + y + " / " + dy + " " + visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Extension to the above class for clustered items. This could be a separate 1st level class,
|
|
||||||
* but it is included here not to pollute the source tree with tiny new files.
|
|
||||||
* It only adds a couple properties to InternalItem, and the semantics "InternalItem.Clustered"
|
|
||||||
* are not bad.
|
|
||||||
*/
|
|
||||||
public static class Clustered extends InternalItem {
|
|
||||||
/**
|
|
||||||
* If this is >0, this item will be displayed as a cluster circle, with size clusterSize+1.
|
|
||||||
*/
|
|
||||||
public int clusterSize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If this is true, this item is hidden (because it's represented by another InternalItem acting as cluster.
|
|
||||||
*/
|
|
||||||
public boolean clusteredOut;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2012 osmdroid authors: Nicolas Gramlich, Theodore Hong, Fred Eisele
|
* Copyright 2012 osmdroid authors: Nicolas Gramlich, Theodore Hong, Fred Eisele
|
||||||
*
|
*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2020 devemux86
|
* Copyright 2016-2021 devemux86
|
||||||
* Copyright 2016 Stephan Leuschner
|
* Copyright 2016 Stephan Leuschner
|
||||||
* Copyright 2016 Pedinel
|
* Copyright 2016 Pedinel
|
||||||
* Copyright 2019 Carlos Alberto Martínez Gadea
|
* Copyright 2019 Carlos Alberto Martínez Gadea
|
||||||
@@ -78,7 +78,7 @@ public class ItemizedLayer extends MarkerLayer implements GestureListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected synchronized MarkerInterface createItem(int index) {
|
public synchronized MarkerInterface createItem(int index) {
|
||||||
return mItemList.get(index);
|
return mItemList.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
* Copyright 2016 devemux86
|
* Copyright 2016 devemux86
|
||||||
* Copyright 2016 Erik Duisters
|
* Copyright 2016 Erik Duisters
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
* Copyright 2017 nebular
|
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -82,18 +81,4 @@ public class MarkerItem implements MarkerInterface {
|
|||||||
if (mMarker != null)
|
if (mMarker != null)
|
||||||
mMarker.setRotation(rotation);
|
mMarker.setRotation(rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* If a MarkerItem is created using this convenience class instead of MarkerItem,
|
|
||||||
* this specific item will not be clusterable.
|
|
||||||
*/
|
|
||||||
public static class NonClusterable extends MarkerItem {
|
|
||||||
public NonClusterable(String title, String description, GeoPoint geoPoint) {
|
|
||||||
super(null, title, description, geoPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
public NonClusterable(Object uid, String title, String description, GeoPoint geoPoint) {
|
|
||||||
super(uid, title, description, geoPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user