Compare commits
114 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a374bc635 | ||
|
|
8602b5780a | ||
|
|
ab32f25a7c | ||
|
|
ebfb7bd85d | ||
|
|
ed739c59f5 | ||
|
|
238a5f8f14 | ||
|
|
126c47dfd7 | ||
|
|
e8389e6887 | ||
|
|
81f526dc56 | ||
|
|
23ae072ed6 | ||
|
|
20f4fad7f3 | ||
|
|
1805e86173 | ||
|
|
8acda4fbf5 | ||
|
|
65d8bd9675 | ||
|
|
34ea0af92d | ||
|
|
2d64186a1a | ||
|
|
4604f07042 | ||
|
|
52f47bd797 | ||
|
|
50f885b5f8 | ||
|
|
742405a193 | ||
|
|
18ee0a393f | ||
|
|
29634d29b5 | ||
|
|
635d5bacdd | ||
|
|
1156976ea5 | ||
|
|
964736d60f | ||
|
|
2de19ef080 | ||
|
|
0faf3eca66 | ||
|
|
c239d8c1b7 | ||
|
|
c28aec5f59 | ||
|
|
e0efff50a8 | ||
|
|
8364ff83d1 | ||
|
|
5d7a4e0954 | ||
|
|
2785d22a3a | ||
|
|
2768f84a5f | ||
|
|
1ede5c5456 | ||
|
|
5778d0e74a | ||
|
|
6672c57f05 | ||
|
|
c1fbdb42be | ||
|
|
841b3af042 | ||
|
|
bdd08e3486 | ||
|
|
68679c6dc0 | ||
|
|
9f280a41c0 | ||
|
|
65c8d5199f | ||
|
|
2b8326f465 | ||
|
|
488b350671 | ||
|
|
5285b0c272 | ||
|
|
ebe98c8990 | ||
|
|
c30095c59d | ||
|
|
f449a0a6fb | ||
|
|
74dfa07c81 | ||
|
|
bf6b325ce8 | ||
|
|
b43dfc53e4 | ||
|
|
883ed23272 | ||
|
|
0a0c2b3ce0 | ||
|
|
c783255b97 | ||
|
|
c689ad9e67 | ||
|
|
0fabe4c738 | ||
|
|
d4a95dad19 | ||
|
|
4405b6235a | ||
|
|
766b0d9914 | ||
|
|
412cacd1c2 | ||
|
|
299592d352 | ||
|
|
d512731d06 | ||
|
|
b2a8d3040a | ||
|
|
892ea92580 | ||
|
|
f7acfd9017 | ||
|
|
701ac43746 | ||
|
|
b926310296 | ||
|
|
49d1e7bafc | ||
|
|
6f697ed6f8 | ||
|
|
cdcae29ae1 | ||
|
|
a13c4a3793 | ||
|
|
031a3bfa00 | ||
|
|
7122e1fbc5 | ||
|
|
6ed00d9a94 | ||
|
|
327d6f1466 | ||
|
|
17a135813b | ||
|
|
0dd82cb68f | ||
|
|
ae04fa83f6 | ||
|
|
4bfcdadb76 | ||
|
|
fa5a72f20d | ||
|
|
d81eb3d706 | ||
|
|
97332e3e73 | ||
|
|
e4a4857eb8 | ||
|
|
80018de754 | ||
|
|
01bb7ca074 | ||
|
|
a8f5eee505 | ||
|
|
644cf9dcb6 | ||
|
|
cb0109ba42 | ||
|
|
2fa5afec11 | ||
|
|
69ea1e414a | ||
|
|
4866abe38e | ||
|
|
4c10d5848b | ||
|
|
faed3d05a5 | ||
|
|
88a9a9ee7f | ||
|
|
3915e3343d | ||
|
|
b22c023f1a | ||
|
|
5de7c9ec38 | ||
|
|
14c485914c | ||
|
|
c20922b5f5 | ||
|
|
1294ff9fea | ||
|
|
992d9c8e66 | ||
|
|
948449b3ec | ||
|
|
0c1c06c1bb | ||
|
|
7ad3f4a0b1 | ||
|
|
c5836adc17 | ||
|
|
107a429517 | ||
|
|
2cb0a80c47 | ||
|
|
db9f83120a | ||
|
|
5facdb9888 | ||
|
|
3f3caa1912 | ||
|
|
03b9f224b2 | ||
|
|
c013465d49 | ||
|
|
c91833519e |
@@ -5,7 +5,7 @@ jdk:
|
|||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- ANDROID=29
|
- ANDROID=29
|
||||||
- ANDROID_BUILD_TOOLS=29.0.2
|
- ANDROID_BUILD_TOOLS=29.0.3
|
||||||
- GRADLE_OPTS="-Xmx2048m"
|
- 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: 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=
|
- secure: AdKSZKA4gMuKXI4X4dQNJqcMv5OmPIHdN8fpy55Y9yoOQPQHZE3Zwc4QDWBh20q298jyEC854tVTPTysdZ7h+2s2FhsprYv1Bt/QNzKIrLpeIMj2quuVGMbdPuk08y55gost94KwVLJv0sIDpRlB/PEQkA7Mg/UDsT9zR8E1Ms5x+ul2C8e1ag0zzNl1wVnT5jY8WCp74uA/XXCcJl/80qT1stUERazCKwbKNo007hi7rdm4HA7YGevORq8e2r67je+WIBZUAwrHT0Zjuo4ibwUii4LdwvjuN3w0Z6e9Wf4x5bBqGgnih0T31uom2yPjNx+U/c2AWI+Nxfy/SEF2U+9bjBEZ3ZhI7F1B9ofXo2mhvvsVDiUrymMBbG2V64C9kAzeUh7xIBTqIrbdtpAEBV9FlLAtF2swVTwtCgZgcVTOt3RKXCi3X3nk3cuH7PAorFa/QGfT4xxVu2011FVAt2Rm7SD0ZWztZTSTz/4Nt/egtGBOJfrCc7oLEygLzDmLqsqCwCROITVQjWLjrtqDyLteaNiSXeNIQMKun3izApbXnHmXB+FV3R3EZocboqk3v5bmPTahnG6Ghc2zknWyyxSx+O9qIfOpHUL8JMJiT82lUQUeibtCn7DCE8wVQ/gYC5i+a+KO/d3NemSzIFlZ8aoUiEPYq18dYlsDXeLXwF0=
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,10 +14,10 @@ allprojects {
|
|||||||
version = 'master-SNAPSHOT'
|
version = 'master-SNAPSHOT'
|
||||||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
||||||
|
|
||||||
ext.androidBuildVersionTools = "29.0.2"
|
ext.androidBuildVersionTools = "29.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.25"
|
ext.slf4jVersion = "1.7.28"
|
||||||
|
|
||||||
if (JavaVersion.current().isJava8Compatible()) {
|
if (JavaVersion.current().isJava8Compatible()) {
|
||||||
tasks.withType(Javadoc) {
|
tasks.withType(Javadoc) {
|
||||||
@@ -42,14 +42,13 @@ def versionName() { return version }
|
|||||||
subprojects {
|
subprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
maven { url 'https://repo.boundlessgeo.com/main/' }
|
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
| [Cruiser](http://wiki.openstreetmap.org/wiki/Cruiser) | Map and navigation application | Proprietary/Free | Android, Desktop | Closed |
|
| [Cruiser](http://wiki.openstreetmap.org/wiki/Cruiser) | Map and navigation application | 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 |
|
||||||
| [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 and Commercial | Android | Closed |
|
| [Kurviger](https://kurviger.de/en) | Route planner specialized on motorcyclists | Proprietary/Free and Commercial | Android | Closed |
|
||||||
| [MapTrek](http://maptrek.mobi) | Application for outdoor activities | GPL3/Free and Commercial | Android | Open |
|
| [MapTrek](http://maptrek.mobi) | Application for outdoor activities | GPL3/Free and Commercial | Android | Open |
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
| [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 |
|
||||||
| [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 |
|
||||||
| [XCTrack](http://xctrack.org/) | Flight computer for paraglider pilots | Proprietary/Free | Android | Closed |
|
| [XCTrack](http://xctrack.org/) | Flight computer for paraglider pilots | Proprietary/Free | Android | Closed |
|
||||||
|
|
||||||
You know an application that is missing here? Please inform us by sending a message via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
You know an application that is missing here? Please inform us by sending a message via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
As an open source project, we welcome new contributors and appreciate your help.
|
As an open source project, we welcome new contributors and appreciate your help.
|
||||||
|
|
||||||
Before you start working on an unresolved issue or try to implement a new feature, please contact us via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
Before you start working on an unresolved issue or try to implement a new feature, please contact us via our public [forum](https://groups.google.com/group/mapsforge-dev). We will then discuss the best way to realize your proposal and figure out how we can help you to get started quickly.
|
||||||
|
|
||||||
You may also create a new issue on [Github](https://github.com/mapsforge/vtm/issues) or comment on an existing one to describe your ideas. We will then discuss the best way to realize your proposal and figure out how we can help you to get started quickly.
|
|
||||||
|
|
||||||
If you are only requesting a small change in the code, you may attach a patch file to the corresponding issue, but it is best to create a pull request on Github. Make sure that your patch is derived from the latest version in our **master** repository, otherwise we might be unable to apply it. Important is to keep pull requests simple with one feature in each. Please follow our code and style conventions.
|
If you are only requesting a small change in the code, you may attach a patch file to the corresponding issue, but it is best to create a pull request on Github. Make sure that your patch is derived from the latest version in our **master** repository, otherwise we might be unable to apply it. Important is to keep pull requests simple with one feature in each. Please follow our code and style conventions.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 0.14.0 (2020-08-25)
|
||||||
|
|
||||||
|
- Render themes: symbol styles [#769](https://github.com/mapsforge/vtm/pull/769)
|
||||||
|
- More mutable itemized layer [#771](https://github.com/mapsforge/vtm/pull/771)
|
||||||
|
- Marker renderer sort option
|
||||||
|
- `Parameters.MARKER_SORT`
|
||||||
|
- Update vtm-jeo module [#770](https://github.com/mapsforge/vtm/pull/770)
|
||||||
|
- Many other minor improvements and bug fixes
|
||||||
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.14.0)
|
||||||
|
|
||||||
|
## Version 0.13.0 (2020-01-12)
|
||||||
|
|
||||||
|
- Render themes: symbols on lines with billboard / rotation [#743](https://github.com/mapsforge/vtm/pull/743)
|
||||||
|
- Location texture renderer: rewrite and optimize [#750](https://github.com/mapsforge/vtm/pull/750)
|
||||||
|
- Fix stroke cap line ending [#758](https://github.com/mapsforge/vtm/pull/758)
|
||||||
|
- Mapsforge: fix ways precision loss [#752](https://github.com/mapsforge/vtm/pull/752)
|
||||||
|
- Mapsforge: additional simplification [#757](https://github.com/mapsforge/vtm/pull/757)
|
||||||
|
- `Parameters.SIMPLIFICATION_TOLERANCE`
|
||||||
|
- Android: OpenGL ES 2.0 default for performance / stability [#749](https://github.com/mapsforge/vtm/pull/749)
|
||||||
|
- `MapView.OPENGL_VERSION`
|
||||||
|
- Android: threaded system initialization
|
||||||
|
- `Parameters.THREADED_INIT`
|
||||||
|
- Many other minor improvements and bug fixes
|
||||||
|
- [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)
|
||||||
|
|
||||||
- MBTiles vector tile source (Android) [#740](https://github.com/mapsforge/vtm/pull/740)
|
- MBTiles vector tile source (Android) [#740](https://github.com/mapsforge/vtm/pull/740)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
For questions, reports and discussion please always use the [forum](https://groups.google.com/group/mapsforge-dev).
|
For questions or discussion please use the [forum](https://groups.google.com/group/mapsforge-dev).
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Current version is [
|
### Android (libGDX)
|
||||||
@@ -38,7 +38,7 @@ implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86'
|
|||||||
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
|
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
|
||||||
implementation 'com.badlogicgames.gdx:gdx:1.9.10'
|
implementation 'com.badlogicgames.gdx:gdx:1.9.10'
|
||||||
implementation 'com.badlogicgames.gdx:gdx-backend-android:1.9.10'
|
implementation 'com.badlogicgames.gdx:gdx-backend-android:1.9.10'
|
||||||
implementation 'com.caverock:androidsvg:1.3'
|
implementation 'com.caverock:androidsvg:1.4'
|
||||||
```
|
```
|
||||||
|
|
||||||
### iOS
|
### iOS
|
||||||
@@ -59,12 +59,12 @@ implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-windows'
|
|||||||
implementation 'org.mapsforge:vtm-desktop-lwjgl:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-desktop-lwjgl:[CURRENT-VERSION]'
|
||||||
implementation 'com.badlogicgames.gdx:gdx:1.9.10'
|
implementation 'com.badlogicgames.gdx:gdx:1.9.10'
|
||||||
implementation 'com.badlogicgames.gdx:gdx-platform:1.9.10:natives-desktop'
|
implementation 'com.badlogicgames.gdx:gdx-platform:1.9.10:natives-desktop'
|
||||||
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl:1.9.10'
|
|
||||||
implementation 'com.github.blackears:svgSalamander:v1.1.1'
|
implementation 'com.github.blackears:svgSalamander:v1.1.1'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Desktop (LWJGL)
|
### Desktop (LWJGL)
|
||||||
```groovy
|
```groovy
|
||||||
|
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl:1.9.10'
|
||||||
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.3'
|
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.3'
|
||||||
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux'
|
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux'
|
||||||
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx'
|
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx'
|
||||||
@@ -73,25 +73,28 @@ implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-windows'
|
|||||||
|
|
||||||
### Desktop (LWJGL 3)
|
### Desktop (LWJGL 3)
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'org.lwjgl:lwjgl:3.2.1'
|
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl3:1.9.10'
|
||||||
implementation 'org.lwjgl:lwjgl:3.2.1:natives-linux'
|
implementation 'org.lwjgl:lwjgl:3.2.3'
|
||||||
implementation 'org.lwjgl:lwjgl:3.2.1:natives-macos'
|
implementation 'org.lwjgl:lwjgl:3.2.3:natives-linux'
|
||||||
implementation 'org.lwjgl:lwjgl:3.2.1:natives-windows'
|
implementation 'org.lwjgl:lwjgl:3.2.3:natives-macos'
|
||||||
|
implementation 'org.lwjgl:lwjgl:3.2.3:natives-windows'
|
||||||
```
|
```
|
||||||
|
|
||||||
### JTS geometries
|
### JTS geometries
|
||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'org.mapsforge:vtm-jts:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-jts:[CURRENT-VERSION]'
|
||||||
implementation 'org.locationtech.jts:jts-core:1.15.0'
|
// https://github.com/locationtech/jts/issues/145
|
||||||
|
implementation 'org.locationtech.jts:jts-core:1.15.1'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Online tiles
|
### Online tiles
|
||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'org.mapsforge:vtm-http:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-http:[CURRENT-VERSION]'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
|
// https://github.com/square/okhttp/issues/4481
|
||||||
implementation 'com.squareup.okio:okio:1.13.0'
|
implementation 'com.squareup.okhttp3:okhttp:3.12.5'
|
||||||
|
implementation 'com.squareup.okio:okio:1.15.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
### MBTiles (Android)
|
### MBTiles (Android)
|
||||||
@@ -99,54 +102,42 @@ implementation 'com.squareup.okio:okio:1.13.0'
|
|||||||
```groovy
|
```groovy
|
||||||
implementation 'org.mapsforge:vtm-android-mvt:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-android-mvt:[CURRENT-VERSION]'
|
||||||
implementation 'org.mapsforge:vtm-mvt:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-mvt:[CURRENT-VERSION]'
|
||||||
implementation 'com.google.protobuf:protobuf-java:3.5.1'
|
implementation 'com.google.protobuf:protobuf-java:3.6.1'
|
||||||
implementation 'com.wdtinc:mapbox-vector-tile:3.0.0'
|
implementation 'com.wdtinc:mapbox-vector-tile:3.1.0'
|
||||||
implementation 'org.locationtech.jts:jts-core:1.15.0'
|
// https://github.com/locationtech/jts/issues/145
|
||||||
|
implementation 'org.locationtech.jts:jts-core:1.15.1'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Mapbox vector tiles
|
### Mapbox vector tiles
|
||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'org.mapsforge:vtm-mvt:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-mvt:[CURRENT-VERSION]'
|
||||||
implementation 'com.google.protobuf:protobuf-java:3.5.1'
|
implementation 'com.google.protobuf:protobuf-java:3.6.1'
|
||||||
implementation 'com.wdtinc:mapbox-vector-tile:3.0.0'
|
implementation 'com.wdtinc:mapbox-vector-tile:3.1.0'
|
||||||
implementation 'org.locationtech.jts:jts-core:1.15.0'
|
// https://github.com/locationtech/jts/issues/145
|
||||||
|
implementation 'org.locationtech.jts:jts-core:1.15.1'
|
||||||
```
|
```
|
||||||
|
|
||||||
### GeoJSON vector tiles
|
### GeoJSON vector tiles
|
||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'org.mapsforge:vtm-json:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-json:[CURRENT-VERSION]'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.4'
|
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.9'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.4'
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.9'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.4'
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
|
||||||
```
|
```
|
||||||
|
|
||||||
### jeo (indoor maps)
|
### jeo (indoor maps)
|
||||||
|
|
||||||
Add _first_ the Boundless repository:
|
|
||||||
```groovy
|
```groovy
|
||||||
repositories {
|
repositories {
|
||||||
maven { url 'https://repo.boundlessgeo.com/main/' }
|
maven { url 'https://jitpack.io' }
|
||||||
jcenter()
|
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
```groovy
|
|
||||||
implementation 'org.mapsforge:vtm-jeo:[CURRENT-VERSION]'
|
implementation 'org.mapsforge:vtm-jeo:[CURRENT-VERSION]'
|
||||||
implementation('org.jeo:jeo:0-SNAPSHOT') {
|
implementation('com.github.jeo.jeo:jeo-carto:master-SNAPSHOT') {
|
||||||
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
|
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
|
||||||
}
|
}
|
||||||
implementation('org.jeo:jeo-carto:0-SNAPSHOT') {
|
|
||||||
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
|
|
||||||
}
|
|
||||||
implementation('org.jeo:jeo-render:0-SNAPSHOT') {
|
|
||||||
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
|
|
||||||
}
|
|
||||||
implementation 'org.osgeo:proj4j:0.1.0:jeo'
|
|
||||||
implementation 'com.metaweb:lessen:1.0'
|
|
||||||
implementation 'com.vividsolutions:jts:1.13'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Snapshots
|
## Snapshots
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
# Mapsforge map providers (in lexical order)
|
# Mapsforge map providers (in lexical order)
|
||||||
|
|
||||||
- [AndroidMaps](http://www.androidmaps.co.uk/)
|
- [AndroidMaps](https://www.androidmaps.co.uk/)
|
||||||
- [Freizeitkarte](http://www.freizeitkarte-osm.de/android/en/index.html)
|
- [BBBike](https://extract.bbbike.org/?format=mapsforge-osm.zip)
|
||||||
- [Kurviger](https://offline-maps.kurviger.de/)
|
- [Freizeitkarte](https://www.freizeitkarte-osm.de/android/en/index.html)
|
||||||
- [Locusvectormaps](http://www.locusvectormaps.com)
|
- [Kurviger](https://download.kurviger.de/)
|
||||||
- [Mapsforge](http://download.mapsforge.org/)
|
- [Mapsforge](https://download.mapsforge.org/)
|
||||||
- [OpenAndroMaps](http://www.openandromaps.org/en/)
|
- [OpenAndroMaps](https://www.openandromaps.org/en/)
|
||||||
- [OpenMaps](http://openmaps.eu/)
|
- [OpenMaps](https://openmaps.eu/)
|
||||||
|
- [vector.city](https://vector.city/)
|
||||||
|
|
||||||
You know a Mapsforge map provider that is missing here? Please inform us by sending a message via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
You know a Mapsforge map provider that is missing here? Please inform us by sending a message via our public [forum](https://groups.google.com/group/mapsforge-dev).
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
**This article describes how to use XML-based render-themes to style maps.**
|
**This article describes how to use XML-based render-themes to style maps.**
|
||||||
|
|
||||||
If you have any questions or problems, don't hesitate to ask our public [forum](https://groups.google.com/group/mapsforge-dev) for help. You can also report bugs and improvement requests via our [issue tracker](https://github.com/mapsforge/vtm/issues).
|
If you have any questions or problems, don't hesitate to ask our public [forum](https://groups.google.com/group/mapsforge-dev) for help.
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
@@ -109,11 +109,12 @@ There are different possibilities to simplify and accelerate map styling or chan
|
|||||||
|
|
||||||
### Style patterns
|
### Style patterns
|
||||||
|
|
||||||
If you want to use a specific style multiple times you not have to rewrite it for each text, area, or line rule.
|
If you want to use a specific style multiple times you not have to rewrite it for each text, line, area or symbol rule.
|
||||||
If you define a style set an `id` and use it with `use` in your rendering instructions:
|
If you define a style set an `id` and use it with `use` in your rendering instructions:
|
||||||
- `style-text`
|
- `style-text`
|
||||||
- `style-line`
|
- `style-line`
|
||||||
- `style-area`
|
- `style-area`
|
||||||
|
- `style-symbol`
|
||||||
|
|
||||||
This example styles all areas with the_residential_ style, which haven't the `highway` or `building` key.
|
This example styles all areas with the_residential_ style, which haven't the `highway` or `building` key.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
org.gradle.jvmargs=-Xmx2048m
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
|||||||
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-5.4.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -233,13 +233,21 @@
|
|||||||
|
|
||||||
<xs:complexType name="symbol">
|
<xs:complexType name="symbol">
|
||||||
<xs:attribute name="cat" type="xs:string" use="optional" />
|
<xs:attribute name="cat" type="xs:string" use="optional" />
|
||||||
<xs:attribute name="src" type="tns:src" use="required" />
|
|
||||||
|
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
|
||||||
|
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
|
||||||
|
|
||||||
|
<xs:attribute name="src" type="tns:src" use="optional" />
|
||||||
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
|
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
|
||||||
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
|
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
|
||||||
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
|
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
|
||||||
|
|
||||||
|
<!-- symbols on lines -->
|
||||||
|
<xs:attribute name="billboard" default="false" type="xs:boolean" use="optional" />
|
||||||
<xs:attribute name="repeat" default="false" type="xs:boolean" use="optional" />
|
<xs:attribute name="repeat" default="false" type="xs:boolean" use="optional" />
|
||||||
<xs:attribute name="repeat-gap" default="200" type="xs:float" use="optional" />
|
<xs:attribute name="repeat-gap" default="200" type="xs:float" use="optional" />
|
||||||
<xs:attribute name="repeat-start" default="30" type="xs:float" use="optional" />
|
<xs:attribute name="repeat-start" default="30" type="xs:float" use="optional" />
|
||||||
|
<xs:attribute name="rotate" default="true" type="xs:boolean" use="optional" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:complexType name="extrusion">
|
<xs:complexType name="extrusion">
|
||||||
@@ -328,6 +336,7 @@
|
|||||||
<xs:sequence maxOccurs="256" minOccurs="0">
|
<xs:sequence maxOccurs="256" minOccurs="0">
|
||||||
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
||||||
<xs:element name="style-text" type="tns:text" />
|
<xs:element name="style-text" type="tns:text" />
|
||||||
|
<xs:element name="style-symbol" type="tns:symbol" />
|
||||||
<xs:element name="style-area" type="tns:area" />
|
<xs:element name="style-area" type="tns:area" />
|
||||||
<xs:element name="style-line" type="tns:line" />
|
<xs:element name="style-line" type="tns:line" />
|
||||||
<!-- <xs:element name="style-outline" type="tns:line" /> -->
|
<!-- <xs:element name="style-outline" type="tns:line" /> -->
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
<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
|
||||||
|
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="18" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
/*
|
|
||||||
configurations.all {
|
|
||||||
// Check latest snapshot on every build
|
|
||||||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':vtm-android')
|
implementation project(':vtm-android')
|
||||||
implementation project(':vtm-android-mvt')
|
implementation project(':vtm-android-mvt')
|
||||||
@@ -23,11 +16,11 @@ 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:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-poi-android:0.14.0'
|
||||||
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-armeabi-v7a'
|
implementation 'org.mapsforge:sqlite-android:0.14.0:natives-armeabi-v7a'
|
||||||
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-arm64-v8a'
|
implementation 'org.mapsforge:sqlite-android:0.14.0:natives-arm64-v8a'
|
||||||
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-x86'
|
implementation 'org.mapsforge:sqlite-android:0.14.0:natives-x86'
|
||||||
implementation 'org.mapsforge:sqlite-android:master-SNAPSHOT:natives-x86_64'
|
implementation 'org.mapsforge:sqlite-android:0.14.0:natives-x86_64'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|||||||
15
vtm-android-example/res/raw/marker.svg
Executable file
15
vtm-android-example/res/raw/marker.svg
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="580" width="580" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<title>other</title>
|
||||||
|
<metadata>
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||||
|
<dc:title>other</dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<circle opacity=".8" cx="290" cy="290" r="145" fill="#fff"/>
|
||||||
|
<circle cy="290" cx="290" r="116" fill="#0092DA"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 651 B |
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
*
|
*
|
||||||
* 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,7 +19,6 @@
|
|||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
import org.oscim.backend.canvas.Canvas;
|
import org.oscim.backend.canvas.Canvas;
|
||||||
@@ -27,18 +26,20 @@ import org.oscim.backend.canvas.Color;
|
|||||||
import org.oscim.backend.canvas.Paint;
|
import org.oscim.backend.canvas.Paint;
|
||||||
import org.oscim.core.GeoPoint;
|
import org.oscim.core.GeoPoint;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
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.marker.MarkerSymbol.HotspotPlace;
|
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.renderer.atlas.TextureAtlas;
|
import org.oscim.renderer.atlas.TextureAtlas;
|
||||||
import org.oscim.renderer.atlas.TextureRegion;
|
import org.oscim.renderer.atlas.TextureRegion;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
import org.oscim.utils.TextureAtlasUtils;
|
import org.oscim.utils.TextureAtlasUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -49,9 +50,10 @@ public class AtlasMultiTextureActivity extends MarkerOverlayActivity {
|
|||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
mMap.layers().add(new MapEventsReceiver(mMap));
|
||||||
|
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-android-example"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
// Create Atlas from Bitmaps
|
// Create Atlas from Bitmaps
|
||||||
@@ -65,7 +67,7 @@ public class AtlasMultiTextureActivity extends MarkerOverlayActivity {
|
|||||||
paint.setTextSize(12 * CanvasAdapter.getScale());
|
paint.setTextSize(12 * CanvasAdapter.getScale());
|
||||||
paint.setStrokeWidth(2 * CanvasAdapter.getScale());
|
paint.setStrokeWidth(2 * CanvasAdapter.getScale());
|
||||||
paint.setColor(Color.BLACK);
|
paint.setColor(Color.BLACK);
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
for (double lat = -90; lat <= 90; lat += 10) {
|
for (double lat = -90; lat <= 90; lat += 10) {
|
||||||
for (double lon = -180; lon <= 180; lon += 10) {
|
for (double lon = -180; lon <= 180; lon += 10) {
|
||||||
String title = lat + "/" + lon;
|
String title = lat + "/" + lon;
|
||||||
@@ -85,29 +87,32 @@ public class AtlasMultiTextureActivity extends MarkerOverlayActivity {
|
|||||||
// With iOS we must flip the Y-Axis
|
// With iOS we must flip the Y-Axis
|
||||||
TextureAtlasUtils.createTextureRegions(inputMap, regionsMap, atlasList, true, false);
|
TextureAtlasUtils.createTextureRegions(inputMap, regionsMap, atlasList, true, false);
|
||||||
|
|
||||||
mMarkerLayer = new ItemizedLayer<>(mMap, new ArrayList<MarkerItem>(), (MarkerSymbol) null, this);
|
mMarkerLayer = new ItemizedLayer(mMap, new ArrayList<MarkerInterface>(), (MarkerSymbol) null, this);
|
||||||
mMap.layers().add(mMarkerLayer);
|
mMap.layers().add(mMarkerLayer);
|
||||||
|
|
||||||
mMarkerLayer.addItems(pts);
|
mMarkerLayer.addItems(pts);
|
||||||
|
|
||||||
// set all markers
|
// set all markers
|
||||||
for (MarkerItem item : pts) {
|
for (MarkerInterface item : pts) {
|
||||||
MarkerSymbol markerSymbol = new MarkerSymbol(regionsMap.get(item.getTitle()), HotspotPlace.BOTTOM_CENTER);
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
item.setMarker(markerSymbol);
|
MarkerSymbol markerSymbol = new MarkerSymbol(regionsMap.get(markerItem.getTitle()), HotspotPlace.BOTTOM_CENTER);
|
||||||
|
markerItem.setMarker(markerSymbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
Toast.makeText(this, "Atlas count: " + atlasList.size(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Atlas count: " + atlasList.size(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemSingleTapUp(int index, MarkerItem item) {
|
public boolean onItemSingleTapUp(int index, MarkerInterface item) {
|
||||||
Toast.makeText(this, "Marker tap\n" + item.getTitle(), Toast.LENGTH_SHORT).show();
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
|
Toast.makeText(this, "Marker tap\n" + markerItem.getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemLongPress(int index, MarkerItem item) {
|
public boolean onItemLongPress(int index, MarkerInterface item) {
|
||||||
Toast.makeText(this, "Marker long press\n" + item.getTitle(), Toast.LENGTH_SHORT).show();
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
|
Toast.makeText(this, "Marker long press\n" + markerItem.getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2017-2018 devemux86
|
* Copyright 2017-2020 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
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
import org.oscim.core.MapPosition;
|
import org.oscim.core.MapPosition;
|
||||||
import org.oscim.core.MercatorProjection;
|
import org.oscim.core.MercatorProjection;
|
||||||
@@ -27,6 +26,8 @@ import org.oscim.tiling.source.bitmap.DefaultSources;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
public class BitmapTileActivity extends MapActivity {
|
public class BitmapTileActivity extends MapActivity {
|
||||||
|
|
||||||
static final Logger log = LoggerFactory.getLogger(BitmapTileActivity.class);
|
static final Logger log = LoggerFactory.getLogger(BitmapTileActivity.class);
|
||||||
@@ -42,6 +43,7 @@ public class BitmapTileActivity extends MapActivity {
|
|||||||
|
|
||||||
public BitmapTileActivity(BitmapTileSource tileSource) {
|
public BitmapTileActivity(BitmapTileSource tileSource) {
|
||||||
super(R.layout.activity_map);
|
super(R.layout.activity_map);
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-android-example"));
|
||||||
mTileSource = tileSource;
|
mTileSource = tileSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2017 nebular
|
* Copyright 2017 nebular
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -15,26 +15,21 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import org.oscim.android.canvas.AndroidBitmap;
|
||||||
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;
|
||||||
import org.oscim.layers.marker.ClusterMarkerRenderer;
|
import org.oscim.layers.marker.*;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
|
||||||
import org.oscim.layers.marker.MarkerItem;
|
|
||||||
import org.oscim.layers.marker.MarkerLayer;
|
|
||||||
import org.oscim.layers.marker.MarkerRenderer;
|
|
||||||
import org.oscim.layers.marker.MarkerRendererFactory;
|
|
||||||
import org.oscim.layers.marker.MarkerSymbol;
|
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.oscim.android.canvas.AndroidGraphics.drawableToBitmap;
|
|
||||||
|
|
||||||
public class ClusterMarkerOverlayActivity extends MarkerOverlayActivity {
|
public class ClusterMarkerOverlayActivity extends MarkerOverlayActivity {
|
||||||
|
|
||||||
private static final int COUNT = 5;
|
private static final int COUNT = 5;
|
||||||
@@ -45,12 +40,13 @@ public class ClusterMarkerOverlayActivity extends MarkerOverlayActivity {
|
|||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
mMap.layers().add(new MapEventsReceiver(mMap));
|
||||||
|
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-android-example"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
Bitmap bitmapPoi = drawableToBitmap(getResources().getDrawable(R.drawable.marker_poi));
|
Bitmap bitmapPoi = new AndroidBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.marker_poi));
|
||||||
final MarkerSymbol symbol;
|
final MarkerSymbol symbol;
|
||||||
if (BILLBOARDS)
|
if (BILLBOARDS)
|
||||||
symbol = new MarkerSymbol(bitmapPoi, MarkerSymbol.HotspotPlace.BOTTOM_CENTER);
|
symbol = new MarkerSymbol(bitmapPoi, MarkerSymbol.HotspotPlace.BOTTOM_CENTER);
|
||||||
@@ -69,15 +65,15 @@ public class ClusterMarkerOverlayActivity extends MarkerOverlayActivity {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mMarkerLayer = new ItemizedLayer<>(
|
mMarkerLayer = new ItemizedLayer(
|
||||||
mMap,
|
mMap,
|
||||||
new ArrayList<MarkerItem>(),
|
new ArrayList<MarkerInterface>(),
|
||||||
markerRendererFactory,
|
markerRendererFactory,
|
||||||
this);
|
this);
|
||||||
mMap.layers().add(mMarkerLayer);
|
mMap.layers().add(mMarkerLayer);
|
||||||
|
|
||||||
// Create some markers spaced STEP degrees
|
// Create some markers spaced STEP degrees
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
mMap.setMapPosition(53.08, 8.83, 1 << 15);
|
mMap.setMapPosition(53.08, 8.83, 1 << 15);
|
||||||
GeoPoint center = mMap.getMapPosition().getGeoPoint();
|
GeoPoint center = mMap.getMapPosition().getGeoPoint();
|
||||||
for (int x = -COUNT; x < COUNT; x++) {
|
for (int x = -COUNT; x < COUNT; x++) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2018-2019 Gustl22
|
* Copyright 2018-2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -71,7 +71,7 @@ public class GdxActivity extends AndroidApplication {
|
|||||||
DateTimeAdapter.init(new DateTime());
|
DateTimeAdapter.init(new DateTime());
|
||||||
|
|
||||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||||
CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI);
|
CanvasAdapter.dpi = (int) (metrics.density * CanvasAdapter.DEFAULT_DPI);
|
||||||
Tile.SIZE = Tile.calculateTileSize();
|
Tile.SIZE = Tile.calculateTileSize();
|
||||||
|
|
||||||
AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
|
AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ public class GettingStarted extends Activity {
|
|||||||
private static final String MAP_FILE = "berlin.map";
|
private static final String MAP_FILE = "berlin.map";
|
||||||
|
|
||||||
private MapView mapView;
|
private MapView mapView;
|
||||||
private MapScaleBar mapScaleBar;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -69,7 +68,7 @@ public class GettingStarted extends Activity {
|
|||||||
mapView.map().setTheme(VtmThemes.DEFAULT);
|
mapView.map().setTheme(VtmThemes.DEFAULT);
|
||||||
|
|
||||||
// Scale bar
|
// Scale bar
|
||||||
mapScaleBar = new DefaultMapScaleBar(mapView.map());
|
MapScaleBar mapScaleBar = new DefaultMapScaleBar(mapView.map());
|
||||||
MapScaleBarLayer mapScaleBarLayer = new MapScaleBarLayer(mapView.map(), mapScaleBar);
|
MapScaleBarLayer mapScaleBarLayer = new MapScaleBarLayer(mapView.map(), mapScaleBar);
|
||||||
mapScaleBarLayer.getRenderer().setPosition(GLViewport.Position.BOTTOM_LEFT);
|
mapScaleBarLayer.getRenderer().setPosition(GLViewport.Position.BOTTOM_LEFT);
|
||||||
mapScaleBarLayer.getRenderer().setOffset(5 * CanvasAdapter.getScale(), 0);
|
mapScaleBarLayer.getRenderer().setOffset(5 * CanvasAdapter.getScale(), 0);
|
||||||
@@ -94,8 +93,6 @@ public class GettingStarted extends Activity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
if (mapScaleBar != null)
|
|
||||||
mapScaleBar.destroy();
|
|
||||||
mapView.onDestroy();
|
mapView.onDestroy();
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,8 @@ import android.os.Bundle;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.widget.ToggleButton;
|
import android.widget.ToggleButton;
|
||||||
|
import io.jeo.map.Style;
|
||||||
import org.jeo.map.Style;
|
import io.jeo.vector.VectorDataset;
|
||||||
import org.jeo.vector.VectorDataset;
|
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.canvas.Color;
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.layers.OSMIndoorLayer;
|
import org.oscim.layers.OSMIndoorLayer;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class LineTexActivity extends BitmapTileActivity {
|
|||||||
TextureItem tex = null;
|
TextureItem tex = null;
|
||||||
try {
|
try {
|
||||||
tex = new TextureItem(CanvasAdapter.getBitmapAsset("", "patterns/pike.png"));
|
tex = new TextureItem(CanvasAdapter.getBitmapAsset("", "patterns/pike.png"));
|
||||||
tex.mipmap = true;
|
//tex.mipmap = true;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,10 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import org.oscim.core.MapPosition;
|
import org.oscim.core.MapPosition;
|
||||||
import org.oscim.layers.LocationLayer;
|
import org.oscim.layers.LocationLayer;
|
||||||
|
import org.oscim.renderer.LocationCallback;
|
||||||
|
|
||||||
public class LocationActivity extends BitmapTileActivity implements LocationListener {
|
public class LocationActivity extends BitmapTileActivity implements LocationListener {
|
||||||
|
private Location location;
|
||||||
private LocationLayer locationLayer;
|
private LocationLayer locationLayer;
|
||||||
private LocationManager locationManager;
|
private LocationManager locationManager;
|
||||||
private final MapPosition mapPosition = new MapPosition();
|
private final MapPosition mapPosition = new MapPosition();
|
||||||
@@ -37,7 +39,17 @@ public class LocationActivity extends BitmapTileActivity implements LocationList
|
|||||||
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||||
|
|
||||||
locationLayer = new LocationLayer(mMap);
|
locationLayer = new LocationLayer(mMap);
|
||||||
locationLayer.locationRenderer.setShader("location_1_reverse");
|
locationLayer.locationRenderer.setCallback(new LocationCallback() {
|
||||||
|
@Override
|
||||||
|
public boolean hasRotation() {
|
||||||
|
return location != null && location.hasBearing();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getRotation() {
|
||||||
|
return location != null && location.hasBearing() ? location.getBearing() : 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
locationLayer.setEnabled(false);
|
locationLayer.setEnabled(false);
|
||||||
mMap.layers().add(locationLayer);
|
mMap.layers().add(locationLayer);
|
||||||
}
|
}
|
||||||
@@ -66,6 +78,7 @@ public class LocationActivity extends BitmapTileActivity implements LocationList
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLocationChanged(Location location) {
|
public void onLocationChanged(Location location) {
|
||||||
|
this.location = location;
|
||||||
locationLayer.setEnabled(true);
|
locationLayer.setEnabled(true);
|
||||||
locationLayer.setPosition(location.getLatitude(), location.getLongitude(), location.getAccuracy());
|
locationLayer.setPosition(location.getLatitude(), location.getLongitude(), location.getAccuracy());
|
||||||
|
|
||||||
|
|||||||
@@ -25,18 +25,16 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
import org.oscim.backend.canvas.Color;
|
|
||||||
import org.oscim.core.MapPosition;
|
import org.oscim.core.MapPosition;
|
||||||
import org.oscim.layers.LocationTextureLayer;
|
import org.oscim.layers.LocationTextureLayer;
|
||||||
import org.oscim.renderer.atlas.TextureAtlas;
|
import org.oscim.renderer.LocationCallback;
|
||||||
import org.oscim.renderer.atlas.TextureRegion;
|
|
||||||
import org.oscim.renderer.bucket.TextureItem;
|
|
||||||
import org.oscim.utils.IOUtils;
|
import org.oscim.utils.IOUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
public class LocationTextureActivity extends BitmapTileActivity implements LocationListener {
|
public class LocationTextureActivity extends BitmapTileActivity implements LocationListener {
|
||||||
|
private Location location;
|
||||||
private LocationTextureLayer locationLayer;
|
private LocationTextureLayer locationLayer;
|
||||||
private LocationManager locationManager;
|
private LocationManager locationManager;
|
||||||
private final MapPosition mapPosition = new MapPosition();
|
private final MapPosition mapPosition = new MapPosition();
|
||||||
@@ -47,34 +45,41 @@ public class LocationTextureActivity extends BitmapTileActivity implements Locat
|
|||||||
|
|
||||||
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||||
|
|
||||||
// load a Bitmap/SVG from resources
|
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
Bitmap bmp = null;
|
Bitmap bitmapArrow = null;
|
||||||
try {
|
try {
|
||||||
is = getResources().openRawResource(R.raw.arrow);
|
is = getResources().openRawResource(R.raw.arrow);
|
||||||
float scale = CanvasAdapter.getScale();
|
bitmapArrow = CanvasAdapter.decodeSvgBitmap(is, (int) (48 * CanvasAdapter.getScale()), (int) (48 * CanvasAdapter.getScale()), 100);
|
||||||
bmp = CanvasAdapter.decodeSvgBitmap(is, (int) (60 * scale), (int) (60 * scale), 100);
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.closeQuietly(is);
|
IOUtils.closeQuietly(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create TextureRegion from Bitmap
|
Bitmap bitmapMarker = null;
|
||||||
TextureRegion textureRegion = new TextureRegion(new TextureItem(bmp), new TextureAtlas.Rect(0, 0, bmp.getWidth(), bmp.getHeight()));
|
try {
|
||||||
|
is = getResources().openRawResource(R.raw.marker);
|
||||||
|
bitmapMarker = CanvasAdapter.decodeSvgBitmap(is, (int) (48 * CanvasAdapter.getScale()), (int) (48 * CanvasAdapter.getScale()), 100);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
IOUtils.closeQuietly(is);
|
||||||
|
}
|
||||||
|
|
||||||
// create LocationTextureLayer with created/loaded TextureRegion
|
locationLayer = new LocationTextureLayer(mMap);
|
||||||
locationLayer = new LocationTextureLayer(mMap, textureRegion);
|
locationLayer.locationRenderer.setBitmapArrow(bitmapArrow);
|
||||||
|
locationLayer.locationRenderer.setBitmapMarker(bitmapMarker);
|
||||||
// set color of accuracy circle (Color.BLUE is default)
|
locationLayer.locationRenderer.setCallback(new LocationCallback() {
|
||||||
locationLayer.locationRenderer.setAccuracyColor(Color.get(50, 50, 255));
|
@Override
|
||||||
|
public boolean hasRotation() {
|
||||||
// set color of indicator circle (Color.RED is default)
|
return location != null && location.hasBearing();
|
||||||
locationLayer.locationRenderer.setIndicatorColor(Color.MAGENTA);
|
}
|
||||||
|
|
||||||
// set billboard rendering for TextureRegion (false is default)
|
|
||||||
locationLayer.locationRenderer.setBillboard(false);
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getRotation() {
|
||||||
|
return location != null && location.hasBearing() ? location.getBearing() : 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
locationLayer.setEnabled(false);
|
locationLayer.setEnabled(false);
|
||||||
mMap.layers().add(locationLayer);
|
mMap.layers().add(locationLayer);
|
||||||
}
|
}
|
||||||
@@ -103,8 +108,9 @@ public class LocationTextureActivity extends BitmapTileActivity implements Locat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLocationChanged(Location location) {
|
public void onLocationChanged(Location location) {
|
||||||
|
this.location = location;
|
||||||
locationLayer.setEnabled(true);
|
locationLayer.setEnabled(true);
|
||||||
locationLayer.setPosition(location.getLatitude(), location.getLongitude(), location.getBearing(), location.getAccuracy());
|
locationLayer.setPosition(location.getLatitude(), location.getLongitude(), location.getAccuracy());
|
||||||
|
|
||||||
// Follow location
|
// Follow location
|
||||||
mMap.getMapPosition(mapPosition);
|
mMap.getMapPosition(mapPosition);
|
||||||
|
|||||||
@@ -14,8 +14,11 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import okhttp3.CipherSuite;
|
||||||
|
import okhttp3.ConnectionSpec;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
import org.oscim.android.cache.TileCache;
|
import org.oscim.android.cache.TileCache;
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
@@ -27,6 +30,10 @@ import org.oscim.tiling.source.UrlTileSource;
|
|||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
import org.oscim.tiling.source.mvt.MapilionMvtTileSource;
|
import org.oscim.tiling.source.mvt.MapilionMvtTileSource;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MapilionMvtActivity extends MapActivity {
|
public class MapilionMvtActivity extends MapActivity {
|
||||||
|
|
||||||
// Metered API key for demonstration purposes
|
// Metered API key for demonstration purposes
|
||||||
@@ -40,7 +47,23 @@ public class MapilionMvtActivity extends MapActivity {
|
|||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
OkHttpEngine.OkHttpFactory factory = new OkHttpEngine.OkHttpFactory();
|
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||||
|
|
||||||
|
// https://github.com/square/okhttp/issues/4053
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
|
||||||
|
List<CipherSuite> cipherSuites = new ArrayList<>();
|
||||||
|
List<CipherSuite> modernTlsCipherSuites = ConnectionSpec.MODERN_TLS.cipherSuites();
|
||||||
|
if (modernTlsCipherSuites != null)
|
||||||
|
cipherSuites.addAll(modernTlsCipherSuites);
|
||||||
|
cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA);
|
||||||
|
cipherSuites.add(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA);
|
||||||
|
ConnectionSpec legacyTls = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
|
||||||
|
.cipherSuites(cipherSuites.toArray(new CipherSuite[0]))
|
||||||
|
.build();
|
||||||
|
builder.connectionSpecs(Arrays.asList(legacyTls, ConnectionSpec.CLEARTEXT));
|
||||||
|
}
|
||||||
|
|
||||||
|
OkHttpEngine.OkHttpFactory factory = new OkHttpEngine.OkHttpFactory(builder);
|
||||||
|
|
||||||
UrlTileSource tileSource = MapilionMvtTileSource.builder()
|
UrlTileSource tileSource = MapilionMvtTileSource.builder()
|
||||||
.apiKey(API_KEY)
|
.apiKey(API_KEY)
|
||||||
|
|||||||
@@ -65,11 +65,9 @@ public class MapsforgeActivity extends MapActivity {
|
|||||||
private static final Tag SEA_TAG = new Tag("natural", "sea");
|
private static final Tag SEA_TAG = new Tag("natural", "sea");
|
||||||
|
|
||||||
private TileGridLayer mGridLayer;
|
private TileGridLayer mGridLayer;
|
||||||
private DefaultMapScaleBar mMapScaleBar;
|
|
||||||
private Menu mMenu;
|
private Menu mMenu;
|
||||||
private boolean mS3db;
|
private boolean mS3db;
|
||||||
private VectorTileLayer mTileLayer;
|
VectorTileLayer mTileLayer;
|
||||||
MapFileTileSource mTileSource;
|
|
||||||
|
|
||||||
public MapsforgeActivity() {
|
public MapsforgeActivity() {
|
||||||
this(false);
|
this(false);
|
||||||
@@ -93,14 +91,6 @@ public class MapsforgeActivity extends MapActivity {
|
|||||||
SELECT_MAP_FILE);
|
SELECT_MAP_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
if (mMapScaleBar != null)
|
|
||||||
mMapScaleBar.destroy();
|
|
||||||
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class MapFilePicker extends FilePicker {
|
public static class MapFilePicker extends FilePicker {
|
||||||
public MapFilePicker() {
|
public MapFilePicker() {
|
||||||
setFileDisplayFilter(new FilterByFileExtension(".map"));
|
setFileDisplayFilter(new FilterByFileExtension(".map"));
|
||||||
@@ -183,7 +173,7 @@ public class MapsforgeActivity extends MapActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mTileSource = new MapFileTileSource();
|
MapFileTileSource mTileSource = new MapFileTileSource();
|
||||||
//mTileSource.setPreferredLanguage("en");
|
//mTileSource.setPreferredLanguage("en");
|
||||||
String file = intent.getStringExtra(FilePicker.SELECTED_FILE);
|
String file = intent.getStringExtra(FilePicker.SELECTED_FILE);
|
||||||
if (mTileSource.setMapFile(file)) {
|
if (mTileSource.setMapFile(file)) {
|
||||||
@@ -197,7 +187,7 @@ public class MapsforgeActivity extends MapActivity {
|
|||||||
mMap.layers().add(new BuildingLayer(mMap, mTileLayer));
|
mMap.layers().add(new BuildingLayer(mMap, mTileLayer));
|
||||||
mMap.layers().add(new LabelLayer(mMap, mTileLayer));
|
mMap.layers().add(new LabelLayer(mMap, mTileLayer));
|
||||||
|
|
||||||
mMapScaleBar = new DefaultMapScaleBar(mMap);
|
DefaultMapScaleBar mMapScaleBar = new DefaultMapScaleBar(mMap);
|
||||||
mMapScaleBar.setScaleBarMode(DefaultMapScaleBar.ScaleBarMode.BOTH);
|
mMapScaleBar.setScaleBarMode(DefaultMapScaleBar.ScaleBarMode.BOTH);
|
||||||
mMapScaleBar.setDistanceUnitAdapter(MetricUnitAdapter.INSTANCE);
|
mMapScaleBar.setDistanceUnitAdapter(MetricUnitAdapter.INSTANCE);
|
||||||
mMapScaleBar.setSecondaryDistanceUnitAdapter(ImperialUnitAdapter.INSTANCE);
|
mMapScaleBar.setSecondaryDistanceUnitAdapter(ImperialUnitAdapter.INSTANCE);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 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).
|
||||||
*
|
*
|
||||||
@@ -17,9 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import org.oscim.android.canvas.AndroidBitmap;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
import org.oscim.core.GeoPoint;
|
import org.oscim.core.GeoPoint;
|
||||||
import org.oscim.event.Gesture;
|
import org.oscim.event.Gesture;
|
||||||
@@ -27,26 +28,25 @@ import org.oscim.event.GestureListener;
|
|||||||
import org.oscim.event.MotionEvent;
|
import org.oscim.event.MotionEvent;
|
||||||
import org.oscim.layers.Layer;
|
import org.oscim.layers.Layer;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
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.marker.MarkerSymbol.HotspotPlace;
|
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.oscim.android.canvas.AndroidGraphics.drawableToBitmap;
|
public class MarkerOverlayActivity extends MapActivity implements ItemizedLayer.OnItemGestureListener<MarkerInterface> {
|
||||||
|
|
||||||
public class MarkerOverlayActivity extends MapActivity
|
|
||||||
implements ItemizedLayer.OnItemGestureListener<MarkerItem> {
|
|
||||||
|
|
||||||
static final boolean BILLBOARDS = true;
|
static final boolean BILLBOARDS = true;
|
||||||
MarkerSymbol mFocusMarker;
|
MarkerSymbol mFocusMarker;
|
||||||
ItemizedLayer<MarkerItem> mMarkerLayer;
|
ItemizedLayer mMarkerLayer;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -59,28 +59,29 @@ public class MarkerOverlayActivity extends MapActivity
|
|||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
mMap.layers().add(new MapEventsReceiver(mMap));
|
||||||
|
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-android-example"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
Bitmap bitmapPoi = drawableToBitmap(getResources().getDrawable(R.drawable.marker_poi));
|
Bitmap bitmapPoi = new AndroidBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.marker_poi));
|
||||||
MarkerSymbol symbol;
|
MarkerSymbol symbol;
|
||||||
if (BILLBOARDS)
|
if (BILLBOARDS)
|
||||||
symbol = new MarkerSymbol(bitmapPoi, HotspotPlace.BOTTOM_CENTER);
|
symbol = new MarkerSymbol(bitmapPoi, HotspotPlace.BOTTOM_CENTER);
|
||||||
else
|
else
|
||||||
symbol = new MarkerSymbol(bitmapPoi, HotspotPlace.CENTER, false);
|
symbol = new MarkerSymbol(bitmapPoi, HotspotPlace.CENTER, false);
|
||||||
|
|
||||||
Bitmap bitmapFocus = drawableToBitmap(getResources().getDrawable(R.drawable.marker_focus));
|
Bitmap bitmapFocus = new AndroidBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.marker_focus));
|
||||||
if (BILLBOARDS)
|
if (BILLBOARDS)
|
||||||
mFocusMarker = new MarkerSymbol(bitmapFocus, HotspotPlace.BOTTOM_CENTER);
|
mFocusMarker = new MarkerSymbol(bitmapFocus, HotspotPlace.BOTTOM_CENTER);
|
||||||
else
|
else
|
||||||
mFocusMarker = new MarkerSymbol(bitmapFocus, HotspotPlace.CENTER, false);
|
mFocusMarker = new MarkerSymbol(bitmapFocus, HotspotPlace.CENTER, false);
|
||||||
|
|
||||||
mMarkerLayer = new ItemizedLayer<>(mMap, new ArrayList<MarkerItem>(), symbol, this);
|
mMarkerLayer = new ItemizedLayer(mMap, new ArrayList<MarkerInterface>(), symbol, this);
|
||||||
mMap.layers().add(mMarkerLayer);
|
mMap.layers().add(mMarkerLayer);
|
||||||
|
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
|
|
||||||
for (double lat = -90; lat <= 90; lat += 5) {
|
for (double lat = -90; lat <= 90; lat += 5) {
|
||||||
for (double lon = -180; lon <= 180; lon += 5)
|
for (double lon = -180; lon <= 180; lon += 5)
|
||||||
@@ -99,24 +100,26 @@ public class MarkerOverlayActivity extends MapActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemSingleTapUp(int index, MarkerItem item) {
|
public boolean onItemSingleTapUp(int index, MarkerInterface item) {
|
||||||
if (item.getMarker() == null)
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
item.setMarker(mFocusMarker);
|
if (markerItem.getMarker() == null)
|
||||||
|
markerItem.setMarker(mFocusMarker);
|
||||||
else
|
else
|
||||||
item.setMarker(null);
|
markerItem.setMarker(null);
|
||||||
|
|
||||||
Toast.makeText(this, "Marker tap\n" + item.getTitle(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Marker tap\n" + markerItem.getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemLongPress(int index, MarkerItem item) {
|
public boolean onItemLongPress(int index, MarkerInterface item) {
|
||||||
if (item.getMarker() == null)
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
item.setMarker(mFocusMarker);
|
if (markerItem.getMarker() == null)
|
||||||
|
markerItem.setMarker(mFocusMarker);
|
||||||
else
|
else
|
||||||
item.setMarker(null);
|
markerItem.setMarker(null);
|
||||||
|
|
||||||
Toast.makeText(this, "Marker long press\n" + item.getTitle(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Marker long press\n" + markerItem.getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2019 Gustl22
|
* Copyright 2019 Gustl22
|
||||||
|
* Copyright 2020 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
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
package org.oscim.android.test;
|
package org.oscim.android.test;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.buildings.S3DBLayer;
|
import org.oscim.layers.tile.buildings.S3DBLayer;
|
||||||
@@ -25,9 +25,12 @@ import org.oscim.map.Viewport;
|
|||||||
import org.oscim.theme.VtmThemes;
|
import org.oscim.theme.VtmThemes;
|
||||||
import org.oscim.tiling.TileSource;
|
import org.oscim.tiling.TileSource;
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
import org.oscim.tiling.source.overpass.OverpassTileSource;
|
import org.oscim.tiling.source.overpass.OverpassTileSource;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use Overpass API data for vector layer.
|
* Use Overpass API data for vector layer.
|
||||||
* Only for developing as can be error-prone.
|
* Only for developing as can be error-prone.
|
||||||
@@ -46,7 +49,7 @@ public class OverpassActivity extends MapActivity {
|
|||||||
.build();
|
.build();
|
||||||
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
||||||
|
|
||||||
TileSource bitmapTileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource bitmapTileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.zoomMax(15)
|
.zoomMax(15)
|
||||||
.fadeSteps(new BitmapTileLayer.FadeStep[]{
|
.fadeSteps(new BitmapTileLayer.FadeStep[]{
|
||||||
@@ -54,6 +57,7 @@ public class OverpassActivity extends MapActivity {
|
|||||||
new BitmapTileLayer.FadeStep(16, Viewport.MAX_ZOOM_LEVEL, 0f, 0f)
|
new BitmapTileLayer.FadeStep(16, Viewport.MAX_ZOOM_LEVEL, 0f, 0f)
|
||||||
})
|
})
|
||||||
.build();
|
.build();
|
||||||
|
bitmapTileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-android-example"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, bitmapTileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, bitmapTileSource));
|
||||||
|
|
||||||
BuildingLayer.RAW_DATA = true;
|
BuildingLayer.RAW_DATA = true;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2017-2018 devemux86
|
* Copyright 2017-2020 devemux86
|
||||||
* Copyright 2018 Gustl22
|
* Copyright 2018 Gustl22
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -17,6 +17,7 @@ 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.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
@@ -25,20 +26,11 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.*;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ListView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
import android.widget.ToggleButton;
|
|
||||||
|
|
||||||
import org.mapsforge.core.model.Tag;
|
import org.mapsforge.core.model.Tag;
|
||||||
import org.mapsforge.poi.android.storage.AndroidPoiPersistenceManagerFactory;
|
import org.mapsforge.poi.android.storage.AndroidPoiPersistenceManagerFactory;
|
||||||
import org.mapsforge.poi.storage.ExactMatchPoiCategoryFilter;
|
import org.mapsforge.poi.storage.*;
|
||||||
import org.mapsforge.poi.storage.PoiCategoryFilter;
|
import org.oscim.android.canvas.AndroidBitmap;
|
||||||
import org.mapsforge.poi.storage.PoiCategoryManager;
|
|
||||||
import org.mapsforge.poi.storage.PoiPersistenceManager;
|
|
||||||
import org.mapsforge.poi.storage.PointOfInterest;
|
|
||||||
import org.oscim.android.filepicker.FilePicker;
|
import org.oscim.android.filepicker.FilePicker;
|
||||||
import org.oscim.android.filepicker.FilterByFileExtension;
|
import org.oscim.android.filepicker.FilterByFileExtension;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
@@ -49,6 +41,7 @@ import org.oscim.event.GestureListener;
|
|||||||
import org.oscim.event.MotionEvent;
|
import org.oscim.event.MotionEvent;
|
||||||
import org.oscim.layers.Layer;
|
import org.oscim.layers.Layer;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
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.map.Map;
|
import org.oscim.map.Map;
|
||||||
@@ -60,21 +53,19 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.oscim.android.canvas.AndroidGraphics.drawableToBitmap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* POI search.<br/>
|
* POI search.<br/>
|
||||||
* 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).
|
||||||
*/
|
*/
|
||||||
public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLayer.OnItemGestureListener<MarkerItem> {
|
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);
|
||||||
|
|
||||||
private static final String POI_CATEGORY = "Restaurants";
|
private static final String POI_CATEGORY = "Restaurants";
|
||||||
private static final int SELECT_POI_FILE = MapsforgeActivity.SELECT_THEME_FILE + 1;
|
private static final int SELECT_POI_FILE = MapsforgeActivity.SELECT_THEME_FILE + 1;
|
||||||
|
|
||||||
private ItemizedLayer<MarkerItem> mMarkerLayer;
|
private ItemizedLayer mMarkerLayer;
|
||||||
private PoiPersistenceManager mPersistenceManager;
|
private PoiPersistenceManager mPersistenceManager;
|
||||||
|
|
||||||
public static class PoiFilePicker extends FilePicker {
|
public static class PoiFilePicker extends FilePicker {
|
||||||
@@ -148,7 +139,7 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
super.onActivityResult(requestCode, resultCode, intent);
|
super.onActivityResult(requestCode, resultCode, intent);
|
||||||
|
|
||||||
if (requestCode == SELECT_MAP_FILE) {
|
if (requestCode == SELECT_MAP_FILE) {
|
||||||
if (mTileSource != null)
|
if (mTileLayer.getTileSource() != null)
|
||||||
startActivityForResult(new Intent(this, PoiFilePicker.class),
|
startActivityForResult(new Intent(this, PoiFilePicker.class),
|
||||||
SELECT_POI_FILE);
|
SELECT_POI_FILE);
|
||||||
else
|
else
|
||||||
@@ -162,21 +153,22 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
String file = intent.getStringExtra(FilePicker.SELECTED_FILE);
|
String file = intent.getStringExtra(FilePicker.SELECTED_FILE);
|
||||||
mPersistenceManager = AndroidPoiPersistenceManagerFactory.getPoiPersistenceManager(file);
|
mPersistenceManager = AndroidPoiPersistenceManagerFactory.getPoiPersistenceManager(file);
|
||||||
|
|
||||||
Bitmap bitmap = drawableToBitmap(getResources().getDrawable(R.drawable.marker_green));
|
Bitmap bitmap = new AndroidBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.marker_green));
|
||||||
MarkerSymbol symbol = new MarkerSymbol(bitmap, MarkerSymbol.HotspotPlace.BOTTOM_CENTER);
|
MarkerSymbol symbol = new MarkerSymbol(bitmap, MarkerSymbol.HotspotPlace.BOTTOM_CENTER);
|
||||||
mMarkerLayer = new ItemizedLayer<>(mMap, new ArrayList<MarkerItem>(), symbol, this);
|
mMarkerLayer = new ItemizedLayer(mMap, new ArrayList<MarkerInterface>(), symbol, this);
|
||||||
mMap.layers().add(mMarkerLayer);
|
mMap.layers().add(mMarkerLayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemSingleTapUp(int index, MarkerItem item) {
|
public boolean onItemSingleTapUp(int index, MarkerInterface item) {
|
||||||
Toast.makeText(this, item.getTitle(), Toast.LENGTH_SHORT).show();
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
|
Toast.makeText(this, markerItem.getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemLongPress(int index, MarkerItem item) {
|
public boolean onItemLongPress(int index, MarkerInterface item) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,7 +317,7 @@ public class PoiSearchActivity extends MapsforgeActivity implements ItemizedLaye
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Overlay POI
|
// Overlay POI
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
for (PointOfInterest pointOfInterest : pointOfInterests)
|
for (PointOfInterest pointOfInterest : pointOfInterests)
|
||||||
pts.add(new MarkerItem(pointOfInterest.getName(), "", new GeoPoint(pointOfInterest.getLatitude(), pointOfInterest.getLongitude())));
|
pts.add(new MarkerItem(pointOfInterest.getName(), "", new GeoPoint(pointOfInterest.getLatitude(), pointOfInterest.getLongitude())));
|
||||||
mMarkerLayer.addItems(pts);
|
mMarkerLayer.addItems(pts);
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class ReverseGeocodeActivity extends MapsforgeActivity {
|
|||||||
int tileYMax = MercatorProjection.pixelYToTileY(pixelY + touchRadius, (byte) mMap.getMapPosition().getZoomLevel());
|
int tileYMax = MercatorProjection.pixelYToTileY(pixelY + touchRadius, (byte) mMap.getMapPosition().getZoomLevel());
|
||||||
Tile upperLeft = new Tile(tileXMin, tileYMin, (byte) mMap.getMapPosition().getZoomLevel());
|
Tile upperLeft = new Tile(tileXMin, tileYMin, (byte) mMap.getMapPosition().getZoomLevel());
|
||||||
Tile lowerRight = new Tile(tileXMax, tileYMax, (byte) mMap.getMapPosition().getZoomLevel());
|
Tile lowerRight = new Tile(tileXMax, tileYMax, (byte) mMap.getMapPosition().getZoomLevel());
|
||||||
MapReadResult mapReadResult = ((MapDatabase) ((OverzoomTileDataSource) mTileSource.getDataSource()).getDataSource()).readLabels(upperLeft, lowerRight);
|
MapReadResult mapReadResult = ((MapDatabase) ((OverzoomTileDataSource) mTileLayer.getTileSource().getDataSource()).getDataSource()).readLabels(upperLeft, lowerRight);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
|||||||
@@ -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-2019 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2016 mar-v-in
|
* Copyright 2016 mar-v-in
|
||||||
* Copyright 2016 Mathieu de Brito
|
* Copyright 2016 Mathieu de Brito
|
||||||
* Copyright 2017-2018 Longri
|
* Copyright 2017-2018 Longri
|
||||||
@@ -99,12 +99,6 @@ public class Samples extends Activity {
|
|||||||
linearLayout.addView(createButton(GdxActivity.class));
|
linearLayout.addView(createButton(GdxActivity.class));
|
||||||
|
|
||||||
linearLayout.addView(createLabel("Features"));
|
linearLayout.addView(createLabel("Features"));
|
||||||
linearLayout.addView(createButton(null, "GraphHopper Routing", new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/graphhopper/graphhopper/tree/master/android")));
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
linearLayout.addView(createButton(LocationActivity.class));
|
linearLayout.addView(createButton(LocationActivity.class));
|
||||||
linearLayout.addView(createButton(LocationTextureActivity.class));
|
linearLayout.addView(createButton(LocationTextureActivity.class));
|
||||||
linearLayout.addView(createButton(PoiSearchActivity.class));
|
linearLayout.addView(createButton(PoiSearchActivity.class));
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import org.oscim.theme.ThemeLoader;
|
|||||||
import org.oscim.theme.VtmThemes;
|
import org.oscim.theme.VtmThemes;
|
||||||
|
|
||||||
public class SimpleMapActivity extends BaseMapActivity {
|
public class SimpleMapActivity extends BaseMapActivity {
|
||||||
private DefaultMapScaleBar mapScaleBar;
|
|
||||||
|
|
||||||
BuildingLayer mBuildingLayer;
|
BuildingLayer mBuildingLayer;
|
||||||
private boolean mShadow;
|
private boolean mShadow;
|
||||||
@@ -71,7 +70,7 @@ public class SimpleMapActivity extends BaseMapActivity {
|
|||||||
groupLayer.layers.add(new LabelLayer(mMap, mBaseLayer));
|
groupLayer.layers.add(new LabelLayer(mMap, mBaseLayer));
|
||||||
mMap.layers().add(groupLayer);
|
mMap.layers().add(groupLayer);
|
||||||
|
|
||||||
mapScaleBar = new DefaultMapScaleBar(mMap);
|
DefaultMapScaleBar mapScaleBar = new DefaultMapScaleBar(mMap);
|
||||||
mapScaleBar.setScaleBarMode(DefaultMapScaleBar.ScaleBarMode.BOTH);
|
mapScaleBar.setScaleBarMode(DefaultMapScaleBar.ScaleBarMode.BOTH);
|
||||||
mapScaleBar.setDistanceUnitAdapter(MetricUnitAdapter.INSTANCE);
|
mapScaleBar.setDistanceUnitAdapter(MetricUnitAdapter.INSTANCE);
|
||||||
mapScaleBar.setSecondaryDistanceUnitAdapter(ImperialUnitAdapter.INSTANCE);
|
mapScaleBar.setSecondaryDistanceUnitAdapter(ImperialUnitAdapter.INSTANCE);
|
||||||
@@ -86,14 +85,6 @@ public class SimpleMapActivity extends BaseMapActivity {
|
|||||||
mMap.setTheme(VtmThemes.DEFAULT);
|
mMap.setTheme(VtmThemes.DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
if (mapScaleBar != null)
|
|
||||||
mapScaleBar.destroy();
|
|
||||||
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
void runTheMonkey() {
|
void runTheMonkey() {
|
||||||
themes[0] = ThemeLoader.load(VtmThemes.DEFAULT);
|
themes[0] = ThemeLoader.load(VtmThemes.DEFAULT);
|
||||||
themes[1] = ThemeLoader.load(VtmThemes.OSMARENDER);
|
themes[1] = ThemeLoader.load(VtmThemes.OSMARENDER);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import org.oscim.layers.tile.MapTile;
|
|||||||
import org.oscim.tiling.ITileDataSink;
|
import org.oscim.tiling.ITileDataSink;
|
||||||
import org.oscim.tiling.OverzoomDataSink;
|
import org.oscim.tiling.OverzoomDataSink;
|
||||||
import org.oscim.tiling.QueryResult;
|
import org.oscim.tiling.QueryResult;
|
||||||
import org.oscim.tiling.source.mvt.MvtTileDecoder;
|
import org.oscim.tiling.source.mvt.TileDecoder;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -45,10 +45,10 @@ public class MBTilesMvtTileDataSource extends MBTilesTileDataSource {
|
|||||||
|
|
||||||
private final String mLanguage;
|
private final String mLanguage;
|
||||||
|
|
||||||
private final ThreadLocal<MvtTileDecoder> mThreadLocalDecoders = new ThreadLocal<MvtTileDecoder>() {
|
private final ThreadLocal<TileDecoder> mThreadLocalDecoders = new ThreadLocal<TileDecoder>() {
|
||||||
@Override
|
@Override
|
||||||
protected MvtTileDecoder initialValue() {
|
protected TileDecoder initialValue() {
|
||||||
return new MvtTileDecoder(mLanguage);
|
return new TileDecoder(mLanguage);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api 'com.caverock:androidsvg:1.3'
|
api 'com.caverock:androidsvg:1.4'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012 Hannes Janetzek
|
* Copyright 2012 Hannes Janetzek
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2018-2019 Gustl22
|
* Copyright 2018-2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -65,12 +65,21 @@ public class MapView extends GLSurfaceView {
|
|||||||
private static final Pattern GL_PATTERN = Pattern.compile("OpenGL ES (\\d(\\.\\d){0,2})");
|
private static final Pattern GL_PATTERN = Pattern.compile("OpenGL ES (\\d(\\.\\d){0,2})");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Target OpenGL ES version, if not available fall back to OpenGL ES 2.0
|
* OpenGL ES 2.0 default on Android for performance / stability.
|
||||||
|
* Any larger not available versions fall back to OpenGL ES 2.0.
|
||||||
*/
|
*/
|
||||||
public static double targetGLESVersion = 3.0;
|
public static double OPENGL_VERSION = 2.0;
|
||||||
|
|
||||||
private static void init() {
|
private static void init() {
|
||||||
System.loadLibrary("vtm-jni");
|
if (Parameters.THREADED_INIT)
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
System.loadLibrary("vtm-jni");
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
else
|
||||||
|
System.loadLibrary("vtm-jni");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AndroidMap mMap;
|
protected AndroidMap mMap;
|
||||||
@@ -103,7 +112,7 @@ public class MapView extends GLSurfaceView {
|
|||||||
DateTimeAdapter.init(new DateTime());
|
DateTimeAdapter.init(new DateTime());
|
||||||
|
|
||||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||||
CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI);
|
CanvasAdapter.dpi = (int) (metrics.density * CanvasAdapter.DEFAULT_DPI);
|
||||||
if (!Parameters.CUSTOM_TILE_SIZE)
|
if (!Parameters.CUSTOM_TILE_SIZE)
|
||||||
Tile.SIZE = Tile.calculateTileSize();
|
Tile.SIZE = Tile.calculateTileSize();
|
||||||
|
|
||||||
@@ -125,16 +134,20 @@ public class MapView extends GLSurfaceView {
|
|||||||
mMap = new AndroidMap(this);
|
mMap = new AndroidMap(this);
|
||||||
|
|
||||||
/* Initialize Renderer */
|
/* Initialize Renderer */
|
||||||
// OpenGL ES 3.0 is supported with Android 4.3 (API level 18) and higher
|
if (OPENGL_VERSION == 2.0)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
|
||||||
try {
|
|
||||||
setEGLContextFactory(new GlContextFactory());
|
|
||||||
} catch (Throwable t) {
|
|
||||||
log.error("Falling back to GLES 2", t);
|
|
||||||
setEGLContextClientVersion(2);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
setEGLContextClientVersion(2);
|
setEGLContextClientVersion(2);
|
||||||
|
else {
|
||||||
|
// OpenGL ES 3.0 is supported with Android 4.3 (API level 18) and higher
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||||
|
try {
|
||||||
|
setEGLContextFactory(new GlContextFactory());
|
||||||
|
} catch (Throwable t) {
|
||||||
|
log.error("Falling back to GLES 2", t);
|
||||||
|
setEGLContextClientVersion(2);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
setEGLContextClientVersion(2);
|
||||||
|
}
|
||||||
setEGLConfigChooser(new GlConfigChooser());
|
setEGLConfigChooser(new GlConfigChooser());
|
||||||
|
|
||||||
if (GLAdapter.debug)
|
if (GLAdapter.debug)
|
||||||
@@ -346,23 +359,27 @@ public class MapView extends GLSurfaceView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
|
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
|
||||||
try {
|
if (OPENGL_VERSION == 2.0)
|
||||||
// Create a minimum supported OpenGL ES context, then check:
|
|
||||||
String versionString = gl.glGetString(GL10.GL_VERSION);
|
|
||||||
log.info("Version: " + versionString);
|
|
||||||
// The version format is displayed as: "OpenGL ES <major>.<minor>"
|
|
||||||
// followed by optional content provided by the implementation.
|
|
||||||
|
|
||||||
// OpenGL<space>ES<space><version number><space><vendor-specific information>.
|
|
||||||
int[] version = extractVersion(versionString);
|
|
||||||
int majorVersion = version[0];
|
|
||||||
if (majorVersion >= 3)
|
|
||||||
GLAdapter.init(new AndroidGL30());
|
|
||||||
else
|
|
||||||
GLAdapter.init(new AndroidGL());
|
|
||||||
} catch (Throwable t) {
|
|
||||||
log.error("Falling back to GLES 2", t);
|
|
||||||
GLAdapter.init(new AndroidGL());
|
GLAdapter.init(new AndroidGL());
|
||||||
|
else {
|
||||||
|
try {
|
||||||
|
// Create a minimum supported OpenGL ES context, then check:
|
||||||
|
String versionString = gl.glGetString(GL10.GL_VERSION);
|
||||||
|
log.info("Version: " + versionString);
|
||||||
|
// The version format is displayed as: "OpenGL ES <major>.<minor>"
|
||||||
|
// followed by optional content provided by the implementation.
|
||||||
|
|
||||||
|
// OpenGL<space>ES<space><version number><space><vendor-specific information>.
|
||||||
|
int[] version = extractVersion(versionString);
|
||||||
|
int majorVersion = Math.min(version[0], (int) OPENGL_VERSION);
|
||||||
|
if (majorVersion >= 3)
|
||||||
|
GLAdapter.init(new AndroidGL30());
|
||||||
|
else
|
||||||
|
GLAdapter.init(new AndroidGL());
|
||||||
|
} catch (Throwable t) {
|
||||||
|
log.error("Falling back to GLES 2", t);
|
||||||
|
GLAdapter.init(new AndroidGL());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onSurfaceCreated();
|
super.onSurfaceCreated();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010, 2011, 2012 mapsforge.org
|
* Copyright 2010, 2011, 2012 mapsforge.org
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 Longri
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -22,7 +22,7 @@ import android.content.res.Resources;
|
|||||||
import android.graphics.Bitmap.Config;
|
import android.graphics.Bitmap.Config;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.Platform;
|
import org.oscim.backend.Platform;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
@@ -90,7 +90,7 @@ public final class AndroidGraphics extends CanvasAdapter {
|
|||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
public static Bitmap drawableToBitmap(Drawable drawable) {
|
public static Bitmap drawableToBitmap(Drawable drawable) {
|
||||||
if (drawable instanceof BitmapDrawable) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P && drawable instanceof BitmapDrawable) {
|
||||||
return new AndroidBitmap(((BitmapDrawable) drawable).getBitmap());
|
return new AndroidBitmap(((BitmapDrawable) drawable).getBitmap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
package org.oscim.android.gl;
|
package org.oscim.android.gl;
|
||||||
|
|
||||||
import android.opengl.GLSurfaceView;
|
import android.opengl.GLSurfaceView;
|
||||||
|
|
||||||
import org.oscim.android.MapView;
|
import org.oscim.android.MapView;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -51,18 +50,18 @@ public class GlContextFactory implements GLSurfaceView.EGLContextFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
|
public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
|
||||||
log.info("creating OpenGL ES " + MapView.targetGLESVersion + " context");
|
log.info("creating OpenGL ES " + MapView.OPENGL_VERSION + " context");
|
||||||
checkEglError("Before eglCreateContext " + MapView.targetGLESVersion, egl);
|
checkEglError("Before eglCreateContext " + MapView.OPENGL_VERSION, egl);
|
||||||
int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, (int) MapView.targetGLESVersion, EGL10.EGL_NONE};
|
int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, (int) MapView.OPENGL_VERSION, EGL10.EGL_NONE};
|
||||||
EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
|
EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
|
||||||
boolean success = checkEglError("After eglCreateContext " + MapView.targetGLESVersion, egl);
|
boolean success = checkEglError("After eglCreateContext " + MapView.OPENGL_VERSION, egl);
|
||||||
|
|
||||||
if ((!success || context == null) && MapView.targetGLESVersion > 2) {
|
if ((!success || context == null) && MapView.OPENGL_VERSION > 2) {
|
||||||
log.warn("Falling back to GLES 2");
|
log.warn("Falling back to GLES 2");
|
||||||
MapView.targetGLESVersion = 2.0;
|
MapView.OPENGL_VERSION = 2.0;
|
||||||
return createContext(egl, display, eglConfig);
|
return createContext(egl, display, eglConfig);
|
||||||
}
|
}
|
||||||
log.info("Returning a GLES " + MapView.targetGLESVersion + " context");
|
log.info("Returning a GLES " + MapView.OPENGL_VERSION + " context");
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ dependencies {
|
|||||||
implementation project(':vtm-android')
|
implementation project(':vtm-android')
|
||||||
implementation project(':vtm-extras')
|
implementation project(':vtm-extras')
|
||||||
implementation project(':vtm-themes')
|
implementation project(':vtm-themes')
|
||||||
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
|
// https://github.com/square/okhttp/issues/4481
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:3.12.5'
|
||||||
implementation "org.slf4j:slf4j-android:$slf4jVersion"
|
implementation "org.slf4j:slf4j-android:$slf4jVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2020 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).
|
||||||
*
|
*
|
||||||
@@ -41,6 +41,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
public class MapLayers {
|
public class MapLayers {
|
||||||
|
|
||||||
@@ -183,7 +184,9 @@ public class MapLayers {
|
|||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case R.id.menu_layer_openstreetmap:
|
case R.id.menu_layer_openstreetmap:
|
||||||
mBackgroundLayer = new BitmapTileLayer(App.map, DefaultSources.OPENSTREETMAP.build());
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
|
mBackgroundLayer = new BitmapTileLayer(App.map, tileSource);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.menu_layer_naturalearth:
|
case R.id.menu_layer_naturalearth:
|
||||||
|
|||||||
@@ -23,19 +23,14 @@ import android.view.View;
|
|||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.oscim.android.canvas.AndroidGraphics;
|
import org.oscim.android.canvas.AndroidGraphics;
|
||||||
import org.oscim.core.BoundingBox;
|
import org.oscim.core.BoundingBox;
|
||||||
import org.oscim.core.GeoPoint;
|
import org.oscim.core.GeoPoint;
|
||||||
|
import org.oscim.layers.marker.MarkerInterface;
|
||||||
import org.oscim.layers.marker.MarkerSymbol;
|
import org.oscim.layers.marker.MarkerSymbol;
|
||||||
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.osmdroid.location.FlickrPOIProvider;
|
import org.osmdroid.location.*;
|
||||||
import org.osmdroid.location.FourSquareProvider;
|
|
||||||
import org.osmdroid.location.GeoNamesPOIProvider;
|
|
||||||
import org.osmdroid.location.NominatimPOIProvider;
|
|
||||||
import org.osmdroid.location.POI;
|
|
||||||
import org.osmdroid.location.PicasaPOIProvider;
|
|
||||||
import org.osmdroid.overlays.DefaultInfoWindow;
|
import org.osmdroid.overlays.DefaultInfoWindow;
|
||||||
import org.osmdroid.overlays.ExtendedMarkerItem;
|
import org.osmdroid.overlays.ExtendedMarkerItem;
|
||||||
import org.osmdroid.overlays.ItemizedOverlayWithBubble;
|
import org.osmdroid.overlays.ItemizedOverlayWithBubble;
|
||||||
@@ -45,7 +40,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class POISearch {
|
public class POISearch {
|
||||||
private final ArrayList<POI> mPOIs;
|
private final ArrayList<POI> mPOIs;
|
||||||
ItemizedOverlayWithBubble<ExtendedMarkerItem> poiMarkers;
|
ItemizedOverlayWithBubble poiMarkers;
|
||||||
MarkerSymbol[] mMarkers;
|
MarkerSymbol[] mMarkers;
|
||||||
|
|
||||||
private static final int MDEFAULT = 0;
|
private static final int MDEFAULT = 0;
|
||||||
@@ -57,9 +52,9 @@ public class POISearch {
|
|||||||
POISearch() {
|
POISearch() {
|
||||||
mPOIs = new ArrayList<POI>();
|
mPOIs = new ArrayList<POI>();
|
||||||
//POI markers:
|
//POI markers:
|
||||||
final ArrayList<ExtendedMarkerItem> poiItems = new ArrayList<ExtendedMarkerItem>();
|
final ArrayList<MarkerInterface> poiItems = new ArrayList<>();
|
||||||
|
|
||||||
poiMarkers = new ItemizedOverlayWithBubble<ExtendedMarkerItem>(App.map,
|
poiMarkers = new ItemizedOverlayWithBubble(App.map,
|
||||||
App.activity,
|
App.activity,
|
||||||
null,
|
null,
|
||||||
poiItems,
|
poiItems,
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ import android.widget.Button;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.oscim.android.canvas.AndroidGraphics;
|
import org.oscim.android.canvas.AndroidGraphics;
|
||||||
import org.oscim.core.GeoPoint;
|
import org.oscim.core.GeoPoint;
|
||||||
import org.oscim.layers.PathLayer;
|
import org.oscim.layers.PathLayer;
|
||||||
|
import org.oscim.layers.marker.MarkerInterface;
|
||||||
import org.oscim.layers.marker.MarkerSymbol;
|
import org.oscim.layers.marker.MarkerSymbol;
|
||||||
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
||||||
import org.osmdroid.location.GeocoderNominatim;
|
import org.osmdroid.location.GeocoderNominatim;
|
||||||
@@ -48,7 +48,7 @@ public class RouteSearch {
|
|||||||
|
|
||||||
private final PathLayer mRouteOverlay;
|
private final PathLayer mRouteOverlay;
|
||||||
//private final ItemizedOverlayWithBubble<ExtendedOverlayItem> mRouteMarkers;
|
//private final ItemizedOverlayWithBubble<ExtendedOverlayItem> mRouteMarkers;
|
||||||
private final ItemizedOverlayWithBubble<ExtendedMarkerItem> mItineraryMarkers;
|
private final ItemizedOverlayWithBubble mItineraryMarkers;
|
||||||
|
|
||||||
private final RouteBar mRouteBar;
|
private final RouteBar mRouteBar;
|
||||||
|
|
||||||
@@ -63,9 +63,9 @@ public class RouteSearch {
|
|||||||
mViaPoints = new ArrayList<GeoPoint>();
|
mViaPoints = new ArrayList<GeoPoint>();
|
||||||
|
|
||||||
// Itinerary markers:
|
// Itinerary markers:
|
||||||
ArrayList<ExtendedMarkerItem> waypointsItems = new ArrayList<ExtendedMarkerItem>();
|
ArrayList<MarkerInterface> waypointsItems = new ArrayList<>();
|
||||||
|
|
||||||
mItineraryMarkers = new ItemizedOverlayWithBubble<ExtendedMarkerItem>(App.map,
|
mItineraryMarkers = new ItemizedOverlayWithBubble(App.map,
|
||||||
App.activity,
|
App.activity,
|
||||||
null,
|
null,
|
||||||
waypointsItems,
|
waypointsItems,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Ahmad Saleem
|
* Copyright 2013 Ahmad Saleem
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2017 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@@ -24,19 +24,17 @@ import android.hardware.SensorManager;
|
|||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.RotateAnimation;
|
import android.view.animation.RotateAnimation;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import org.oscim.app.App;
|
import org.oscim.app.App;
|
||||||
import org.oscim.app.R;
|
import org.oscim.app.R;
|
||||||
import org.oscim.core.MapPosition;
|
import org.oscim.core.MapPosition;
|
||||||
import org.oscim.event.Event;
|
import org.oscim.event.Event;
|
||||||
import org.oscim.layers.Layer;
|
import org.oscim.layers.Layer;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.oscim.renderer.LocationRenderer;
|
import org.oscim.renderer.LocationCallback;
|
||||||
import org.oscim.utils.FastMath;
|
import org.oscim.utils.FastMath;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class Compass extends Layer implements SensorEventListener, Map.UpdateListener,
|
public class Compass extends Layer implements SensorEventListener, Map.UpdateListener, LocationCallback {
|
||||||
LocationRenderer.Callback {
|
|
||||||
|
|
||||||
// static final Logger log = LoggerFactory.getLogger(Compass.class);
|
// static final Logger log = LoggerFactory.getLogger(Compass.class);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package org.osmdroid.overlays;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.oscim.app.App;
|
import org.oscim.app.App;
|
||||||
import org.oscim.core.GeoPoint;
|
import org.oscim.core.GeoPoint;
|
||||||
import org.oscim.core.MapPosition;
|
import org.oscim.core.MapPosition;
|
||||||
@@ -10,6 +9,7 @@ import org.oscim.core.Point;
|
|||||||
import org.oscim.event.Event;
|
import org.oscim.event.Event;
|
||||||
import org.oscim.event.MotionEvent;
|
import org.oscim.event.MotionEvent;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
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.map.Map;
|
import org.oscim.map.Map;
|
||||||
@@ -22,14 +22,12 @@ import java.util.List;
|
|||||||
* taps on an overlay item, and displays item attributes. <br>
|
* taps on an overlay item, and displays item attributes. <br>
|
||||||
* Items must be ExtendedMarkerItem. <br>
|
* Items must be ExtendedMarkerItem. <br>
|
||||||
*
|
*
|
||||||
* @param <Item> ...
|
|
||||||
* @author M.Kergall
|
* @author M.Kergall
|
||||||
* @see ExtendedMarkerItem
|
* @see ExtendedMarkerItem
|
||||||
* @see InfoWindow
|
* @see InfoWindow
|
||||||
*/
|
*/
|
||||||
public class ItemizedOverlayWithBubble<Item extends MarkerItem> extends
|
public class ItemizedOverlayWithBubble extends ItemizedLayer
|
||||||
ItemizedLayer<Item> implements
|
implements ItemizedLayer.OnItemGestureListener<MarkerInterface>, Map.UpdateListener {
|
||||||
ItemizedLayer.OnItemGestureListener<Item>, Map.UpdateListener {
|
|
||||||
|
|
||||||
/* only one for all items of this overlay => one at a time */
|
/* only one for all items of this overlay => one at a time */
|
||||||
protected InfoWindow mBubble;
|
protected InfoWindow mBubble;
|
||||||
@@ -40,7 +38,7 @@ public class ItemizedOverlayWithBubble<Item extends MarkerItem> extends
|
|||||||
static int layoutResId = 0;
|
static int layoutResId = 0;
|
||||||
|
|
||||||
public ItemizedOverlayWithBubble(Map map, Context context,
|
public ItemizedOverlayWithBubble(Map map, Context context,
|
||||||
MarkerSymbol marker, List<Item> list, InfoWindow bubble) {
|
MarkerSymbol marker, List<MarkerInterface> list, InfoWindow bubble) {
|
||||||
super(map, list, marker, null);
|
super(map, list, marker, null);
|
||||||
|
|
||||||
if (bubble != null) {
|
if (bubble != null) {
|
||||||
@@ -66,12 +64,12 @@ public class ItemizedOverlayWithBubble<Item extends MarkerItem> extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ItemizedOverlayWithBubble(Map map, Context context,
|
public ItemizedOverlayWithBubble(Map map, Context context,
|
||||||
MarkerSymbol marker, List<Item> aList) {
|
MarkerSymbol marker, List<MarkerInterface> aList) {
|
||||||
this(map, context, marker, aList, null);
|
this(map, context, marker, aList, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemLongPress(int index, MarkerItem item) {
|
public boolean onItemLongPress(int index, MarkerInterface item) {
|
||||||
if (mBubble.isOpen())
|
if (mBubble.isOpen())
|
||||||
hideBubble();
|
hideBubble();
|
||||||
else
|
else
|
||||||
@@ -80,7 +78,7 @@ public class ItemizedOverlayWithBubble<Item extends MarkerItem> extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemSingleTapUp(int index, MarkerItem item) {
|
public boolean onItemSingleTapUp(int index, MarkerInterface item) {
|
||||||
showBubble(index);
|
showBubble(index);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -121,7 +119,6 @@ public class ItemizedOverlayWithBubble<Item extends MarkerItem> extends
|
|||||||
*
|
*
|
||||||
* @param index of the overlay item to show
|
* @param index of the overlay item to show
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void showBubbleOnItem(int index) {
|
public void showBubbleOnItem(int index) {
|
||||||
ExtendedMarkerItem item = (ExtendedMarkerItem) (mItemList.get(index));
|
ExtendedMarkerItem item = (ExtendedMarkerItem) (mItemList.get(index));
|
||||||
mItemWithBubble = item;
|
mItemWithBubble = item;
|
||||||
@@ -131,7 +128,7 @@ public class ItemizedOverlayWithBubble<Item extends MarkerItem> extends
|
|||||||
mMap.animator().animateTo(item.geoPoint);
|
mMap.animator().animateTo(item.geoPoint);
|
||||||
|
|
||||||
mMap.updateMap(true);
|
mMap.updateMap(true);
|
||||||
setFocus((Item) item);
|
setFocus(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +176,7 @@ public class ItemizedOverlayWithBubble<Item extends MarkerItem> extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized boolean removeItem(final Item item) {
|
public synchronized boolean removeItem(final MarkerInterface item) {
|
||||||
boolean result = super.removeItem(item);
|
boolean result = super.removeItem(item);
|
||||||
if (mItemWithBubble == item) {
|
if (mItemWithBubble == item) {
|
||||||
hideBubble();
|
hideBubble();
|
||||||
|
|||||||
@@ -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-2019 devemux86
|
||||||
* Copyright 2017 nebular
|
* Copyright 2017 nebular
|
||||||
* Copyright 2018 Gustl22
|
* Copyright 2018 Gustl22
|
||||||
*
|
*
|
||||||
@@ -22,12 +22,7 @@ package org.oscim.awt;
|
|||||||
|
|
||||||
import org.oscim.backend.canvas.Paint;
|
import org.oscim.backend.canvas.Paint;
|
||||||
|
|
||||||
import java.awt.BasicStroke;
|
import java.awt.*;
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.FontMetrics;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.Stroke;
|
|
||||||
import java.awt.font.TextAttribute;
|
import java.awt.font.TextAttribute;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.text.AttributedCharacterIterator.Attribute;
|
import java.text.AttributedCharacterIterator.Attribute;
|
||||||
@@ -125,8 +120,8 @@ public class AwtPaint implements Paint {
|
|||||||
Font font = DEFAULT_FONT; // new Font("Default", Font.PLAIN, 13);
|
Font font = DEFAULT_FONT; // new Font("Default", Font.PLAIN, 13);
|
||||||
Stroke stroke;
|
Stroke stroke;
|
||||||
Style style = Style.FILL;
|
Style style = Style.FILL;
|
||||||
private int cap = getCap(Cap.BUTT);
|
private int cap = getCap(Cap.ROUND);
|
||||||
private int join = getJoin(Join.MITER);
|
private int join = getJoin(Join.ROUND);
|
||||||
private float strokeWidth;
|
private float strokeWidth;
|
||||||
private float textSize = DEFAULT_FONT.getSize();
|
private float textSize = DEFAULT_FONT.getSize();
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ apply plugin: 'maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api 'com.fasterxml.jackson.core:jackson-core:2.8.4'
|
api 'com.fasterxml.jackson.core:jackson-core:2.9.9'
|
||||||
api 'org.locationtech.jts:jts-core:1.15.0'
|
// https://github.com/locationtech/jts/issues/145
|
||||||
api 'org.openstreetmap.osmosis:osmosis-osm-binary:0.46'
|
api 'org.locationtech.jts:jts-core:1.15.1'
|
||||||
|
api 'org.openstreetmap.osmosis:osmosis-osm-binary:0.47'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -78,6 +78,6 @@ public class OverpassTileSource extends UrlTileSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITileDataSource getDataSource() {
|
public ITileDataSource getDataSource() {
|
||||||
return new OverzoomTileDataSource(new UrlTileDataSource(this, new OverpassTileDecoder(), getHttpEngine()), mOverZoom);
|
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(), getHttpEngine()), mOverZoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,14 +39,14 @@ import java.io.InputStream;
|
|||||||
import static org.oscim.core.MercatorProjection.latitudeToY;
|
import static org.oscim.core.MercatorProjection.latitudeToY;
|
||||||
import static org.oscim.core.MercatorProjection.longitudeToX;
|
import static org.oscim.core.MercatorProjection.longitudeToX;
|
||||||
|
|
||||||
public class OverpassTileDecoder implements ITileDecoder {
|
public class TileDecoder implements ITileDecoder {
|
||||||
|
|
||||||
private final MapElement mMapElement;
|
private final MapElement mMapElement;
|
||||||
private ITileDataSink mTileDataSink;
|
private ITileDataSink mTileDataSink;
|
||||||
|
|
||||||
private double mTileY, mTileX, mTileScale;
|
private double mTileY, mTileX, mTileScale;
|
||||||
|
|
||||||
public OverpassTileDecoder() {
|
public TileDecoder() {
|
||||||
mMapElement = new MapElement();
|
mMapElement = new MapElement();
|
||||||
mMapElement.layer = 5;
|
mMapElement.layer = 5;
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,8 @@ apply plugin: 'maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api 'com.squareup.okhttp3:okhttp:3.8.0'
|
// https://github.com/square/okhttp/issues/4481
|
||||||
|
api 'com.squareup.okhttp3:okhttp:3.12.5'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ apply plugin: 'maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api('org.jeo:jeo:0-SNAPSHOT') {
|
api('com.github.jeo.jeo:jeo-carto:master-SNAPSHOT') {
|
||||||
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
|
|
||||||
}
|
|
||||||
api('org.jeo:jeo-carto:0-SNAPSHOT') {
|
|
||||||
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
|
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.oscim.jeo;
|
package org.oscim.jeo;
|
||||||
|
|
||||||
import org.jeo.map.RGB;
|
import io.jeo.map.RGB;
|
||||||
|
|
||||||
public class JeoUtils {
|
public class JeoUtils {
|
||||||
public static int color(RGB rgb) {
|
public static int color(RGB rgb) {
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.layers;
|
package org.oscim.layers;
|
||||||
|
|
||||||
import org.jeo.tile.Tile;
|
import io.jeo.tile.Tile;
|
||||||
import org.jeo.tile.TileDataset;
|
import io.jeo.tile.TileDataset;
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.canvas.Bitmap;
|
import org.oscim.backend.canvas.Bitmap;
|
||||||
import org.oscim.layers.tile.MapTile;
|
import org.oscim.layers.tile.MapTile;
|
||||||
@@ -30,9 +30,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.oscim.tiling.QueryResult.FAILED;
|
import static org.oscim.tiling.QueryResult.*;
|
||||||
import static org.oscim.tiling.QueryResult.SUCCESS;
|
|
||||||
import static org.oscim.tiling.QueryResult.TILE_NOT_FOUND;
|
|
||||||
|
|
||||||
public class JeoTileSource extends TileSource {
|
public class JeoTileSource extends TileSource {
|
||||||
static final Logger log = LoggerFactory.getLogger(JeoTileSource.class);
|
static final Logger log = LoggerFactory.getLogger(JeoTileSource.class);
|
||||||
|
|||||||
@@ -19,16 +19,11 @@ package org.oscim.layers;
|
|||||||
import com.vividsolutions.jts.geom.Envelope;
|
import com.vividsolutions.jts.geom.Envelope;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
import com.vividsolutions.jts.geom.LineString;
|
import com.vividsolutions.jts.geom.LineString;
|
||||||
|
import io.jeo.geom.Geom;
|
||||||
import org.jeo.geom.Geom;
|
import io.jeo.map.*;
|
||||||
import org.jeo.map.CartoCSS;
|
import io.jeo.vector.Feature;
|
||||||
import org.jeo.map.RGB;
|
import io.jeo.vector.VectorDataset;
|
||||||
import org.jeo.map.Rule;
|
import io.jeo.vector.VectorQuery;
|
||||||
import org.jeo.map.RuleList;
|
|
||||||
import org.jeo.map.Style;
|
|
||||||
import org.jeo.vector.Feature;
|
|
||||||
import org.jeo.vector.VectorDataset;
|
|
||||||
import org.jeo.vector.VectorQuery;
|
|
||||||
import org.oscim.jeo.JeoUtils;
|
import org.oscim.jeo.JeoUtils;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.oscim.renderer.bucket.LineBucket;
|
import org.oscim.renderer.bucket.LineBucket;
|
||||||
@@ -77,7 +72,7 @@ public class JeoVectorLayer extends JtsLayer {
|
|||||||
VectorQuery q = new VectorQuery().bounds(b);
|
VectorQuery q = new VectorQuery().bounds(b);
|
||||||
if (dbg)
|
if (dbg)
|
||||||
log.debug("query {}", b);
|
log.debug("query {}", b);
|
||||||
for (Feature f : mDataset.cursor(q)) {
|
for (Feature f : mDataset.read(q)) {
|
||||||
if (dbg)
|
if (dbg)
|
||||||
log.debug("feature {}", f);
|
log.debug("feature {}", f);
|
||||||
|
|
||||||
|
|||||||
@@ -21,13 +21,8 @@ package org.oscim.layers;
|
|||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
import com.vividsolutions.jts.geom.Envelope;
|
import com.vividsolutions.jts.geom.Envelope;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
import io.jeo.geom.CoordinatePath;
|
||||||
import org.jeo.geom.CoordinatePath;
|
import org.oscim.core.*;
|
||||||
import org.oscim.core.Box;
|
|
||||||
import org.oscim.core.GeometryBuffer;
|
|
||||||
import org.oscim.core.MapPosition;
|
|
||||||
import org.oscim.core.MercatorProjection;
|
|
||||||
import org.oscim.core.Tile;
|
|
||||||
import org.oscim.layers.vector.AbstractVectorLayer;
|
import org.oscim.layers.vector.AbstractVectorLayer;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.oscim.renderer.bucket.LineBucket;
|
import org.oscim.renderer.bucket.LineBucket;
|
||||||
|
|||||||
@@ -21,13 +21,12 @@ package org.oscim.layers;
|
|||||||
import com.vividsolutions.jts.geom.Envelope;
|
import com.vividsolutions.jts.geom.Envelope;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
import com.vividsolutions.jts.geom.LineString;
|
import com.vividsolutions.jts.geom.LineString;
|
||||||
|
import io.jeo.map.CartoCSS;
|
||||||
import org.jeo.map.CartoCSS;
|
import io.jeo.map.RGB;
|
||||||
import org.jeo.map.RGB;
|
import io.jeo.map.Rule;
|
||||||
import org.jeo.map.Rule;
|
import io.jeo.map.Style;
|
||||||
import org.jeo.map.Style;
|
import io.jeo.vector.Feature;
|
||||||
import org.jeo.vector.Feature;
|
import io.jeo.vector.VectorDataset;
|
||||||
import org.jeo.vector.VectorDataset;
|
|
||||||
import org.oscim.backend.canvas.Color;
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.jeo.JeoUtils;
|
import org.oscim.jeo.JeoUtils;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
|
|||||||
@@ -18,21 +18,15 @@
|
|||||||
package org.oscim.test;
|
package org.oscim.test;
|
||||||
|
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
import io.jeo.carto.Carto;
|
||||||
import org.jeo.carto.Carto;
|
import io.jeo.data.Dataset;
|
||||||
import org.jeo.data.Dataset;
|
import io.jeo.data.mem.MemVectorDataset;
|
||||||
import org.jeo.data.mem.MemVector;
|
import io.jeo.data.mem.MemWorkspace;
|
||||||
import org.jeo.data.mem.MemWorkspace;
|
import io.jeo.geojson.GeoJSONDataset;
|
||||||
import org.jeo.geojson.GeoJSONDataset;
|
import io.jeo.geojson.GeoJSONReader;
|
||||||
import org.jeo.geojson.GeoJSONReader;
|
import io.jeo.geom.GeomBuilder;
|
||||||
import org.jeo.geom.GeomBuilder;
|
import io.jeo.map.Style;
|
||||||
import org.jeo.map.Style;
|
import io.jeo.vector.*;
|
||||||
import org.jeo.vector.Feature;
|
|
||||||
import org.jeo.vector.Features;
|
|
||||||
import org.jeo.vector.Schema;
|
|
||||||
import org.jeo.vector.SchemaBuilder;
|
|
||||||
import org.jeo.vector.VectorDataset;
|
|
||||||
import org.jeo.vector.VectorQuery;
|
|
||||||
import org.oscim.backend.canvas.Color;
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.layers.OSMIndoorLayer;
|
import org.oscim.layers.OSMIndoorLayer;
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
@@ -42,11 +36,7 @@ import org.oscim.renderer.MapRenderer;
|
|||||||
import org.oscim.theme.styles.TextStyle;
|
import org.oscim.theme.styles.TextStyle;
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
|
|
||||||
public class JeoTest {
|
public class JeoTest {
|
||||||
|
|
||||||
@@ -101,13 +91,13 @@ public class JeoTest {
|
|||||||
GeoJSONReader r = new GeoJSONReader();
|
GeoJSONReader r = new GeoJSONReader();
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
MemWorkspace mem = new MemWorkspace();
|
MemWorkspace mem = new MemWorkspace("");
|
||||||
|
|
||||||
//mem.put("layer", data);
|
//mem.put("layer", data);
|
||||||
try {
|
try {
|
||||||
Schema s = new SchemaBuilder("way").schema();
|
Schema s = new SchemaBuilder("way").schema();
|
||||||
|
|
||||||
MemVector memData = mem.create(s);
|
MemVectorDataset memData = mem.create(s);
|
||||||
|
|
||||||
for (Feature f : r.features(is)) {
|
for (Feature f : r.features(is)) {
|
||||||
//System.out.println("loaded: " + f);
|
//System.out.println("loaded: " + f);
|
||||||
@@ -133,7 +123,7 @@ public class JeoTest {
|
|||||||
|
|
||||||
if (memory) {
|
if (memory) {
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
MemWorkspace mem = new MemWorkspace();
|
MemWorkspace mem = new MemWorkspace("");
|
||||||
|
|
||||||
//mem.put("layer", data);
|
//mem.put("layer", data);
|
||||||
try {
|
try {
|
||||||
@@ -141,9 +131,9 @@ public class JeoTest {
|
|||||||
Schema s = data.schema();
|
Schema s = data.schema();
|
||||||
VectorQuery q = new VectorQuery();
|
VectorQuery q = new VectorQuery();
|
||||||
|
|
||||||
MemVector memData = mem.create(s);
|
MemVectorDataset memData = mem.create(s);
|
||||||
|
|
||||||
for (Feature f : data.cursor(q)) {
|
for (Feature f : data.read(q)) {
|
||||||
memData.add(f);
|
memData.add(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,14 +150,14 @@ public class JeoTest {
|
|||||||
GeomBuilder gb = new GeomBuilder(4326);
|
GeomBuilder gb = new GeomBuilder(4326);
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
MemWorkspace mem = new MemWorkspace();
|
MemWorkspace mem = new MemWorkspace("");
|
||||||
Schema schema = new SchemaBuilder(layer)
|
Schema schema = new SchemaBuilder(layer)
|
||||||
.field("geometry", Geometry.class)
|
.field("geometry", Geometry.class)
|
||||||
.field("id", Integer.class)
|
.field("id", Integer.class)
|
||||||
.field("name", String.class)
|
.field("name", String.class)
|
||||||
.field("cost", Double.class).schema();
|
.field("cost", Double.class).schema();
|
||||||
|
|
||||||
MemVector data;
|
MemVectorDataset data;
|
||||||
try {
|
try {
|
||||||
data = mem.create(schema);
|
data = mem.create(schema);
|
||||||
} catch (UnsupportedOperationException e) {
|
} catch (UnsupportedOperationException e) {
|
||||||
@@ -181,15 +171,16 @@ public class JeoTest {
|
|||||||
Geometry g = gb.point(0, 0).toPoint();
|
Geometry g = gb.point(0, 0).toPoint();
|
||||||
//g.setSRID(4326);
|
//g.setSRID(4326);
|
||||||
|
|
||||||
data.add(Features.create(null, data.schema(),
|
|
||||||
|
data.add(new ListFeature(data.schema(),
|
||||||
g, 1, "anvil",
|
g, 1, "anvil",
|
||||||
10.99));
|
10.99));
|
||||||
|
|
||||||
data.add(Features.create(null, data.schema(),
|
data.add(new ListFeature(data.schema(),
|
||||||
gb.points(10, 10, 20, 20).toLineString(),
|
gb.points(10, 10, 20, 20).toLineString(),
|
||||||
2, "bomb", 11.99));
|
2, "bomb", 11.99));
|
||||||
|
|
||||||
data.add(Features.create(null, data.schema(),
|
data.add(new ListFeature(data.schema(),
|
||||||
gb.point(100, 10).toPoint().buffer(10),
|
gb.point(100, 10).toPoint().buffer(10),
|
||||||
3, "dynamite", 12.99));
|
3, "dynamite", 12.99));
|
||||||
|
|
||||||
|
|||||||
452
vtm-jeo/src/org/oscim/theme/carto/BasicFeature.java
Normal file
452
vtm-jeo/src/org/oscim/theme/carto/BasicFeature.java
Normal file
@@ -0,0 +1,452 @@
|
|||||||
|
/* Copyright 2013 The jeo project. All rights reserved.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* http://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.
|
||||||
|
*/
|
||||||
|
package org.oscim.theme.carto;
|
||||||
|
|
||||||
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
import io.jeo.util.Util;
|
||||||
|
import io.jeo.vector.Feature;
|
||||||
|
import io.jeo.vector.Field;
|
||||||
|
import io.jeo.vector.Schema;
|
||||||
|
import io.jeo.vector.SchemaBuilder;
|
||||||
|
import org.osgeo.proj4j.CoordinateReferenceSystem;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Basic feature implementation.
|
||||||
|
*
|
||||||
|
* @author Justin Deoliveira, Boundless
|
||||||
|
* <p>
|
||||||
|
* Adapted by Jan Lippert to the changes made in https://github.com/jeo/jeo/commit/e28695ccc8530ae6d1a2dff1fbd1e11449ef949f
|
||||||
|
*/
|
||||||
|
public class BasicFeature implements Feature {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* feature identifier
|
||||||
|
*/
|
||||||
|
protected String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Underlying feature storage.
|
||||||
|
*/
|
||||||
|
protected Storage storage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor taking a feature identifier.
|
||||||
|
*
|
||||||
|
* @param id The feature id, if <code>null</code> an identifier will be generated.
|
||||||
|
*/
|
||||||
|
public BasicFeature(String id) {
|
||||||
|
this(id, (Schema) null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor taking a feature identifier and an explicit schema object.
|
||||||
|
*
|
||||||
|
* @param id The feature id, if <code>null</code> an identifier will be generated.
|
||||||
|
* @param schema The feature schema, if <code>null</code> the schema will be always be derived
|
||||||
|
*/
|
||||||
|
public BasicFeature(String id, Schema schema) {
|
||||||
|
this(id, (Storage)
|
||||||
|
(schema != null ? new ListStorage(null, schema) : new MapStorage(null, schema)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a feature from an identifier and a list of values.
|
||||||
|
*
|
||||||
|
* @param id The feature id, if <code>null</code> an identifier will be generated.
|
||||||
|
* @param values The feature values.
|
||||||
|
*/
|
||||||
|
public BasicFeature(String id, List<Object> values) {
|
||||||
|
this(id, values, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a feature from an identifier, a list of values, and a schema.
|
||||||
|
*
|
||||||
|
* @param id The feature id, if <code>null</code> an identifier will be generated.
|
||||||
|
* @param values The feature values.
|
||||||
|
* @param schema The feature schema, if <code>null</code> the schema will be always be derived
|
||||||
|
*/
|
||||||
|
public BasicFeature(String id, List<Object> values, Schema schema) {
|
||||||
|
this(id, new ListStorage(values, schema));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a feature from an identifier and a map of values.
|
||||||
|
*
|
||||||
|
* @param id The feature id, if <code>null</code> an identifier will be generated.
|
||||||
|
* @param values The feature values.
|
||||||
|
*/
|
||||||
|
public BasicFeature(String id, Map<String, Object> values) {
|
||||||
|
this(id, values, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a feature from an identifier, a map of values, and a schema.
|
||||||
|
*
|
||||||
|
* @param id The feature id, if <code>null</code> an identifier will be generated.
|
||||||
|
* @param values The feature values.
|
||||||
|
* @param schema The feature schema, if <code>null</code> the schema will be always be derived
|
||||||
|
*/
|
||||||
|
public BasicFeature(String id, Map<String, Object> values, Schema schema) {
|
||||||
|
this(id, new MapStorage(values, schema));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor taking an identifier and feature storage object directly.
|
||||||
|
* <p>
|
||||||
|
* This constructor is typically only used for subclasses that need to implement custom feature
|
||||||
|
* storage.
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
protected BasicFeature(String id, Storage storage) {
|
||||||
|
this.id = id != null ? id : Util.uuid();
|
||||||
|
this.storage = storage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String id() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@Override
|
||||||
|
public CoordinateReferenceSystem getCRS() {
|
||||||
|
return crs;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
public BasicFeature crs(CoordinateReferenceSystem crs) {
|
||||||
|
storage.crs(crs);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean has(String key) {
|
||||||
|
return storage.has(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object get(String key) {
|
||||||
|
return storage.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BasicFeature put(String key, Object val) {
|
||||||
|
storage.put(key, val);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BasicFeature put(Geometry g) {
|
||||||
|
//TODO:optimize before triggering schema creation
|
||||||
|
Field gf = storage.schema(true).geometry();
|
||||||
|
if (gf == null) {
|
||||||
|
throw new IllegalArgumentException("Feature schema has no geometry");
|
||||||
|
}
|
||||||
|
|
||||||
|
return put(gf.name(), g);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Geometry geometry() {
|
||||||
|
return storage.geometry();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> map() {
|
||||||
|
return storage.map();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new StringBuilder(id).append(map()).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((id == null) ? 0 : id.hashCode());
|
||||||
|
result = prime * result + ((storage == null) ? 0 : storage.hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
BasicFeature other = (BasicFeature) obj;
|
||||||
|
if (id == null) {
|
||||||
|
return other.id == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return id.equals(other.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected static abstract class Storage {
|
||||||
|
Schema schema;
|
||||||
|
CoordinateReferenceSystem crs;
|
||||||
|
|
||||||
|
protected Storage(Schema schema) {
|
||||||
|
this.schema = schema;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Storage crs(CoordinateReferenceSystem crs) {
|
||||||
|
this.crs = crs;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Schema schema() {
|
||||||
|
return schema(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Schema schema(boolean derive) {
|
||||||
|
if (schema == null && derive) {
|
||||||
|
schema = buildSchema();
|
||||||
|
|
||||||
|
// hack to apply crs override
|
||||||
|
if (crs != null && schema.crs() == null) {
|
||||||
|
schema = SchemaBuilder.crs(schema, crs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return schema;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Geometry geometry() {
|
||||||
|
if (schema != null) {
|
||||||
|
Field f = schema.geometry();
|
||||||
|
if (f != null) {
|
||||||
|
return (Geometry) get(f.name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return findGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CoordinateReferenceSystem crs() {
|
||||||
|
if (crs != null) {
|
||||||
|
return crs;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (schema != null) {
|
||||||
|
return schema.crs();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method for subclasses to implement to build a schema for the feature from its underlying
|
||||||
|
* attributes.
|
||||||
|
*/
|
||||||
|
protected abstract Schema buildSchema();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method for subclasses to implement in order to find a geometry object when no schema
|
||||||
|
* information is available.
|
||||||
|
*/
|
||||||
|
protected abstract Geometry findGeometry();
|
||||||
|
|
||||||
|
protected abstract Object get(String key);
|
||||||
|
|
||||||
|
protected abstract Object get(int index);
|
||||||
|
|
||||||
|
protected abstract void put(String key, Object value);
|
||||||
|
|
||||||
|
protected abstract void set(int index, Object value);
|
||||||
|
|
||||||
|
protected abstract List<Object> list();
|
||||||
|
|
||||||
|
protected abstract Map<String, Object> map();
|
||||||
|
|
||||||
|
protected abstract boolean has(String key);
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ListStorage extends Storage {
|
||||||
|
|
||||||
|
List<Object> list;
|
||||||
|
|
||||||
|
ListStorage(List<Object> values, Schema schema) {
|
||||||
|
super(schema);
|
||||||
|
this.list = pad(values, schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Object> pad(List<Object> values, Schema schema) {
|
||||||
|
//copy list passed in
|
||||||
|
values = values != null ? new ArrayList<Object>(values) : new ArrayList<Object>();
|
||||||
|
|
||||||
|
//expand up to size of schema if necessary
|
||||||
|
if (schema != null) {
|
||||||
|
while (values.size() < schema.size()) {
|
||||||
|
values.add(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Geometry findGeometry() {
|
||||||
|
for (Object o : list) {
|
||||||
|
if (o instanceof Geometry) {
|
||||||
|
return (Geometry) o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Schema buildSchema() {
|
||||||
|
List<Field> fields = new ArrayList<Field>();
|
||||||
|
int i = 0;
|
||||||
|
boolean g = false;
|
||||||
|
for (Object o : list) {
|
||||||
|
if (o instanceof Geometry && !g) {
|
||||||
|
//first geometry
|
||||||
|
fields.add(new Field("geometry", o.getClass()));
|
||||||
|
g = true;
|
||||||
|
} else {
|
||||||
|
//regular field
|
||||||
|
fields.add(new Field(String.format(Locale.ROOT, "field%d", i++), o != null ? o.getClass() : null));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new Schema("feature", fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean has(String key) {
|
||||||
|
return schema().indexOf(key) >= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Object get(int i) {
|
||||||
|
return list.get(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void set(int i, Object value) {
|
||||||
|
list.set(i, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Object get(String key) {
|
||||||
|
int i = schema().indexOf(key);
|
||||||
|
return i != -1 ? get(i) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void put(String key, Object val) {
|
||||||
|
int i = schema().indexOf(key);
|
||||||
|
if (i == -1) {
|
||||||
|
throw new IllegalArgumentException("No such key " + key);
|
||||||
|
}
|
||||||
|
set(i, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<Object> list() {
|
||||||
|
return Collections.unmodifiableList(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Map<String, Object> map() {
|
||||||
|
LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();
|
||||||
|
for (Field f : schema()) {
|
||||||
|
map.put(f.name(), get(f.name()));
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static class MapStorage extends Storage {
|
||||||
|
|
||||||
|
Map<String, Object> map;
|
||||||
|
|
||||||
|
MapStorage(Map<String, Object> values, Schema schema) {
|
||||||
|
super(schema);
|
||||||
|
this.map = values != null ?
|
||||||
|
new LinkedHashMap<String, Object>(values) : new LinkedHashMap<String, Object>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Schema buildSchema() {
|
||||||
|
List<Field> fields = new ArrayList<Field>();
|
||||||
|
for (Map.Entry<String, Object> e : map.entrySet()) {
|
||||||
|
fields.add(new Field(e.getKey(), e.getValue() != null ? e.getValue().getClass() : null));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Schema("feature", fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Geometry findGeometry() {
|
||||||
|
for (Object obj : map.values()) {
|
||||||
|
if (obj instanceof Geometry) {
|
||||||
|
return (Geometry) obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean has(String key) {
|
||||||
|
return map.containsKey(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Object get(String key) {
|
||||||
|
return map.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void put(String key, Object val) {
|
||||||
|
if (!map.containsKey(key)) {
|
||||||
|
//new field, clear cached schema
|
||||||
|
schema = null;
|
||||||
|
}
|
||||||
|
map.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Object get(int index) {
|
||||||
|
return Util.get(map, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void set(int index, Object value) {
|
||||||
|
Util.set(map, index, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<Object> list() {
|
||||||
|
List<Object> list = new ArrayList<Object>();
|
||||||
|
for (Field f : schema()) {
|
||||||
|
list.add(get(f.name()));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Map<String, Object> map() {
|
||||||
|
return Collections.unmodifiableMap(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,11 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.theme.carto;
|
package org.oscim.theme.carto;
|
||||||
|
|
||||||
import org.jeo.vector.BasicFeature;
|
|
||||||
import org.oscim.core.Tag;
|
import org.oscim.core.Tag;
|
||||||
import org.oscim.core.TagSet;
|
import org.oscim.core.TagSet;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static java.lang.System.out;
|
import static java.lang.System.out;
|
||||||
@@ -64,27 +62,10 @@ class MatcherFeature extends BasicFeature {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Object> list() {
|
|
||||||
out.println("EEEK list()");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> map() {
|
public Map<String, Object> map() {
|
||||||
out.println("EEEK map()");
|
out.println("EEEK map()");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object get(int arg0) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BasicFeature set(int arg0, Object arg1) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
package org.oscim.theme.carto;
|
package org.oscim.theme.carto;
|
||||||
|
|
||||||
import org.jeo.carto.Carto;
|
import io.jeo.carto.Carto;
|
||||||
import org.jeo.map.CartoCSS;
|
import io.jeo.map.*;
|
||||||
import org.jeo.map.RGB;
|
|
||||||
import org.jeo.map.Rule;
|
|
||||||
import org.jeo.map.RuleList;
|
|
||||||
import org.jeo.map.Style;
|
|
||||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||||
import org.oscim.core.MapElement;
|
import org.oscim.core.MapElement;
|
||||||
import org.oscim.core.Tag;
|
import org.oscim.core.Tag;
|
||||||
@@ -19,9 +15,9 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static io.jeo.map.CartoCSS.BACKGROUND_COLOR;
|
||||||
|
import static io.jeo.map.CartoCSS.OPACITY;
|
||||||
import static java.lang.System.out;
|
import static java.lang.System.out;
|
||||||
import static org.jeo.map.CartoCSS.BACKGROUND_COLOR;
|
|
||||||
import static org.jeo.map.CartoCSS.OPACITY;
|
|
||||||
|
|
||||||
public class RenderTheme implements IRenderTheme {
|
public class RenderTheme implements IRenderTheme {
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ apply plugin: 'maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api 'com.fasterxml.jackson.core:jackson-core:2.8.4'
|
api 'com.fasterxml.jackson.core:jackson-core:2.9.9'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ apply plugin: 'maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api 'org.locationtech.jts:jts-core:1.15.0'
|
// https://github.com/locationtech/jts/issues/145
|
||||||
|
api 'org.locationtech.jts:jts-core:1.15.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
|
* 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).
|
||||||
*
|
*
|
||||||
@@ -17,18 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.layers.vector;
|
package org.oscim.layers.vector;
|
||||||
|
|
||||||
import org.locationtech.jts.geom.Envelope;
|
|
||||||
import org.locationtech.jts.geom.Geometry;
|
|
||||||
import org.locationtech.jts.geom.LineString;
|
|
||||||
import org.locationtech.jts.geom.Point;
|
import org.locationtech.jts.geom.Point;
|
||||||
import org.locationtech.jts.geom.Polygon;
|
import org.locationtech.jts.geom.*;
|
||||||
import org.locationtech.jts.simplify.DouglasPeuckerSimplifier;
|
import org.locationtech.jts.simplify.DouglasPeuckerSimplifier;
|
||||||
import org.oscim.backend.canvas.Color;
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.core.Box;
|
import org.oscim.core.*;
|
||||||
import org.oscim.core.GeoPoint;
|
|
||||||
import org.oscim.core.GeometryBuffer;
|
|
||||||
import org.oscim.core.MapPosition;
|
|
||||||
import org.oscim.core.Tile;
|
|
||||||
import org.oscim.event.Gesture;
|
import org.oscim.event.Gesture;
|
||||||
import org.oscim.event.GestureListener;
|
import org.oscim.event.GestureListener;
|
||||||
import org.oscim.event.MotionEvent;
|
import org.oscim.event.MotionEvent;
|
||||||
@@ -124,7 +118,7 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> implements Gestur
|
|||||||
*
|
*
|
||||||
* @param drawable
|
* @param drawable
|
||||||
*/
|
*/
|
||||||
public void add(Drawable drawable) {
|
public synchronized void add(Drawable drawable) {
|
||||||
mDrawables.insert(bbox(drawable.getGeometry(), drawable.getStyle()), drawable);
|
mDrawables.insert(bbox(drawable.getGeometry(), drawable.getStyle()), drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +129,7 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> implements Gestur
|
|||||||
* @param geometry
|
* @param geometry
|
||||||
* @param style
|
* @param style
|
||||||
*/
|
*/
|
||||||
public synchronized void add(Geometry geometry, Style style) {
|
synchronized void add(Geometry geometry, Style style) {
|
||||||
mDrawables.insert(bbox(geometry, style), new GeometryWithStyle(geometry, style));
|
mDrawables.insert(bbox(geometry, style), new GeometryWithStyle(geometry, style));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,11 +202,11 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> implements Gestur
|
|||||||
|
|
||||||
for (Drawable d : tmpDrawables) {
|
for (Drawable d : tmpDrawables) {
|
||||||
Style style = d.getStyle();
|
Style style = d.getStyle();
|
||||||
draw(t, level, d, style);
|
|
||||||
|
|
||||||
if (style != lastStyle)
|
if (lastStyle != null && lastStyle != style)
|
||||||
level += 2;
|
level += 2;
|
||||||
|
|
||||||
|
draw(t, level, d, style);
|
||||||
lastStyle = style;
|
lastStyle = style;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class PointDrawable extends JtsDrawable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PointDrawable(GeoPoint point, Style style) {
|
public PointDrawable(GeoPoint point, Style style) {
|
||||||
this(point.getLongitude(), point.getLatitude(), style);
|
this(point.getLatitude(), point.getLongitude(), style);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PointDrawable(double lat, double lon, Style style) {
|
public PointDrawable(double lat, double lon, Style style) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -94,7 +94,7 @@ public class Style {
|
|||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
|
||||||
private float strokeWidth = 1f;
|
private float strokeWidth = 1f;
|
||||||
private int strokeColor = Color.GRAY;
|
public int strokeColor = Color.GRAY;
|
||||||
private int fillColor = Color.GRAY;
|
private int fillColor = Color.GRAY;
|
||||||
private float fillAlpha = 0.25f;
|
private float fillAlpha = 0.25f;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ apply plugin: 'maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':vtm')
|
api project(':vtm')
|
||||||
api 'com.wdtinc:mapbox-vector-tile:3.0.0'
|
api 'com.wdtinc:mapbox-vector-tile:3.1.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -65,6 +65,6 @@ public class MapilionMvtTileSource extends UrlTileSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITileDataSource getDataSource() {
|
public ITileDataSource getDataSource() {
|
||||||
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
|
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,6 @@ public class MapzenMvtTileSource extends UrlTileSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITileDataSource getDataSource() {
|
public ITileDataSource getDataSource() {
|
||||||
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
|
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,6 @@ public class NextzenMvtTileSource extends UrlTileSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITileDataSource getDataSource() {
|
public ITileDataSource getDataSource() {
|
||||||
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
|
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,6 @@ public class OpenMapTilesMvtTileSource extends UrlTileSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITileDataSource getDataSource() {
|
public ITileDataSource getDataSource() {
|
||||||
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
|
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class MvtTileDecoder implements ITileDecoder {
|
public class TileDecoder implements ITileDecoder {
|
||||||
private final String mLocale;
|
private final String mLocale;
|
||||||
|
|
||||||
private static final float REF_TILE_SIZE = 4096.0f;
|
private static final float REF_TILE_SIZE = 4096.0f;
|
||||||
@@ -52,11 +52,11 @@ public class MvtTileDecoder implements ITileDecoder {
|
|||||||
private final MapElement mMapElement;
|
private final MapElement mMapElement;
|
||||||
private ITileDataSink mTileDataSink;
|
private ITileDataSink mTileDataSink;
|
||||||
|
|
||||||
public MvtTileDecoder() {
|
public TileDecoder() {
|
||||||
this("");
|
this("");
|
||||||
}
|
}
|
||||||
|
|
||||||
public MvtTileDecoder(String locale) {
|
public TileDecoder(String locale) {
|
||||||
mLocale = locale;
|
mLocale = locale;
|
||||||
mGeomFactory = new GeometryFactory();
|
mGeomFactory = new GeometryFactory();
|
||||||
mMapElement = new MapElement();
|
mMapElement = new MapElement();
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2017-2019 devemux86
|
* Copyright 2017-2020 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).
|
||||||
*
|
*
|
||||||
@@ -22,19 +22,22 @@ import org.oscim.core.BoundingBox;
|
|||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.renderer.MapRenderer;
|
import org.oscim.renderer.MapRenderer;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
public class AnimatorTest extends GdxMapApp {
|
public class AnimatorTest extends GdxMapApp {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
MapRenderer.setBackgroundColor(0xff000000);
|
MapRenderer.setBackgroundColor(0xff000000);
|
||||||
|
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
mMap.setMapPosition(0, 0, 1 << 4);
|
mMap.setMapPosition(0, 0, 1 << 4);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2017 Longri
|
* Copyright 2017 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
|
||||||
@@ -23,17 +23,19 @@ import org.oscim.backend.canvas.Paint;
|
|||||||
import org.oscim.core.GeoPoint;
|
import org.oscim.core.GeoPoint;
|
||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
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.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.renderer.atlas.TextureAtlas;
|
import org.oscim.renderer.atlas.TextureAtlas;
|
||||||
import org.oscim.renderer.atlas.TextureRegion;
|
import org.oscim.renderer.atlas.TextureRegion;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
import org.oscim.utils.TextureAtlasUtils;
|
import org.oscim.utils.TextureAtlasUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -46,9 +48,10 @@ public class AtlasMultiTextureTest extends MarkerLayerTest {
|
|||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
mMap.layers().add(new MapEventsReceiver(mMap));
|
||||||
|
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
mMap.setMapPosition(0, 0, 1 << 2);
|
mMap.setMapPosition(0, 0, 1 << 2);
|
||||||
@@ -64,7 +67,7 @@ public class AtlasMultiTextureTest extends MarkerLayerTest {
|
|||||||
paint.setTextSize(12);
|
paint.setTextSize(12);
|
||||||
paint.setStrokeWidth(2);
|
paint.setStrokeWidth(2);
|
||||||
paint.setColor(Color.BLACK);
|
paint.setColor(Color.BLACK);
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
for (double lat = -90; lat <= 90; lat += 5) {
|
for (double lat = -90; lat <= 90; lat += 5) {
|
||||||
for (double lon = -180; lon <= 180; lon += 5) {
|
for (double lon = -180; lon <= 180; lon += 5) {
|
||||||
String title = lat + "/" + lon;
|
String title = lat + "/" + lon;
|
||||||
@@ -84,29 +87,32 @@ public class AtlasMultiTextureTest extends MarkerLayerTest {
|
|||||||
// With iOS we must flip the Y-Axis
|
// With iOS we must flip the Y-Axis
|
||||||
TextureAtlasUtils.createTextureRegions(inputMap, regionsMap, atlasList, true, false);
|
TextureAtlasUtils.createTextureRegions(inputMap, regionsMap, atlasList, true, false);
|
||||||
|
|
||||||
mMarkerLayer = new ItemizedLayer<>(mMap, new ArrayList<MarkerItem>(), (MarkerSymbol) null, this);
|
mMarkerLayer = new ItemizedLayer(mMap, new ArrayList<MarkerInterface>(), (MarkerSymbol) null, this);
|
||||||
mMap.layers().add(mMarkerLayer);
|
mMap.layers().add(mMarkerLayer);
|
||||||
|
|
||||||
mMarkerLayer.addItems(pts);
|
mMarkerLayer.addItems(pts);
|
||||||
|
|
||||||
// set all markers
|
// set all markers
|
||||||
for (MarkerItem item : pts) {
|
for (MarkerInterface item : pts) {
|
||||||
MarkerSymbol markerSymbol = new MarkerSymbol(regionsMap.get(item.getTitle()), HotspotPlace.BOTTOM_CENTER);
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
item.setMarker(markerSymbol);
|
MarkerSymbol markerSymbol = new MarkerSymbol(regionsMap.get(markerItem.getTitle()), HotspotPlace.BOTTOM_CENTER);
|
||||||
|
markerItem.setMarker(markerSymbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("Atlas count: " + atlasList.size());
|
System.out.println("Atlas count: " + atlasList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemSingleTapUp(int index, MarkerItem item) {
|
public boolean onItemSingleTapUp(int index, MarkerInterface item) {
|
||||||
System.out.println("Marker tap " + item.getTitle());
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
|
System.out.println("Marker tap " + markerItem.getTitle());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemLongPress(int index, MarkerItem item) {
|
public boolean onItemLongPress(int index, MarkerInterface item) {
|
||||||
System.out.println("Marker long press " + item.getTitle());
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
|
System.out.println("Marker long press " + markerItem.getTitle());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 devemux86
|
* Copyright 2016-2020 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).
|
||||||
*
|
*
|
||||||
@@ -20,8 +20,11 @@ import com.badlogic.gdx.Input;
|
|||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.renderer.MapRenderer;
|
import org.oscim.renderer.MapRenderer;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
public class BitmapTileTest extends GdxMapApp {
|
public class BitmapTileTest extends GdxMapApp {
|
||||||
|
|
||||||
private BitmapTileLayer mLayer = null;
|
private BitmapTileLayer mLayer = null;
|
||||||
@@ -33,7 +36,9 @@ public class BitmapTileTest extends GdxMapApp {
|
|||||||
mMap.layers().remove(mShaded);
|
mMap.layers().remove(mShaded);
|
||||||
mShaded = null;
|
mShaded = null;
|
||||||
mMap.layers().remove(mLayer);
|
mMap.layers().remove(mLayer);
|
||||||
mLayer = new BitmapTileLayer(mMap, DefaultSources.OPENSTREETMAP.build());
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
|
mLayer = new BitmapTileLayer(mMap, tileSource);
|
||||||
mMap.layers().add(mLayer);
|
mMap.layers().add(mLayer);
|
||||||
mMap.clearMap();
|
mMap.clearMap();
|
||||||
return true;
|
return true;
|
||||||
@@ -64,7 +69,9 @@ public class BitmapTileTest extends GdxMapApp {
|
|||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
MapRenderer.setBackgroundColor(0xff888888);
|
MapRenderer.setBackgroundColor(0xff888888);
|
||||||
|
|
||||||
mLayer = new BitmapTileLayer(mMap, DefaultSources.OPENSTREETMAP.build());
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
|
mLayer = new BitmapTileLayer(mMap, tileSource);
|
||||||
mMap.layers().add(mLayer);
|
mMap.layers().add(mLayer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2017 nebular
|
* Copyright 2017 nebular
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -22,12 +22,13 @@ import org.oscim.core.GeoPoint;
|
|||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.marker.*;
|
import org.oscim.layers.marker.*;
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
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;
|
||||||
|
|
||||||
public class ClusterMarkerLayerTest extends MarkerLayerTest {
|
public class ClusterMarkerLayerTest extends MarkerLayerTest {
|
||||||
@@ -41,9 +42,10 @@ public class ClusterMarkerLayerTest extends MarkerLayerTest {
|
|||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
mMap.layers().add(new MapEventsReceiver(mMap));
|
||||||
|
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
mMap.setMapPosition(53.08, 8.83, 1 << 15);
|
mMap.setMapPosition(53.08, 8.83, 1 << 15);
|
||||||
@@ -67,15 +69,15 @@ public class ClusterMarkerLayerTest extends MarkerLayerTest {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mMarkerLayer = new ItemizedLayer<>(
|
mMarkerLayer = new ItemizedLayer(
|
||||||
mMap,
|
mMap,
|
||||||
new ArrayList<MarkerItem>(),
|
new ArrayList<MarkerInterface>(),
|
||||||
markerRendererFactory,
|
markerRendererFactory,
|
||||||
this);
|
this);
|
||||||
mMap.layers().add(mMarkerLayer);
|
mMap.layers().add(mMarkerLayer);
|
||||||
|
|
||||||
// Create some markers spaced STEP degrees
|
// Create some markers spaced STEP degrees
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
GeoPoint center = mMap.getMapPosition().getGeoPoint();
|
GeoPoint center = mMap.getMapPosition().getGeoPoint();
|
||||||
for (int x = -COUNT; x < COUNT; x++) {
|
for (int x = -COUNT; x < COUNT; x++) {
|
||||||
for (int y = -COUNT; y < COUNT; y++) {
|
for (int y = -COUNT; y < COUNT; y++) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import org.oscim.theme.VtmThemes;
|
|||||||
public class ExtrusionsTest extends GdxMapApp {
|
public class ExtrusionsTest extends GdxMapApp {
|
||||||
|
|
||||||
enum GroundShape {
|
enum GroundShape {
|
||||||
HEXAGON, RECTANGLE, SHAPE_L, SHAPE_O, SHAPE_T, SHAPE_U, SHAPE_V, SHAPE_X, SHAPE_Z, TEST
|
HEXAGON, RECTANGLE, SHAPE_L, SHAPE_M, SHAPE_O, SHAPE_T, SHAPE_U, SHAPE_V, SHAPE_X, SHAPE_Z, TEST
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -123,6 +123,9 @@ public class ExtrusionsTest extends GdxMapApp {
|
|||||||
case SHAPE_L:
|
case SHAPE_L:
|
||||||
shapeLGround(e);
|
shapeLGround(e);
|
||||||
break;
|
break;
|
||||||
|
case SHAPE_M:
|
||||||
|
shapeMGround(e);
|
||||||
|
break;
|
||||||
case SHAPE_O:
|
case SHAPE_O:
|
||||||
shapeOGround(e);
|
shapeOGround(e);
|
||||||
break;
|
break;
|
||||||
@@ -181,6 +184,19 @@ public class ExtrusionsTest extends GdxMapApp {
|
|||||||
e.addPoint(0, 10);
|
e.addPoint(0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void shapeMGround(MapElement e) {
|
||||||
|
e.addPoint(0, 0);
|
||||||
|
e.addPoint(10, 0);
|
||||||
|
e.addPoint(10, 5);
|
||||||
|
e.addPoint(20, 5);
|
||||||
|
e.addPoint(20, 20);
|
||||||
|
e.addPoint(37, 20);
|
||||||
|
e.addPoint(37, 25);
|
||||||
|
e.addPoint(12, 25);
|
||||||
|
e.addPoint(12, 15);
|
||||||
|
e.addPoint(0, 15);
|
||||||
|
}
|
||||||
|
|
||||||
private void shapeOGround(MapElement e) {
|
private void shapeOGround(MapElement e) {
|
||||||
hexagonGround(e);
|
hexagonGround(e);
|
||||||
e.reverse();
|
e.reverse();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -77,7 +77,7 @@ public class LineRenderTest extends GdxMapApp {
|
|||||||
TextureItem tex = null;
|
TextureItem tex = null;
|
||||||
try {
|
try {
|
||||||
tex = new TextureItem(CanvasAdapter.getBitmapAsset("", "patterns/dot.png"));
|
tex = new TextureItem(CanvasAdapter.getBitmapAsset("", "patterns/dot.png"));
|
||||||
tex.mipmap = true;
|
//tex.mipmap = true;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016-2019 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@@ -28,12 +28,13 @@ import org.oscim.layers.vector.PathLayer;
|
|||||||
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.TextureItem;
|
import org.oscim.renderer.bucket.TextureItem;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
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;
|
||||||
|
|
||||||
public class LineTexTest extends GdxMapApp {
|
public class LineTexTest extends GdxMapApp {
|
||||||
@@ -45,16 +46,17 @@ public class LineTexTest extends GdxMapApp {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
mMap.setMapPosition(0, 0, 1 << 2);
|
mMap.setMapPosition(0, 0, 1 << 2);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
tex = new TextureItem(CanvasAdapter.getBitmapAsset("", "patterns/pike.png"));
|
tex = new TextureItem(CanvasAdapter.getBitmapAsset("", "patterns/pike.png"));
|
||||||
tex.mipmap = true;
|
//tex.mipmap = true;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2016-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.test;
|
|
||||||
|
|
||||||
import org.oscim.core.MapPosition;
|
|
||||||
import org.oscim.core.Tile;
|
|
||||||
import org.oscim.gdx.GdxMapApp;
|
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
|
||||||
import org.oscim.theme.VtmThemes;
|
|
||||||
import org.oscim.tiling.source.mapfile.MapFileTileSource;
|
|
||||||
import org.oscim.tiling.source.mapfile.MultiMapFileTileSource;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class MapsforgeMultiTest extends GdxMapApp {
|
|
||||||
|
|
||||||
private final List<File> mapFiles;
|
|
||||||
|
|
||||||
private MapsforgeMultiTest(List<File> mapFiles) {
|
|
||||||
this.mapFiles = mapFiles;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createLayers() {
|
|
||||||
MultiMapFileTileSource tileSource = new MultiMapFileTileSource();
|
|
||||||
for (File mapFile : mapFiles) {
|
|
||||||
MapFileTileSource mapFileTileSource = new MapFileTileSource();
|
|
||||||
mapFileTileSource.setMapFile(mapFile.getAbsolutePath());
|
|
||||||
tileSource.add(mapFileTileSource);
|
|
||||||
}
|
|
||||||
//tileSource.setPreferredLanguage("en");
|
|
||||||
|
|
||||||
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
|
||||||
mMap.setTheme(VtmThemes.DEFAULT);
|
|
||||||
|
|
||||||
mMap.layers().add(new BuildingLayer(mMap, l));
|
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
|
||||||
|
|
||||||
MapPosition pos = new MapPosition();
|
|
||||||
pos.setByBoundingBox(tileSource.getBoundingBox(), Tile.SIZE * 4, Tile.SIZE * 4);
|
|
||||||
mMap.setMapPosition(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<File> getMapFiles(String[] args) {
|
|
||||||
if (args.length == 0) {
|
|
||||||
throw new IllegalArgumentException("missing argument: <mapFile>");
|
|
||||||
}
|
|
||||||
|
|
||||||
List<File> result = new ArrayList<>();
|
|
||||||
for (String arg : args) {
|
|
||||||
File mapFile = new File(arg);
|
|
||||||
if (!mapFile.exists()) {
|
|
||||||
throw new IllegalArgumentException("file does not exist: " + mapFile);
|
|
||||||
} else if (!mapFile.isFile()) {
|
|
||||||
throw new IllegalArgumentException("not a file: " + mapFile);
|
|
||||||
} else if (!mapFile.canRead()) {
|
|
||||||
throw new IllegalArgumentException("cannot read file: " + mapFile);
|
|
||||||
}
|
|
||||||
result.add(mapFile);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
GdxMapApp.init();
|
|
||||||
GdxMapApp.run(new MapsforgeMultiTest(getMapFiles(args)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 devemux86
|
* Copyright 2018-2019 devemux86
|
||||||
* Copyright 2018 Gustl22
|
* Copyright 2018 Gustl22
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -18,15 +18,16 @@ package org.oscim.test;
|
|||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MapsforgePoi3DTest extends MapsforgeTest {
|
public class MapsforgePoi3DTest extends MapsforgeTest {
|
||||||
|
|
||||||
private MapsforgePoi3DTest(File mapFile) {
|
private MapsforgePoi3DTest(List<File> mapFiles) {
|
||||||
super(mapFile, false, true);
|
super(mapFiles, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
GdxMapApp.init();
|
GdxMapApp.init();
|
||||||
GdxMapApp.run(new MapsforgePoi3DTest(getMapFile(args)));
|
GdxMapApp.run(new MapsforgePoi3DTest(getMapFiles(args)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2018 devemux86
|
* Copyright 2018-2019 devemux86
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@@ -17,15 +17,16 @@ package org.oscim.test;
|
|||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MapsforgeS3DBTest extends MapsforgeTest {
|
public class MapsforgeS3DBTest extends MapsforgeTest {
|
||||||
|
|
||||||
private MapsforgeS3DBTest(File mapFile) {
|
private MapsforgeS3DBTest(List<File> mapFiles) {
|
||||||
super(mapFile, true, false);
|
super(mapFiles, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
GdxMapApp.init();
|
GdxMapApp.init();
|
||||||
GdxMapApp.run(new MapsforgeS3DBTest(getMapFile(args)));
|
GdxMapApp.run(new MapsforgeS3DBTest(getMapFiles(args)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2017 devemux86
|
* Copyright 2016-2019 devemux86
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
* This program is free software: you can redistribute it and/or modify it under the
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
@@ -22,16 +22,17 @@ import org.oscim.theme.XmlRenderThemeStyleLayer;
|
|||||||
import org.oscim.theme.XmlRenderThemeStyleMenu;
|
import org.oscim.theme.XmlRenderThemeStyleMenu;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class MapsforgeStyleTest extends MapsforgeTest {
|
public class MapsforgeStyleTest extends MapsforgeTest {
|
||||||
|
|
||||||
private MapsforgeStyleTest(File mapFile) {
|
private MapsforgeStyleTest(List<File> mapFiles) {
|
||||||
super(mapFile);
|
super(mapFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void loadTheme(final String styleId) {
|
void loadTheme(final String styleId) {
|
||||||
mMap.setTheme(new StreamRenderTheme("", getClass().getResourceAsStream("/assets/vtm/stylemenu.xml"), new XmlRenderThemeMenuCallback() {
|
mMap.setTheme(new StreamRenderTheme("", getClass().getResourceAsStream("/assets/vtm/stylemenu.xml"), new XmlRenderThemeMenuCallback() {
|
||||||
@Override
|
@Override
|
||||||
public Set<String> getCategories(XmlRenderThemeStyleMenu renderThemeStyleMenu) {
|
public Set<String> getCategories(XmlRenderThemeStyleMenu renderThemeStyleMenu) {
|
||||||
@@ -79,6 +80,6 @@ public class MapsforgeStyleTest extends MapsforgeTest {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
GdxMapApp.init();
|
GdxMapApp.init();
|
||||||
GdxMapApp.run(new MapsforgeStyleTest(getMapFile(args)));
|
GdxMapApp.run(new MapsforgeStyleTest(getMapFiles(args)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.test;
|
package org.oscim.test;
|
||||||
|
|
||||||
|
import org.oscim.core.BoundingBox;
|
||||||
import org.oscim.core.MapPosition;
|
import org.oscim.core.MapPosition;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.event.Event;
|
import org.oscim.event.Event;
|
||||||
@@ -33,33 +34,39 @@ import org.oscim.renderer.GLViewport;
|
|||||||
import org.oscim.scalebar.*;
|
import org.oscim.scalebar.*;
|
||||||
import org.oscim.theme.VtmThemes;
|
import org.oscim.theme.VtmThemes;
|
||||||
import org.oscim.tiling.source.mapfile.MapFileTileSource;
|
import org.oscim.tiling.source.mapfile.MapFileTileSource;
|
||||||
import org.oscim.tiling.source.mapfile.MapInfo;
|
import org.oscim.tiling.source.mapfile.MultiMapFileTileSource;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MapsforgeTest extends GdxMapApp {
|
public class MapsforgeTest extends GdxMapApp {
|
||||||
|
|
||||||
private static final boolean SHADOWS = false;
|
private static final boolean SHADOWS = false;
|
||||||
|
|
||||||
private File mapFile;
|
private final List<File> mapFiles;
|
||||||
private boolean poi3d;
|
private final boolean poi3d;
|
||||||
private boolean s3db;
|
private final boolean s3db;
|
||||||
|
|
||||||
MapsforgeTest(File mapFile) {
|
MapsforgeTest(List<File> mapFiles) {
|
||||||
this(mapFile, false, false);
|
this(mapFiles, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
MapsforgeTest(File mapFile, boolean s3db, boolean poi3d) {
|
MapsforgeTest(List<File> mapFiles, boolean s3db, boolean poi3d) {
|
||||||
this.mapFile = mapFile;
|
this.mapFiles = mapFiles;
|
||||||
this.s3db = s3db;
|
this.s3db = s3db;
|
||||||
this.poi3d = poi3d;
|
this.poi3d = poi3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
MapFileTileSource tileSource = new MapFileTileSource();
|
MultiMapFileTileSource tileSource = new MultiMapFileTileSource();
|
||||||
tileSource.setMapFile(mapFile.getAbsolutePath());
|
for (File mapFile : mapFiles) {
|
||||||
|
MapFileTileSource mapFileTileSource = new MapFileTileSource();
|
||||||
|
mapFileTileSource.setMapFile(mapFile.getAbsolutePath());
|
||||||
|
tileSource.add(mapFileTileSource);
|
||||||
|
}
|
||||||
//tileSource.setPreferredLanguage("en");
|
//tileSource.setPreferredLanguage("en");
|
||||||
|
|
||||||
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
VectorTileLayer l = mMap.setBaseMap(tileSource);
|
||||||
@@ -86,10 +93,10 @@ public class MapsforgeTest extends GdxMapApp {
|
|||||||
mMap.layers().add(mapScaleBarLayer);
|
mMap.layers().add(mapScaleBarLayer);
|
||||||
|
|
||||||
MapPosition pos = MapPreferences.getMapPosition();
|
MapPosition pos = MapPreferences.getMapPosition();
|
||||||
MapInfo info = tileSource.getMapInfo();
|
BoundingBox bbox = tileSource.getBoundingBox();
|
||||||
if (pos == null || !info.boundingBox.contains(pos.getGeoPoint())) {
|
if (pos == null || !bbox.contains(pos.getGeoPoint())) {
|
||||||
pos = new MapPosition();
|
pos = new MapPosition();
|
||||||
pos.setByBoundingBox(info.boundingBox, Tile.SIZE * 4, Tile.SIZE * 4);
|
pos.setByBoundingBox(bbox, Tile.SIZE * 4, Tile.SIZE * 4);
|
||||||
}
|
}
|
||||||
mMap.setMapPosition(pos);
|
mMap.setMapPosition(pos);
|
||||||
|
|
||||||
@@ -123,28 +130,32 @@ public class MapsforgeTest extends GdxMapApp {
|
|||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
static File getMapFile(String[] args) {
|
static List<File> getMapFiles(String[] args) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
throw new IllegalArgumentException("missing argument: <mapFile>");
|
throw new IllegalArgumentException("missing argument: <mapFile>");
|
||||||
}
|
}
|
||||||
|
|
||||||
File file = new File(args[0]);
|
List<File> result = new ArrayList<>();
|
||||||
if (!file.exists()) {
|
for (String arg : args) {
|
||||||
throw new IllegalArgumentException("file does not exist: " + file);
|
File mapFile = new File(arg);
|
||||||
} else if (!file.isFile()) {
|
if (!mapFile.exists()) {
|
||||||
throw new IllegalArgumentException("not a file: " + file);
|
throw new IllegalArgumentException("file does not exist: " + mapFile);
|
||||||
} else if (!file.canRead()) {
|
} else if (!mapFile.isFile()) {
|
||||||
throw new IllegalArgumentException("cannot read file: " + file);
|
throw new IllegalArgumentException("not a file: " + mapFile);
|
||||||
|
} else if (!mapFile.canRead()) {
|
||||||
|
throw new IllegalArgumentException("cannot read file: " + mapFile);
|
||||||
|
}
|
||||||
|
result.add(mapFile);
|
||||||
}
|
}
|
||||||
return file;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadTheme(final String styleId) {
|
void loadTheme(final String styleId) {
|
||||||
mMap.setTheme(VtmThemes.DEFAULT);
|
mMap.setTheme(VtmThemes.DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
GdxMapApp.init();
|
GdxMapApp.init();
|
||||||
GdxMapApp.run(new MapsforgeTest(getMapFile(args)));
|
GdxMapApp.run(new MapsforgeTest(getMapFiles(args)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2019 telemaxx
|
* Copyright 2019 telemaxx
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -25,6 +25,7 @@ import org.oscim.event.MotionEvent;
|
|||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.Layer;
|
import org.oscim.layers.Layer;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
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.vector.VectorTileLayer;
|
||||||
@@ -41,7 +42,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
import static org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
|
||||||
|
|
||||||
public class MarkerLayerLabelsTest extends GdxMapApp implements ItemizedLayer.OnItemGestureListener<MarkerItem> {
|
public class MarkerLayerLabelsTest extends GdxMapApp implements ItemizedLayer.OnItemGestureListener<MarkerInterface> {
|
||||||
|
|
||||||
private static final int FG_COLOR = 0xFF000000; // 100 percent black. AARRGGBB
|
private static final int FG_COLOR = 0xFF000000; // 100 percent black. AARRGGBB
|
||||||
private static final int BG_COLOR = 0x80FF69B4; // 50 percent pink. AARRGGBB
|
private static final int BG_COLOR = 0x80FF69B4; // 50 percent pink. AARRGGBB
|
||||||
@@ -87,11 +88,11 @@ public class MarkerLayerLabelsTest extends GdxMapApp implements ItemizedLayer.On
|
|||||||
//Bitmap bitmapPoi = CanvasAdapter.decodeBitmap(getClass().getResourceAsStream("/res/marker_poi2.png"));
|
//Bitmap bitmapPoi = CanvasAdapter.decodeBitmap(getClass().getResourceAsStream("/res/marker_poi2.png"));
|
||||||
MarkerSymbol symbol = new MarkerSymbol(bitmapPoi, HotspotPlace.CENTER, false);
|
MarkerSymbol symbol = new MarkerSymbol(bitmapPoi, HotspotPlace.CENTER, false);
|
||||||
|
|
||||||
ItemizedLayer<MarkerItem> markerLayer = new ItemizedLayer<>(mMap, new ArrayList<MarkerItem>(), symbol, this);
|
ItemizedLayer markerLayer = new ItemizedLayer(mMap, new ArrayList<MarkerInterface>(), symbol, this);
|
||||||
mMap.layers().add(markerLayer);
|
mMap.layers().add(markerLayer);
|
||||||
|
|
||||||
// creating some poi's
|
// creating some poi's
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
pts.add(new MarkerItem("Brandenburger Tor", "#1789-1793", new GeoPoint(52.516275, 13.377704)));
|
pts.add(new MarkerItem("Brandenburger Tor", "#1789-1793", new GeoPoint(52.516275, 13.377704)));
|
||||||
pts.add(new MarkerItem("Siegessaeule, hidden description", "this is a hidden Description without a #", new GeoPoint(52.514543, 13.350119)));
|
pts.add(new MarkerItem("Siegessaeule, hidden description", "this is a hidden Description without a #", new GeoPoint(52.514543, 13.350119)));
|
||||||
pts.add(new MarkerItem("Gleisdreieck, without description", "", new GeoPoint(52.499562, 13.374063)));
|
pts.add(new MarkerItem("Gleisdreieck, without description", "", new GeoPoint(52.499562, 13.374063)));
|
||||||
@@ -101,9 +102,10 @@ public class MarkerLayerLabelsTest extends GdxMapApp implements ItemizedLayer.On
|
|||||||
+ "is drawn on the map\n"
|
+ "is drawn on the map\n"
|
||||||
+ "the rest is surpressed", new GeoPoint(52.509352, 13.375739)));
|
+ "the rest is surpressed", new GeoPoint(52.509352, 13.375739)));
|
||||||
|
|
||||||
for (MarkerItem mi : pts) {
|
for (MarkerInterface mi : pts) {
|
||||||
System.out.println("title: " + mi.title);
|
MarkerItem markerItem = (MarkerItem) mi;
|
||||||
mi.setMarker(createAdvancedSymbol(mi, bitmapPoi));
|
System.out.println("title: " + markerItem.title);
|
||||||
|
markerItem.setMarker(createAdvancedSymbol(markerItem, bitmapPoi));
|
||||||
}
|
}
|
||||||
|
|
||||||
markerLayer.addItems(pts);
|
markerLayer.addItems(pts);
|
||||||
@@ -198,14 +200,16 @@ public class MarkerLayerLabelsTest extends GdxMapApp implements ItemizedLayer.On
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemSingleTapUp(int index, MarkerItem item) {
|
public boolean onItemSingleTapUp(int index, MarkerInterface item) {
|
||||||
System.out.println("Marker tap " + item.getTitle());
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
|
System.out.println("Marker tap " + markerItem.getTitle());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemLongPress(int index, MarkerItem item) {
|
public boolean onItemLongPress(int index, MarkerInterface item) {
|
||||||
System.out.println("Marker long press " + item.getTitle());
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
|
System.out.println("Marker long press " + markerItem.getTitle());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 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
|
||||||
@@ -23,25 +23,27 @@ import org.oscim.event.MotionEvent;
|
|||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.Layer;
|
import org.oscim.layers.Layer;
|
||||||
import org.oscim.layers.marker.ItemizedLayer;
|
import org.oscim.layers.marker.ItemizedLayer;
|
||||||
|
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.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.map.Map;
|
import org.oscim.map.Map;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
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;
|
||||||
|
|
||||||
public class MarkerLayerTest extends GdxMapApp implements ItemizedLayer.OnItemGestureListener<MarkerItem> {
|
public class MarkerLayerTest extends GdxMapApp implements ItemizedLayer.OnItemGestureListener<MarkerInterface> {
|
||||||
|
|
||||||
static final boolean BILLBOARDS = true;
|
static final boolean BILLBOARDS = true;
|
||||||
MarkerSymbol mFocusMarker;
|
MarkerSymbol mFocusMarker;
|
||||||
ItemizedLayer<MarkerItem> mMarkerLayer;
|
ItemizedLayer mMarkerLayer;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
@@ -49,9 +51,10 @@ public class MarkerLayerTest extends GdxMapApp implements ItemizedLayer.OnItemGe
|
|||||||
// Map events receiver
|
// Map events receiver
|
||||||
mMap.layers().add(new MapEventsReceiver(mMap));
|
mMap.layers().add(new MapEventsReceiver(mMap));
|
||||||
|
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
mMap.setMapPosition(0, 0, 1 << 2);
|
mMap.setMapPosition(0, 0, 1 << 2);
|
||||||
@@ -69,10 +72,10 @@ public class MarkerLayerTest extends GdxMapApp implements ItemizedLayer.OnItemGe
|
|||||||
else
|
else
|
||||||
mFocusMarker = new MarkerSymbol(bitmapFocus, HotspotPlace.CENTER, false);
|
mFocusMarker = new MarkerSymbol(bitmapFocus, HotspotPlace.CENTER, false);
|
||||||
|
|
||||||
mMarkerLayer = new ItemizedLayer<>(mMap, new ArrayList<MarkerItem>(), symbol, this);
|
mMarkerLayer = new ItemizedLayer(mMap, new ArrayList<MarkerInterface>(), symbol, this);
|
||||||
mMap.layers().add(mMarkerLayer);
|
mMap.layers().add(mMarkerLayer);
|
||||||
|
|
||||||
List<MarkerItem> pts = new ArrayList<>();
|
List<MarkerInterface> pts = new ArrayList<>();
|
||||||
for (double lat = -90; lat <= 90; lat += 5) {
|
for (double lat = -90; lat <= 90; lat += 5) {
|
||||||
for (double lon = -180; lon <= 180; lon += 5)
|
for (double lon = -180; lon <= 180; lon += 5)
|
||||||
pts.add(new MarkerItem(lat + "/" + lon, "", new GeoPoint(lat, lon)));
|
pts.add(new MarkerItem(lat + "/" + lon, "", new GeoPoint(lat, lon)));
|
||||||
@@ -84,24 +87,26 @@ public class MarkerLayerTest extends GdxMapApp implements ItemizedLayer.OnItemGe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemSingleTapUp(int index, MarkerItem item) {
|
public boolean onItemSingleTapUp(int index, MarkerInterface item) {
|
||||||
if (item.getMarker() == null)
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
item.setMarker(mFocusMarker);
|
if (markerItem.getMarker() == null)
|
||||||
|
markerItem.setMarker(mFocusMarker);
|
||||||
else
|
else
|
||||||
item.setMarker(null);
|
markerItem.setMarker(null);
|
||||||
|
|
||||||
System.out.println("Marker tap " + item.getTitle());
|
System.out.println("Marker tap " + markerItem.getTitle());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemLongPress(int index, MarkerItem item) {
|
public boolean onItemLongPress(int index, MarkerInterface item) {
|
||||||
if (item.getMarker() == null)
|
MarkerItem markerItem = (MarkerItem) item;
|
||||||
item.setMarker(mFocusMarker);
|
if (markerItem.getMarker() == null)
|
||||||
|
markerItem.setMarker(mFocusMarker);
|
||||||
else
|
else
|
||||||
item.setMarker(null);
|
markerItem.setMarker(null);
|
||||||
|
|
||||||
System.out.println("Marker long press " + item.getTitle());
|
System.out.println("Marker long press " + markerItem.getTitle());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 devemux86
|
||||||
* Copyright 2019 Gustl22
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -30,9 +30,12 @@ import org.oscim.map.Viewport;
|
|||||||
import org.oscim.theme.VtmThemes;
|
import org.oscim.theme.VtmThemes;
|
||||||
import org.oscim.tiling.TileSource;
|
import org.oscim.tiling.TileSource;
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
import org.oscim.tiling.source.overpass.OverpassTileSource;
|
import org.oscim.tiling.source.overpass.OverpassTileSource;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use Overpass API data for vector layer.
|
* Use Overpass API data for vector layer.
|
||||||
* Only for developing as can be error-prone.
|
* Only for developing as can be error-prone.
|
||||||
@@ -51,7 +54,7 @@ public class OverpassTest extends GdxMapApp {
|
|||||||
.build();
|
.build();
|
||||||
VectorTileLayer l = map.setBaseMap(tileSource);
|
VectorTileLayer l = map.setBaseMap(tileSource);
|
||||||
|
|
||||||
TileSource bitmapTileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource bitmapTileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.zoomMax(15)
|
.zoomMax(15)
|
||||||
.fadeSteps(new BitmapTileLayer.FadeStep[]{
|
.fadeSteps(new BitmapTileLayer.FadeStep[]{
|
||||||
@@ -59,6 +62,7 @@ public class OverpassTest extends GdxMapApp {
|
|||||||
new BitmapTileLayer.FadeStep(16, Viewport.MAX_ZOOM_LEVEL, 0f, 0f)
|
new BitmapTileLayer.FadeStep(16, Viewport.MAX_ZOOM_LEVEL, 0f, 0f)
|
||||||
})
|
})
|
||||||
.build();
|
.build();
|
||||||
|
bitmapTileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, bitmapTileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, bitmapTileSource));
|
||||||
|
|
||||||
BuildingLayer.RAW_DATA = true;
|
BuildingLayer.RAW_DATA = true;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 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).
|
||||||
*
|
*
|
||||||
@@ -26,11 +26,12 @@ import org.oscim.gdx.GdxMapApp;
|
|||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.layers.vector.PathLayer;
|
import org.oscim.layers.vector.PathLayer;
|
||||||
import org.oscim.map.Map.UpdateListener;
|
import org.oscim.map.Map.UpdateListener;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PathLayerTest extends GdxMapApp {
|
public class PathLayerTest extends GdxMapApp {
|
||||||
@@ -41,9 +42,10 @@ public class PathLayerTest extends GdxMapApp {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
mMap.setMapPosition(0, 0, 1 << 2);
|
mMap.setMapPosition(0, 0, 1 << 2);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2020 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).
|
||||||
*
|
*
|
||||||
@@ -22,18 +22,21 @@ import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
|||||||
import org.oscim.layers.vector.VectorLayer;
|
import org.oscim.layers.vector.VectorLayer;
|
||||||
import org.oscim.layers.vector.geometries.PointDrawable;
|
import org.oscim.layers.vector.geometries.PointDrawable;
|
||||||
import org.oscim.layers.vector.geometries.Style;
|
import org.oscim.layers.vector.geometries.Style;
|
||||||
import org.oscim.tiling.TileSource;
|
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
|
import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources;
|
import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||||
import org.oscim.utils.ColorUtil;
|
import org.oscim.utils.ColorUtil;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
public class VectorLayerTest extends GdxMapApp {
|
public class VectorLayerTest extends GdxMapApp {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
TileSource tileSource = DefaultSources.OPENSTREETMAP
|
UrlTileSource tileSource = DefaultSources.OPENSTREETMAP
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
.build();
|
||||||
|
tileSource.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-playground"));
|
||||||
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
mMap.layers().add(new BitmapTileLayer(mMap, tileSource));
|
||||||
|
|
||||||
mMap.setMapPosition(0, 0, 1 << 2);
|
mMap.setMapPosition(0, 0, 1 << 2);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.test.jeo;
|
package org.oscim.test.jeo;
|
||||||
|
|
||||||
import org.jeo.map.Style;
|
import io.jeo.map.Style;
|
||||||
import org.jeo.vector.VectorDataset;
|
import io.jeo.vector.VectorDataset;
|
||||||
import org.oscim.backend.canvas.Color;
|
import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.JeoVectorLayer;
|
import org.oscim.layers.JeoVectorLayer;
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ import org.oscim.tiling.QueryResult;
|
|||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
public class MvtTileDecoderTest {
|
public class TileDecoderTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void tileDecodingTest() throws Exception {
|
public void tileDecodingTest() throws Exception {
|
||||||
MvtTileDecoder decoder = new MvtTileDecoder();
|
TileDecoder decoder = new TileDecoder();
|
||||||
Tile tile = new Tile(0, 0, (byte) 0);
|
Tile tile = new Tile(0, 0, (byte) 0);
|
||||||
ITileDataSink sink = new ITileDataSink() {
|
ITileDataSink sink = new ITileDataSink() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
|
|
||||||
/*
|
|
||||||
configurations.all {
|
|
||||||
// Check latest snapshot on every build
|
|
||||||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':vtm-desktop-lwjgl')
|
implementation project(':vtm-desktop-lwjgl')
|
||||||
file("${rootDir}/vtm-desktop/natives").eachDir() { dir ->
|
file("${rootDir}/vtm-desktop/natives").eachDir() { dir ->
|
||||||
@@ -17,11 +10,11 @@ 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:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-core:0.14.0'
|
||||||
implementation 'org.mapsforge:mapsforge-map:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-map:0.14.0'
|
||||||
implementation 'org.mapsforge:mapsforge-map-awt:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-map-awt:0.14.0'
|
||||||
implementation 'org.mapsforge:mapsforge-map-reader:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-map-reader:0.14.0'
|
||||||
implementation 'org.mapsforge:mapsforge-themes:master-SNAPSHOT'
|
implementation 'org.mapsforge:mapsforge-themes:0.14.0'
|
||||||
implementation 'net.sf.kxml:kxml2:2.3.0'
|
implementation 'net.sf.kxml:kxml2:2.3.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,40 +60,41 @@
|
|||||||
<style-area fade="10" fill="#e6e3e5" id="railway|industrial" />
|
<style-area fade="10" fill="#e6e3e5" id="railway|industrial" />
|
||||||
|
|
||||||
<!--Note: ordered according to their inheritance via the `use` attribute-->
|
<!--Note: ordered according to their inheritance via the `use` attribute-->
|
||||||
<style-area id="tex1" src="assets:textures/rough.png" />
|
|
||||||
|
<!-- Avoid patterns and textures because of old GPU issues -->
|
||||||
|
<!--<style-area id="tex1" src="assets:textures/rough.png" />-->
|
||||||
|
|
||||||
<!-- meadow|garden -->
|
<!-- meadow|garden -->
|
||||||
<style-area fade="10" fill="#c9dc91" id="greens" use="tex1" />
|
<style-area fade="10" fill="#c9dc91" id="greens" />
|
||||||
|
|
||||||
<!-- grass -->
|
<!-- grass -->
|
||||||
<style-area fade="12" fill="#d3dcb9" id="lightgreen" use="tex1" />
|
<style-area fade="12" fill="#d3dcb9" id="lightgreen" />
|
||||||
|
|
||||||
<!-- grassland|scrub -->
|
<!-- grassland|scrub -->
|
||||||
<style-area fade="10" fill="#c2cba5" id="darkgreen" use="tex1" />
|
<style-area fade="10" fill="#c2cba5" id="darkgreen" />
|
||||||
|
|
||||||
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
||||||
|
|
||||||
<!--farmland-->
|
<!--farmland-->
|
||||||
<style-area fade="12" fill="#e4dab5" id="farmland" stroke="#d1dbc7" stroke-width="1.0"
|
<style-area fade="12" fill="#e4dab5" id="farmland" />
|
||||||
use="tex1" />
|
|
||||||
|
|
||||||
<!-- marsh|wetland|mud|nature_reserve -->
|
<!-- marsh|wetland|mud|nature_reserve -->
|
||||||
<style-area fade="12" fill="#deecb9" id="greens2" />
|
<style-area fade="12" fill="#deecb9" id="greens2" />
|
||||||
|
|
||||||
<!-- park|common|green|cemetery|golf_course|dog_park -->
|
<!-- park|common|green|cemetery|golf_course|dog_park -->
|
||||||
<style-area fade="11" fill="#9ac56e" id="park" use="tex1" />
|
<style-area fade="11" fill="#9ac56e" id="park" />
|
||||||
<!-- <style-area id="park" fill="#a3ca7b" fade="11" /> -->
|
<!-- <style-area id="park" fill="#a3ca7b" fade="11" /> -->
|
||||||
|
|
||||||
<!--wood-->
|
<!--wood-->
|
||||||
<!-- fade out at z=7, blend over to 'blend-fill' in z=11 -->
|
<!-- fade out at z=7, blend over to 'blend-fill' in z=11 -->
|
||||||
<!-- src="assets:textures/wood.png" -->
|
<!-- src="assets:textures/wood.png" -->
|
||||||
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
||||||
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" stroke="#d1dbc7" stroke-width="1.0"/> -->
|
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" /> -->
|
||||||
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
||||||
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
||||||
|
|
||||||
<!-- de:Kleingartengebiet -->
|
<!-- de:Kleingartengebiet -->
|
||||||
<style-area fade="12" fill="#efeae0" id="allotments" use="tex1" />
|
<style-area fade="12" fill="#efeae0" id="allotments" />
|
||||||
|
|
||||||
<!-- de:Steinbruch, Schotter-, Kies-, Sand- und Tongrube -->
|
<!-- de:Steinbruch, Schotter-, Kies-, Sand- und Tongrube -->
|
||||||
<style-area fade="10" fill="#ddddcc" id="quarry" />
|
<style-area fade="10" fill="#ddddcc" id="quarry" />
|
||||||
@@ -101,12 +102,12 @@
|
|||||||
<!--military-->
|
<!--military-->
|
||||||
<style-area fade="10" fill="#eeedea" id="military" />
|
<style-area fade="10" fill="#eeedea" id="military" />
|
||||||
<!--building-->
|
<!--building-->
|
||||||
<style-area fade="15" fill="#f2f0eb" id="building" stroke="#b7b6b3" stroke-width="1.0" />
|
<style-area fade="15" fill="#f2f0eb" id="building" />
|
||||||
|
|
||||||
<!--water-->
|
<!--water-->
|
||||||
<!--<style-area id="water" fill="#97b7e5" afc5e3 /> -->
|
<!--<style-area id="water" fill="#97b7e5" afc5e3 /> -->
|
||||||
<!-- src="assets:textures/water.png" -->
|
<!-- src="assets:textures/water.png" -->
|
||||||
<style-area fade="-1" fill="#99badf" id="water" mesh="true" />
|
<style-area fade="-1" fill="#99badf" id="water" />
|
||||||
|
|
||||||
<!--###### LINE styles ######-->
|
<!--###### LINE styles ######-->
|
||||||
|
|
||||||
@@ -164,11 +165,16 @@
|
|||||||
<style-line cap="butt" fix="true" id="water" stroke="#a4bbcc" width="1.0" />
|
<style-line cap="butt" fix="true" id="water" stroke="#a4bbcc" width="1.0" />
|
||||||
<style-line fix="false" id="river" stroke="#a4bbcc" use="water" />
|
<style-line fix="false" id="river" stroke="#a4bbcc" use="water" />
|
||||||
|
|
||||||
|
<!--###### SYMBOL styles ######-->
|
||||||
|
|
||||||
|
<!-- oneway -->
|
||||||
|
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### ASSIGNMENT ######-->
|
<!--###### ASSIGNMENT ######-->
|
||||||
|
|
||||||
<m e="way" k="natural" v="issea|sea">
|
<m e="way" k="natural" v="issea|sea">
|
||||||
<area use="water" />
|
<area mesh="true" use="water" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m e="way" k="natural" v="nosea">
|
<m e="way" k="natural" v="nosea">
|
||||||
@@ -220,7 +226,7 @@
|
|||||||
<m k="landuse|natural|leisure|amenity|tourism">
|
<m k="landuse|natural|leisure|amenity|tourism">
|
||||||
<!-- kind of more like landuse imho -->
|
<!-- kind of more like landuse imho -->
|
||||||
<m k="leisure|landuse" v="nature_reserve">
|
<m k="leisure|landuse" v="nature_reserve">
|
||||||
<area use="greens2" />
|
<area fill="#40abe29c" />
|
||||||
<m zoom-min="14">
|
<m zoom-min="14">
|
||||||
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
@@ -248,10 +254,10 @@
|
|||||||
<area fill="#f2d9b1" />
|
<area fill="#f2d9b1" />
|
||||||
</m>
|
</m>
|
||||||
<!-- <m v="parking" zoom-min="15">
|
<!-- <m v="parking" zoom-min="15">
|
||||||
<area fill="#f4f4f4" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#f4f4f4" />
|
||||||
</m>
|
</m>
|
||||||
<m v="fountain" closed="yes">
|
<m v="fountain" closed="yes">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m> -->
|
</m> -->
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -281,16 +287,13 @@
|
|||||||
|
|
||||||
<!-- Heideland, keep below forest -->
|
<!-- Heideland, keep below forest -->
|
||||||
<m v="heath|sand" zoom-min="10">
|
<m v="heath|sand" zoom-min="10">
|
||||||
<area fade="10" fill="#fffad1" use="tex1" />
|
<area fade="10" fill="#fffad1" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="landuse|natural" v="forest|wood">
|
<m k="landuse|natural" v="forest|wood">
|
||||||
<m zoom-max="13" zoom-min="8">
|
<m zoom-min="8">
|
||||||
<area use="wood" />
|
<area use="wood" />
|
||||||
</m>
|
</m>
|
||||||
<m zoom-min="14">
|
|
||||||
<area stroke="#91bf63" stroke-width="1.0" use="wood" />
|
|
||||||
</m>
|
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- keep grass above forest:wood and leisure:park! -->
|
<!-- keep grass above forest:wood and leisure:park! -->
|
||||||
@@ -316,10 +319,10 @@
|
|||||||
</m>
|
</m>
|
||||||
-->
|
-->
|
||||||
<m v="parking" zoom-min="15">
|
<m v="parking" zoom-min="15">
|
||||||
<area fill="#f4f4f4" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#f4f4f4" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes" v="fountain">
|
<m closed="yes" v="fountain">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
</m>
|
</m>
|
||||||
@@ -357,7 +360,7 @@
|
|||||||
<area fade="12" fill="#daefdb" />
|
<area fade="12" fill="#daefdb" />
|
||||||
</m>
|
</m>
|
||||||
<m v="playground|miniature_golf" zoom-min="15">
|
<m v="playground|miniature_golf" zoom-min="15">
|
||||||
<area fill="#f4f4de" use="tex1" />
|
<area fill="#f4f4de" />
|
||||||
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="playing_fields|pitch">
|
<m v="playing_fields|pitch">
|
||||||
@@ -365,7 +368,7 @@
|
|||||||
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="swimming_pool">
|
<m v="swimming_pool">
|
||||||
<area fill="#d4ebfc" stroke="#6060ff" stroke-width="0.2" />
|
<area fill="#d4ebfc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m v="track"> <m k="area" v="yes|true">
|
<!-- <m v="track"> <m k="area" v="yes|true">
|
||||||
@@ -617,6 +620,7 @@
|
|||||||
<!-- Airport passenger building -->
|
<!-- Airport passenger building -->
|
||||||
<m v="terminal|hangar">
|
<m v="terminal|hangar">
|
||||||
<area use="building" />
|
<area use="building" />
|
||||||
|
<line use="building" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -631,6 +635,7 @@
|
|||||||
<m zoom-min="14">
|
<m zoom-min="14">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fade="14" use="building" />
|
<area fade="14" use="building" />
|
||||||
|
<line fade="14" use="building" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="no">
|
<m closed="no">
|
||||||
<line fade="14" use="building" />
|
<line fade="14" use="building" />
|
||||||
@@ -641,6 +646,7 @@
|
|||||||
<m zoom-min="16">
|
<m zoom-min="16">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fade="16" use="building" />
|
<area fade="16" use="building" />
|
||||||
|
<line fade="16" use="building" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="no">
|
<m closed="no">
|
||||||
<line fade="16" use="building" />
|
<line fade="16" use="building" />
|
||||||
@@ -963,7 +969,7 @@
|
|||||||
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#e4e4e4" stroke="#d0d0d0" stroke-width="1.05" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -982,7 +988,7 @@
|
|||||||
<m k="tunnel" v="~|false|no">
|
<m k="tunnel" v="~|false|no">
|
||||||
|
|
||||||
<m v="station">
|
<m v="station">
|
||||||
<area fill="#dbdbc9" stroke="#707070" stroke-width="0.3" />
|
<area fill="#dbdbc9" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- railway bridge casings -->
|
<!-- railway bridge casings -->
|
||||||
@@ -1030,16 +1036,9 @@
|
|||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- non-physical boundaries -->
|
<!-- non-physical boundaries -->
|
||||||
<!-- <m k="boundary"> <m k="boundary" v="national_park">
|
<m k="boundary" v="national_park">
|
||||||
<line stroke="#4ef94b" width="0.25" stroke-dasharray="15, 5, 5, 5"
|
<area fill="#40abe29c" />
|
||||||
/> -->
|
</m>
|
||||||
|
|
||||||
<!--
|
|
||||||
maybe use some alpha texture for this
|
|
||||||
<m k="boundary" v="national_park">
|
|
||||||
<area fill="#d7e6b0" />
|
|
||||||
</m>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--<m k="boundary" v="administrative"> -->
|
<!--<m k="boundary" v="administrative"> -->
|
||||||
<m k="admin_level">
|
<m k="admin_level">
|
||||||
@@ -1085,7 +1084,7 @@
|
|||||||
<m k="area" v="~|false|no">
|
<m k="area" v="~|false|no">
|
||||||
<m k="highway">
|
<m k="highway">
|
||||||
<m k="oneway" v="yes|true" zoom-min="16">
|
<m k="oneway" v="yes|true" zoom-min="16">
|
||||||
<lineSymbol src="assets:symbols/oneway.svg" />
|
<symbol use="oneway" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|||||||
@@ -43,19 +43,19 @@
|
|||||||
<!-- src="assets:textures/wood.png" -->
|
<!-- src="assets:textures/wood.png" -->
|
||||||
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
||||||
|
|
||||||
<style-area id="tex1" src="assets:textures/rough.png" />
|
<!-- Avoid patterns and textures because of old GPU issues -->
|
||||||
|
<!--<style-area id="tex1" src="assets:textures/rough.png" />-->
|
||||||
|
|
||||||
<!-- meadow|garden -->
|
<!-- meadow|garden -->
|
||||||
<style-area fade="10" fill="#c9dc91" id="greens" use="tex1" />
|
<style-area fade="10" fill="#c9dc91" id="greens" />
|
||||||
|
|
||||||
<!-- grass -->
|
<!-- grass -->
|
||||||
<style-area fade="12" fill="#d3dcb9" id="lightgreen" use="tex1" />
|
<style-area fade="12" fill="#d3dcb9" id="lightgreen" />
|
||||||
|
|
||||||
<!-- grassland|scrub -->
|
<!-- grassland|scrub -->
|
||||||
<style-area fade="10" fill="#c2cba5" id="darkgreen" use="tex1" />
|
<style-area fade="10" fill="#c2cba5" id="darkgreen" />
|
||||||
|
|
||||||
<style-area fade="12" fill="#e4dab5" id="farmland" stroke="#d1dbc7" stroke-width="1.0"
|
<style-area fade="12" fill="#e4dab5" id="farmland" />
|
||||||
use="tex1" />
|
|
||||||
|
|
||||||
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
||||||
|
|
||||||
@@ -63,8 +63,8 @@
|
|||||||
<style-area fade="12" fill="#deecb9" id="greens2" />
|
<style-area fade="12" fill="#deecb9" id="greens2" />
|
||||||
|
|
||||||
<!-- park|common|green|cemetery|golf_course|dog_park -->
|
<!-- park|common|green|cemetery|golf_course|dog_park -->
|
||||||
<style-area fade="11" fill="#9ac56e" id="park" use="tex1" />
|
<style-area fade="11" fill="#9ac56e" id="park" />
|
||||||
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" stroke="#d1dbc7" stroke-width="1.0"/> -->
|
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" /> -->
|
||||||
|
|
||||||
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
||||||
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<style-line cap="butt" fade="14" fix="true" id="park" stroke="#9ac56e" width="1.0" />
|
<style-line cap="butt" fade="14" fix="true" id="park" stroke="#9ac56e" width="1.0" />
|
||||||
|
|
||||||
<!-- de:Kleingartengebiet -->
|
<!-- de:Kleingartengebiet -->
|
||||||
<style-area fade="12" fill="#efeae0" id="allotments" use="tex1" />
|
<style-area fade="12" fill="#efeae0" id="allotments" />
|
||||||
|
|
||||||
<!-- de:Steinbruch, Schotter-, Kies-, Sand- und Tongrube -->
|
<!-- de:Steinbruch, Schotter-, Kies-, Sand- und Tongrube -->
|
||||||
<style-area fade="10" fill="#ddddcc" id="quarry" />
|
<style-area fade="10" fill="#ddddcc" id="quarry" />
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
|
|
||||||
<!--<style-area id="water" fill="#97b7e5" afc5e3 /> -->
|
<!--<style-area id="water" fill="#97b7e5" afc5e3 /> -->
|
||||||
<!-- src="assets:textures/water.png" -->
|
<!-- src="assets:textures/water.png" -->
|
||||||
<style-area fade="-1" fill="#99badf" id="water" use="tex1" />
|
<style-area fade="-1" fill="#99badf" id="water" />
|
||||||
|
|
||||||
<!-- no-go area boundary -->
|
<!-- no-go area boundary -->
|
||||||
<style-line cap="butt" fix="true" id="fence" stroke="#444444" width="1.2" />
|
<style-line cap="butt" fix="true" id="fence" stroke="#444444" width="1.2" />
|
||||||
@@ -127,7 +127,10 @@
|
|||||||
<style-area id="building" fill="#e9e6e3" fade="15"/> -->
|
<style-area id="building" fill="#e9e6e3" fade="15"/> -->
|
||||||
|
|
||||||
<style-line fade="15" id="building" stroke="#eeb7b6b3" use="fix" />
|
<style-line fade="15" id="building" stroke="#eeb7b6b3" use="fix" />
|
||||||
<style-area fade="15" fill="#f2f0eb" id="building" stroke="#b7b6b3" stroke-width="1.0" />
|
<style-area fade="15" fill="#f2f0eb" id="building" />
|
||||||
|
|
||||||
|
<!-- oneway -->
|
||||||
|
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
|
||||||
|
|
||||||
<m closed="yes" e="way" k="layer" v="water">
|
<m closed="yes" e="way" k="layer" v="water">
|
||||||
<area mesh="true" use="water" />
|
<area mesh="true" use="water" />
|
||||||
@@ -182,7 +185,7 @@
|
|||||||
<m k="kind">
|
<m k="kind">
|
||||||
<!-- kind of more like landuse imho -->
|
<!-- kind of more like landuse imho -->
|
||||||
<m v="nature_reserve">
|
<m v="nature_reserve">
|
||||||
<area use="greens2" />
|
<area fill="#40abe29c" />
|
||||||
<m zoom-min="14">
|
<m zoom-min="14">
|
||||||
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
@@ -208,10 +211,10 @@
|
|||||||
<area fill="#f2d9b1" />
|
<area fill="#f2d9b1" />
|
||||||
</m>
|
</m>
|
||||||
<!-- <m v="parking" zoom-min="15">
|
<!-- <m v="parking" zoom-min="15">
|
||||||
<area fill="#f4f4f4" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#f4f4f4" />
|
||||||
</m>
|
</m>
|
||||||
<m v="fountain" closed="yes">
|
<m v="fountain" closed="yes">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m> -->
|
</m> -->
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -241,16 +244,13 @@
|
|||||||
|
|
||||||
<!-- Heideland, keep below forest -->
|
<!-- Heideland, keep below forest -->
|
||||||
<m v="heath|sand" zoom-min="10">
|
<m v="heath|sand" zoom-min="10">
|
||||||
<area fade="10" fill="#fffad1" use="tex1" />
|
<area fade="10" fill="#fffad1" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m v="forest|wood">
|
<m v="forest|wood">
|
||||||
<m zoom-max="13" zoom-min="8">
|
<m zoom-min="8">
|
||||||
<area use="wood" />
|
<area use="wood" />
|
||||||
</m>
|
</m>
|
||||||
<m zoom-min="14">
|
|
||||||
<area stroke="#91bf63" stroke-width="1.0" use="wood" />
|
|
||||||
</m>
|
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- keep grass above forest:wood and leisure:park! -->
|
<!-- keep grass above forest:wood and leisure:park! -->
|
||||||
@@ -275,13 +275,13 @@
|
|||||||
</m>
|
</m>
|
||||||
-->
|
-->
|
||||||
<m v="parking" zoom-min="15">
|
<m v="parking" zoom-min="15">
|
||||||
<area fill="#f4f4f4" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#f4f4f4" />
|
||||||
<m zoom-min="17">
|
<m zoom-min="17">
|
||||||
<symbol src="assets:symbols/transport/parking.svg" />
|
<symbol src="assets:symbols/transport/parking.svg" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes" v="fountain">
|
<m closed="yes" v="fountain">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
|
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
<area fade="12" fill="#daefdb" />
|
<area fade="12" fill="#daefdb" />
|
||||||
</m>
|
</m>
|
||||||
<m v="playground|miniature_golf" zoom-min="15">
|
<m v="playground|miniature_golf" zoom-min="15">
|
||||||
<area fill="#f4f4de" use="tex1" />
|
<area fill="#f4f4de" />
|
||||||
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="playing_fields|pitch">
|
<m v="playing_fields|pitch">
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="swimming_pool">
|
<m v="swimming_pool">
|
||||||
<area fill="#d4ebfc" stroke="#6060ff" stroke-width="0.2" />
|
<area fill="#d4ebfc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m v="track"> <m k="area" v="yes|true">
|
<!-- <m v="track"> <m k="area" v="yes|true">
|
||||||
@@ -580,6 +580,7 @@
|
|||||||
<!-- Airport passenger building -->
|
<!-- Airport passenger building -->
|
||||||
<m v="terminal|hangar">
|
<m v="terminal|hangar">
|
||||||
<area use="building" />
|
<area use="building" />
|
||||||
|
<line use="building" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -594,6 +595,7 @@
|
|||||||
<m zoom-min="14">
|
<m zoom-min="14">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fade="14" use="building" />
|
<area fade="14" use="building" />
|
||||||
|
<line fade="14" use="building" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="no">
|
<m closed="no">
|
||||||
<line fade="14" use="building" />
|
<line fade="14" use="building" />
|
||||||
@@ -604,6 +606,7 @@
|
|||||||
<m zoom-min="16">
|
<m zoom-min="16">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fade="16" use="building" />
|
<area fade="16" use="building" />
|
||||||
|
<line fade="16" use="building" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="no">
|
<m closed="no">
|
||||||
<line fade="16" use="building" />
|
<line fade="16" use="building" />
|
||||||
@@ -923,7 +926,7 @@
|
|||||||
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#e4e4e4" stroke="#d0d0d0" stroke-width="1.05" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -942,7 +945,7 @@
|
|||||||
<m k="is_tunnel" v="~|false|no">
|
<m k="is_tunnel" v="~|false|no">
|
||||||
|
|
||||||
<m v="station">
|
<m v="station">
|
||||||
<area fill="#dbdbc9" stroke="#707070" stroke-width="0.3" />
|
<area fill="#dbdbc9" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- railway bridge casings -->
|
<!-- railway bridge casings -->
|
||||||
@@ -990,16 +993,9 @@
|
|||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- non-physical boundaries -->
|
<!-- non-physical boundaries -->
|
||||||
<!-- <m k="boundary"> <m k="boundary" v="national_park">
|
<m k="boundary" v="national_park">
|
||||||
<line stroke="#4ef94b" width="0.25" stroke-dasharray="15, 5, 5, 5"
|
<area fill="#40abe29c" />
|
||||||
/> -->
|
</m>
|
||||||
|
|
||||||
<!--
|
|
||||||
maybe use some alpha texture for this
|
|
||||||
<m k="boundary" v="national_park">
|
|
||||||
<area fill="#d7e6b0" />
|
|
||||||
</m>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--<m k="boundary" v="administrative"> -->
|
<!--<m k="boundary" v="administrative"> -->
|
||||||
<m k="kind_detail">
|
<m k="kind_detail">
|
||||||
@@ -1045,7 +1041,7 @@
|
|||||||
<m k="area" v="~|false|no">
|
<m k="area" v="~|false|no">
|
||||||
<m k="kind_detail">
|
<m k="kind_detail">
|
||||||
<m k="oneway" v="yes|true" zoom-min="16">
|
<m k="oneway" v="yes|true" zoom-min="16">
|
||||||
<lineSymbol src="assets:symbols/oneway.svg" />
|
<symbol use="oneway" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
<style-area fade="15" fill="#ee404040" id="building" />
|
<style-area fade="15" fill="#ee404040" id="building" />
|
||||||
|
|
||||||
<!--water-->
|
<!--water-->
|
||||||
<style-area fill="#001223" id="water" mesh="true" />
|
<style-area fill="#001223" id="water" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### LINE styles ######-->
|
<!--###### LINE styles ######-->
|
||||||
@@ -118,11 +118,16 @@
|
|||||||
<style-line cap="butt" id="water:outline" stroke="#647b8c" width="1.0" />
|
<style-line cap="butt" id="water:outline" stroke="#647b8c" width="1.0" />
|
||||||
<style-line cap="butt" id="water" stroke="#cca4bbcc" width="0.6" />
|
<style-line cap="butt" id="water" stroke="#cca4bbcc" width="0.6" />
|
||||||
|
|
||||||
|
<!--###### SYMBOL styles ######-->
|
||||||
|
|
||||||
|
<!-- oneway -->
|
||||||
|
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### ASSIGNMENT ######-->
|
<!--###### ASSIGNMENT ######-->
|
||||||
|
|
||||||
<m e="way" k="natural" v="issea|sea">
|
<m e="way" k="natural" v="issea|sea">
|
||||||
<area use="water" />
|
<area mesh="true" use="water" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m e="way" k="natural" v="nosea">
|
<m e="way" k="natural" v="nosea">
|
||||||
@@ -168,7 +173,7 @@
|
|||||||
<m k="landuse|natural|leisure||amenity">
|
<m k="landuse|natural|leisure||amenity">
|
||||||
<!-- kind of more like landuse imho -->
|
<!-- kind of more like landuse imho -->
|
||||||
<m k="leisure|landuse" v="nature_reserve">
|
<m k="leisure|landuse" v="nature_reserve">
|
||||||
<area use="greens2" />
|
<area fill="#40abe29c" />
|
||||||
<m zoom-min="14">
|
<m zoom-min="14">
|
||||||
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
@@ -229,17 +234,17 @@
|
|||||||
<!-- amenity -->
|
<!-- amenity -->
|
||||||
<m k="amenity">
|
<m k="amenity">
|
||||||
<m v="kindergarten|school|college|university" zoom-min="14">
|
<m v="kindergarten|school|college|university" zoom-min="14">
|
||||||
<area fill="#323439" stroke="#b094bf" stroke-width="2.0" />
|
<area fill="#323439" />
|
||||||
</m>
|
</m>
|
||||||
<m v="hospital">
|
<m v="hospital">
|
||||||
<area fill="#716553" />
|
<area fill="#716553" />
|
||||||
</m>
|
</m>
|
||||||
<m v="parking" zoom-min="14">
|
<m v="parking" zoom-min="14">
|
||||||
<area fill="#444434" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#444434" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m closed="yes" v="fountain">
|
<m closed="yes" v="fountain">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -292,7 +297,7 @@
|
|||||||
</m>
|
</m>
|
||||||
-->
|
-->
|
||||||
<m v="swimming_pool">
|
<m v="swimming_pool">
|
||||||
<area fill="#b4cbdc" stroke="#6060ff" stroke-width="0.2" />
|
<area fill="#b4cbdc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m v="track"> <m k="area" v="yes|true">
|
<!-- <m v="track"> <m k="area" v="yes|true">
|
||||||
@@ -932,7 +937,7 @@
|
|||||||
<line stroke="#e4e4e4" width="0.3" cap="butt" />
|
<line stroke="#e4e4e4" width="0.3" cap="butt" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#e4e4e4" stroke="#d0d0d0" stroke-width="0.05" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
</m> -->
|
</m> -->
|
||||||
|
|
||||||
@@ -1021,9 +1026,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- non-physical boundaries -->
|
<!-- non-physical boundaries -->
|
||||||
<!-- <m k="boundary"> <m k="boundary" v="national_park">
|
<m k="boundary" v="national_park">
|
||||||
<line stroke="#4ef94b" width="0.25" stroke-dasharray="15, 5, 5, 5"
|
<area fill="#40abe29c" />
|
||||||
/> -->
|
</m>
|
||||||
|
|
||||||
<!--<m k="boundary" v="administrative"> -->
|
<!--<m k="boundary" v="administrative"> -->
|
||||||
<m k="admin_level">
|
<m k="admin_level">
|
||||||
@@ -1080,7 +1085,7 @@
|
|||||||
<m k="area" v="~|false|no">
|
<m k="area" v="~|false|no">
|
||||||
<m k="highway">
|
<m k="highway">
|
||||||
<m k="oneway" v="yes|true" zoom-min="16">
|
<m k="oneway" v="yes|true" zoom-min="16">
|
||||||
<lineSymbol src="assets:symbols/oneway.svg" />
|
<symbol use="oneway" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|||||||
@@ -59,20 +59,21 @@
|
|||||||
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
||||||
|
|
||||||
<!--Note: ordered according to their inheritance via the `use` attribute-->
|
<!--Note: ordered according to their inheritance via the `use` attribute-->
|
||||||
<style-area id="tex1" src="assets:textures/rough.png" />
|
|
||||||
|
<!-- Avoid patterns and textures because of old GPU issues -->
|
||||||
|
<!--<style-area id="tex1" src="assets:textures/rough.png" />-->
|
||||||
|
|
||||||
<!-- meadow|garden -->
|
<!-- meadow|garden -->
|
||||||
<style-area fade="10" fill="#c9dc91" id="greens" use="tex1" />
|
<style-area fade="10" fill="#c9dc91" id="greens" />
|
||||||
|
|
||||||
<!-- grass -->
|
<!-- grass -->
|
||||||
<style-area fade="12" fill="#d3dcb9" id="lightgreen" use="tex1" />
|
<style-area fade="12" fill="#d3dcb9" id="lightgreen" />
|
||||||
|
|
||||||
<!-- grassland|scrub -->
|
<!-- grassland|scrub -->
|
||||||
<style-area fade="10" fill="#c2cba5" id="darkgreen" use="tex1" />
|
<style-area fade="10" fill="#c2cba5" id="darkgreen" />
|
||||||
|
|
||||||
<!--farmland-->
|
<!--farmland-->
|
||||||
<style-area fade="12" fill="#e4dab5" id="farmland" stroke="#d1dbc7" stroke-width="1.0"
|
<style-area fade="12" fill="#e4dab5" id="farmland" />
|
||||||
use="tex1" />
|
|
||||||
|
|
||||||
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
||||||
|
|
||||||
@@ -80,15 +81,15 @@
|
|||||||
<style-area fade="12" fill="#deecb9" id="greens2" />
|
<style-area fade="12" fill="#deecb9" id="greens2" />
|
||||||
|
|
||||||
<!-- park|common|green|cemetery|golf_course|dog_park -->
|
<!-- park|common|green|cemetery|golf_course|dog_park -->
|
||||||
<style-area fade="11" fill="#9ac56e" id="park" use="tex1" />
|
<style-area fade="11" fill="#9ac56e" id="park" />
|
||||||
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" stroke="#d1dbc7" stroke-width="1.0"/> -->
|
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" /> -->
|
||||||
|
|
||||||
<!--wood-->
|
<!--wood-->
|
||||||
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
||||||
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
||||||
|
|
||||||
<!-- de:Kleingartengebiet -->
|
<!-- de:Kleingartengebiet -->
|
||||||
<style-area fade="12" fill="#efeae0" id="allotments" use="tex1" />
|
<style-area fade="12" fill="#efeae0" id="allotments" />
|
||||||
|
|
||||||
<!-- de:Steinbruch, Schotter-, Kies-, Sand- und Tongrube -->
|
<!-- de:Steinbruch, Schotter-, Kies-, Sand- und Tongrube -->
|
||||||
<style-area fade="10" fill="#ddddcc" id="quarry" />
|
<style-area fade="10" fill="#ddddcc" id="quarry" />
|
||||||
@@ -96,13 +97,13 @@
|
|||||||
<!--military-->
|
<!--military-->
|
||||||
<style-area fade="10" fill="#eeedea" id="military" />
|
<style-area fade="10" fill="#eeedea" id="military" />
|
||||||
<!--building-->
|
<!--building-->
|
||||||
<style-area fade="15" fill="#f2f0eb" id="building" stroke="#b7b6b3" stroke-width="1.0" />
|
<style-area fade="15" fill="#f2f0eb" id="building" />
|
||||||
<!--<style-area id="building" fill="#e9e6e3" fade="15"/>-->
|
<!--<style-area id="building" fill="#e9e6e3" fade="15"/>-->
|
||||||
|
|
||||||
<!--water-->
|
<!--water-->
|
||||||
<!--<style-area id="water" fill="#97b7e5" afc5e3 /> -->
|
<!--<style-area id="water" fill="#97b7e5" afc5e3 /> -->
|
||||||
<!-- src="assets:textures/water.png" -->
|
<!-- src="assets:textures/water.png" -->
|
||||||
<style-area fade="-1" fill="#99badf" id="water" mesh="true" />
|
<style-area fade="-1" fill="#99badf" id="water" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### LINE styles ######-->
|
<!--###### LINE styles ######-->
|
||||||
@@ -161,6 +162,11 @@
|
|||||||
<!-- <style-line id="building" stroke="#d0cec8" width="1.0" fix="true" cap="butt" fade="15"/> -->
|
<!-- <style-line id="building" stroke="#d0cec8" width="1.0" fix="true" cap="butt" fade="15"/> -->
|
||||||
<style-line fade="15" id="building" stroke="#eeb7b6b3" use="fix" />
|
<style-line fade="15" id="building" stroke="#eeb7b6b3" use="fix" />
|
||||||
|
|
||||||
|
<!--###### SYMBOL styles ######-->
|
||||||
|
|
||||||
|
<!-- oneway -->
|
||||||
|
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### ASSIGNMENT ######-->
|
<!--###### ASSIGNMENT ######-->
|
||||||
|
|
||||||
@@ -241,7 +247,7 @@
|
|||||||
<m k="layer" v="park">
|
<m k="layer" v="park">
|
||||||
<m k="class">
|
<m k="class">
|
||||||
<m v="national_park|nature_reserve">
|
<m v="national_park|nature_reserve">
|
||||||
<area use="greens2" />
|
<area fill="#40abe29c" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -328,7 +334,12 @@
|
|||||||
<line outline="motorway" use="highway:z11" />
|
<line outline="motorway" use="highway:z11" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<!--</m>-->
|
|
||||||
|
<m k="oneway" v="1" zoom-min="16">
|
||||||
|
<m k="class" v="motorway|trunk|primary|secondary|tertiary|minor">
|
||||||
|
<symbol use="oneway" />
|
||||||
|
</m>
|
||||||
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="layer" v="transportation_name">
|
<m k="layer" v="transportation_name">
|
||||||
@@ -351,7 +362,7 @@
|
|||||||
<m k="layer" v="water">
|
<m k="layer" v="water">
|
||||||
<m k="class">
|
<m k="class">
|
||||||
<m v="ocean|lake|river">
|
<m v="ocean|lake|river">
|
||||||
<area use="water" />
|
<area mesh="true" use="water" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -384,6 +395,7 @@
|
|||||||
<m zoom-min="14">
|
<m zoom-min="14">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fade="14" use="building" />
|
<area fade="14" use="building" />
|
||||||
|
<line fade="14" use="building" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="no">
|
<m closed="no">
|
||||||
<line fade="14" use="building" />
|
<line fade="14" use="building" />
|
||||||
@@ -394,6 +406,7 @@
|
|||||||
<m zoom-min="16">
|
<m zoom-min="16">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fade="16" use="building" />
|
<area fade="16" use="building" />
|
||||||
|
<line fade="16" use="building" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="no">
|
<m closed="no">
|
||||||
<line fade="16" use="building" />
|
<line fade="16" use="building" />
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<!--###### AREA styles ######-->
|
<!--###### AREA styles ######-->
|
||||||
|
|
||||||
<!--water-->
|
<!--water-->
|
||||||
<style-area fill="#d0d0d0" id="water" mesh="true" />
|
<style-area fill="#d0d0d0" id="water" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### LINE styles ######-->
|
<!--###### LINE styles ######-->
|
||||||
@@ -52,11 +52,16 @@
|
|||||||
<style-line id="secondary" stroke="#c6c6c6" width="1.4" />
|
<style-line id="secondary" stroke="#c6c6c6" width="1.4" />
|
||||||
<style-line id="tertiary" stroke="#f7f7f7" width="1.15" />
|
<style-line id="tertiary" stroke="#f7f7f7" width="1.15" />
|
||||||
|
|
||||||
|
<!--###### SYMBOL styles ######-->
|
||||||
|
|
||||||
|
<!-- oneway -->
|
||||||
|
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### ASSIGNMENT ######-->
|
<!--###### ASSIGNMENT ######-->
|
||||||
|
|
||||||
<m e="way" k="natural" v="issea|sea">
|
<m e="way" k="natural" v="issea|sea">
|
||||||
<area use="water" />
|
<area mesh="true" use="water" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m e="way" k="natural" v="nosea">
|
<m e="way" k="natural" v="nosea">
|
||||||
@@ -69,38 +74,38 @@
|
|||||||
<m k="landuse">
|
<m k="landuse">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m v="military">
|
<m v="military">
|
||||||
<area src="assets:patterns/military.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#40ededed" />
|
||||||
</m>
|
</m>
|
||||||
<m v="residential|farmyard">
|
<m v="residential|farmyard">
|
||||||
<area fill="#e4e4e4" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
<m v="retail">
|
<m v="retail">
|
||||||
<area fill="#efefef" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#efefef" />
|
||||||
</m>
|
</m>
|
||||||
<m v="industrial|brownfield|railway">
|
<m v="industrial|brownfield|railway">
|
||||||
<area fill="#dedede" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#dedede" />
|
||||||
</m>
|
</m>
|
||||||
<m v="commercial">
|
<m v="commercial">
|
||||||
<area fill="#fafafa" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#fafafa" />
|
||||||
</m>
|
</m>
|
||||||
<m v="construction|greenfield">
|
<m v="construction|greenfield">
|
||||||
<area fill="#808080" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#808080" />
|
||||||
</m>
|
</m>
|
||||||
<m v="garages">
|
<m v="garages">
|
||||||
<area fill="#d6d6d6" />
|
<area fill="#d6d6d6" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m v="landfill|quarry">
|
<m v="landfill|quarry">
|
||||||
<area fill="#d8d8d8" stroke="#626262" stroke-width="0.2" />
|
<area fill="#d8d8d8" />
|
||||||
</m>
|
</m>
|
||||||
<m v="cemetery">
|
<m v="cemetery">
|
||||||
<area src="assets:patterns/cemetery.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#e2e2e2" />
|
||||||
</m>
|
</m>
|
||||||
<m v="field|farm|farmland|meadow|grass">
|
<m v="field|farm|farmland|meadow|grass">
|
||||||
<area fill="#f9f9f9" stroke="#cecece" stroke-width="0.1" />
|
<area fill="#f9f9f9" />
|
||||||
</m>
|
</m>
|
||||||
<m v="allotments|village_green|recreation_ground">
|
<m v="allotments|village_green|recreation_ground">
|
||||||
<area fill="#d9d9d9" stroke="#a6a6a6" stroke-width="0.2" />
|
<area fill="#d9d9d9" />
|
||||||
</m>
|
</m>
|
||||||
<m v="reservoir|basin">
|
<m v="reservoir|basin">
|
||||||
<area fill="#d0d0d0" />
|
<area fill="#d0d0d0" />
|
||||||
@@ -113,24 +118,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<m k="natural" v="grassland|scrub">
|
<m k="natural" v="grassland|scrub">
|
||||||
<area fill="#acacac" stroke="#acacac" stroke-width="0.2" />
|
<area fill="#acacac" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="natural|landuse" v="forest|wood">
|
<m k="natural|landuse" v="forest|wood">
|
||||||
<m k="wood">
|
<area fill="#acacac" />
|
||||||
<m k="wood" v="coniferous">
|
|
||||||
<area src="assets:patterns/wood-coniferous.png" />
|
|
||||||
</m>
|
|
||||||
<m k="wood" v="deciduous">
|
|
||||||
<area src="assets:patterns/wood-deciduous.png" />
|
|
||||||
</m>
|
|
||||||
<m k="wood" v="mixed">
|
|
||||||
<area src="assets:patterns/wood-mixed.png" />
|
|
||||||
</m>
|
|
||||||
</m>
|
|
||||||
<m k="wood" v="~">
|
|
||||||
<area fill="#acacac" stroke="#acacac" stroke-width="0.2" />
|
|
||||||
</m>
|
|
||||||
|
|
||||||
<m zoom-min="16">
|
<m zoom-min="16">
|
||||||
<text use="caption-small-blue" />
|
<text use="caption-small-blue" />
|
||||||
@@ -142,19 +134,19 @@
|
|||||||
<m k="amenity">
|
<m k="amenity">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m v="kindergarten|school|college|university">
|
<m v="kindergarten|school|college|university">
|
||||||
<area fill="#b5b5b5" stroke="#d8d8d8" stroke-width="0.2" />
|
<area fill="#b5b5b5" />
|
||||||
</m>
|
</m>
|
||||||
<m v="grave_yard">
|
<m v="grave_yard">
|
||||||
<area src="assets:patterns/cemetery.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#e2e2e2" />
|
||||||
</m>
|
</m>
|
||||||
<m v="parking">
|
<m v="parking">
|
||||||
<area fill="#fafafa" stroke="#d8d8d8" stroke-width="0.2" />
|
<area fill="#fafafa" />
|
||||||
<m k="access" v="private" zoom-min="15">
|
<m k="access" v="private" zoom-min="15">
|
||||||
<area src="assets:patterns/access-private.png" />
|
<area fill="#40363636" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes" v="fountain">
|
<m closed="yes" v="fountain">
|
||||||
<area fill="#d0d0d0" stroke="#080808" stroke-width="0.15" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -168,23 +160,23 @@
|
|||||||
<line stroke="#708599" fix="true" cap="butt" width="2.0" />
|
<line stroke="#708599" fix="true" cap="butt" width="2.0" />
|
||||||
</m> –>
|
</m> –>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#d0d0d0" stroke="#d0d0d0" stroke-width="0.4" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
</m>-->
|
</m>-->
|
||||||
<m v="glacier">
|
<m v="glacier">
|
||||||
<area fill="#fafafa" stroke="#cfcfcf" stroke-width="0.8" />
|
<area fill="#fafafa" />
|
||||||
</m>
|
</m>
|
||||||
<m v="land">
|
<m v="land">
|
||||||
<area fill="#f8f8f8" stroke="#e0e0e0" stroke-width="0.1" />
|
<area fill="#f8f8f8" />
|
||||||
</m>
|
</m>
|
||||||
<m v="beach">
|
<m v="beach">
|
||||||
<area fill="#cacaca" />
|
<area fill="#cacaca" />
|
||||||
</m>
|
</m>
|
||||||
<m v="heath">
|
<m v="heath">
|
||||||
<area fill="#fafafa" stroke="#f7f7f7" stroke-width="0.2" />
|
<area fill="#fafafa" />
|
||||||
</m>
|
</m>
|
||||||
<m v="marsh|wetland">
|
<m v="marsh|wetland">
|
||||||
<area src="assets:patterns/marsh.png" />
|
<area fill="#e5e5e5" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m k="name" zoom-min="16">
|
<m k="name" zoom-min="16">
|
||||||
@@ -197,25 +189,24 @@
|
|||||||
<m k="leisure">
|
<m k="leisure">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m v="park|garden|golf_course|common|green">
|
<m v="park|garden|golf_course|common|green">
|
||||||
<area fill="#e2e2e2" stroke="#acacac" stroke-width="0.2" />
|
<area fill="#e2e2e2" />
|
||||||
</m>
|
</m>
|
||||||
<m v="playground|playing_fields|pitch|dog_park">
|
<m v="playground|playing_fields|pitch|dog_park">
|
||||||
<area fill="#e2e2e2" stroke="#acacac" stroke-width="0.2" />
|
<area fill="#e2e2e2" />
|
||||||
<m v="playground" zoom-min="17">
|
<m v="playground" zoom-min="17">
|
||||||
<symbol src="assets:symbols/amenity/playground.svg" />
|
<symbol src="assets:symbols/amenity/playground.svg" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m v="nature_reserve">
|
<m v="nature_reserve">
|
||||||
<area src="assets:patterns/nature-reserve.png" stroke="#acacac"
|
<area fill="#40d1d1d1" />
|
||||||
stroke-width="0.2" />
|
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m v="stadium|sports_centre|water_park">
|
<m v="stadium|sports_centre|water_park">
|
||||||
<area fill="#d9d9d9" stroke="#acacac" stroke-width="0.2" />
|
<area fill="#d9d9d9" />
|
||||||
</m>
|
</m>
|
||||||
<m v="track">
|
<m v="track">
|
||||||
<m k="area" v="yes|true">
|
<m k="area" v="yes|true">
|
||||||
<area fill="#d9d9d9" stroke="#acacac" stroke-width="0.025" />
|
<area fill="#d9d9d9" />
|
||||||
</m>
|
</m>
|
||||||
<m k="area" v="~|no|false">
|
<m k="area" v="~|no|false">
|
||||||
<line stroke="#acacac" width="0.75" />
|
<line stroke="#acacac" width="0.75" />
|
||||||
@@ -223,7 +214,7 @@
|
|||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m v="swimming_pool">
|
<m v="swimming_pool">
|
||||||
<area fill="#d0d0d0" stroke="#6b6b6b" stroke-width="0.2" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m k="name" zoom-min="16">
|
<m k="name" zoom-min="16">
|
||||||
@@ -281,7 +272,7 @@
|
|||||||
|
|
||||||
<!-- military -->
|
<!-- military -->
|
||||||
<m k="military">
|
<m k="military">
|
||||||
<area src="assets:patterns/military.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#40ededed" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
|
|
||||||
@@ -291,10 +282,10 @@
|
|||||||
<symbol src="assets:symbols/sport/soccer.svg" />
|
<symbol src="assets:symbols/sport/soccer.svg" />
|
||||||
</m>
|
</m>
|
||||||
<m v="swimming|canoe|diving|scuba_diving">
|
<m v="swimming|canoe|diving|scuba_diving">
|
||||||
<area fill="#d0d0d0" stroke="#6b6b6b" stroke-width="0.2" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="tennis">
|
<m v="tennis">
|
||||||
<area fill="#969696" stroke="#787878" stroke-width="0.2" />
|
<area fill="#969696" />
|
||||||
<m zoom-min="17">
|
<m zoom-min="17">
|
||||||
<symbol src="assets:symbols/sport/tennis.svg" />
|
<symbol src="assets:symbols/sport/tennis.svg" />
|
||||||
</m>
|
</m>
|
||||||
@@ -308,7 +299,7 @@
|
|||||||
<area fill="#d4d4d4" />
|
<area fill="#d4d4d4" />
|
||||||
</m>
|
</m>
|
||||||
<m v="zoo|picnic_site|caravan_site|camp_site">
|
<m v="zoo|picnic_site|caravan_site|camp_site">
|
||||||
<area fill="#e2e2e2" stroke="#acacac" stroke-width="0.2" />
|
<area fill="#e2e2e2" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -393,28 +384,28 @@
|
|||||||
<m k="area" v="yes|true">
|
<m k="area" v="yes|true">
|
||||||
<m k="highway">
|
<m k="highway">
|
||||||
<m v="footway|footpath">
|
<m v="footway|footpath">
|
||||||
<area fill="#dedede" stroke="#707070" stroke-width="1.15" />
|
<area fill="#dedede" />
|
||||||
</m>
|
</m>
|
||||||
<m v="pedestrian">
|
<m v="pedestrian">
|
||||||
<area fill="#dedede" stroke="#707070" stroke-width="1.15" />
|
<area fill="#dedede" />
|
||||||
</m>
|
</m>
|
||||||
<m v="path">
|
<m v="path">
|
||||||
<area fill="#d0d0d0" stroke="#d0d0d0" stroke-width="1.15" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="service">
|
<m v="service">
|
||||||
<area fill="#ffffff" stroke="#707070" stroke-width="1.15" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="unclassified">
|
<m v="unclassified">
|
||||||
<area fill="#ffffff" stroke="#707070" stroke-width="1.3" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="residential">
|
<m v="residential">
|
||||||
<area fill="#ffffff" stroke="#707070" stroke-width="1.15" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="road">
|
<m v="road">
|
||||||
<area fill="#d0d0d0" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="living_street">
|
<m v="living_street">
|
||||||
<area fill="#ffffff" stroke="#ffffff" stroke-width="1.15" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -435,7 +426,7 @@
|
|||||||
<m k="aeroway">
|
<m k="aeroway">
|
||||||
<m closed="yes" v="aerodrome">
|
<m closed="yes" v="aerodrome">
|
||||||
<m zoom-min="12">
|
<m zoom-min="12">
|
||||||
<area fill="#dadada" stroke="#aeaeae" stroke-width="0.8" />
|
<area fill="#dadada" />
|
||||||
</m>
|
</m>
|
||||||
<m zoom-max="11">
|
<m zoom-max="11">
|
||||||
<caption dy="18" fill="#000000" k="ref" priority="5" size="19" stroke="#ffffff"
|
<caption dy="18" fill="#000000" k="ref" priority="5" size="19" stroke="#ffffff"
|
||||||
@@ -450,7 +441,8 @@
|
|||||||
<area fill="#f0f0f0" />
|
<area fill="#f0f0f0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="terminal">
|
<m v="terminal">
|
||||||
<area fill="#d9d9d9" stroke="#616161" stroke-width="0.2" />
|
<area fill="#d9d9d9" />
|
||||||
|
<line cap="butt" fix="true" stroke="#616161" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m v="runway">
|
<!-- <m v="runway">
|
||||||
@@ -553,9 +545,10 @@
|
|||||||
<m k="building|building:part">
|
<m k="building|building:part">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#d9d9d9" stroke="#616161" stroke-width="1.0" />
|
<area fill="#d9d9d9" />
|
||||||
|
<line cap="butt" fix="true" stroke="#616161" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
<m zoom-max="16">
|
<m closed="no">
|
||||||
<line cap="butt" fix="true" stroke="#616161" width="1.0" />
|
<line cap="butt" fix="true" stroke="#616161" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -781,18 +774,6 @@
|
|||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m zoom-min="16">
|
|
||||||
|
|
||||||
<line width="1.0" stroke="#ff0000" />
|
|
||||||
|
|
||||||
<m k="access" v="destination">
|
|
||||||
<line src="assets:patterns/access-destination.png" width="1.5" />
|
|
||||||
</m>
|
|
||||||
<m k="access" v="private">
|
|
||||||
<line src="assets:patterns/access-private.png" width="1.5" />
|
|
||||||
</m>
|
|
||||||
</m> -->
|
|
||||||
|
|
||||||
<!-- add outline for all matches -->
|
<!-- add outline for all matches -->
|
||||||
<m select="when-matched">
|
<m select="when-matched">
|
||||||
<outline use="casing" />
|
<outline use="casing" />
|
||||||
@@ -952,7 +933,7 @@
|
|||||||
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#e4e4e4" stroke="#d0d0d0" stroke-width="0.05" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -983,7 +964,7 @@
|
|||||||
<m k="area" v="~|false|no">
|
<m k="area" v="~|false|no">
|
||||||
<m k="highway">
|
<m k="highway">
|
||||||
<m k="oneway" v="yes|true" zoom-min="16">
|
<m k="oneway" v="yes|true" zoom-min="16">
|
||||||
<lineSymbol src="assets:symbols/oneway.svg" />
|
<symbol use="oneway" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -1013,7 +994,7 @@
|
|||||||
<m k="tunnel" v="~|false|no">
|
<m k="tunnel" v="~|false|no">
|
||||||
|
|
||||||
<m v="station">
|
<m v="station">
|
||||||
<area fill="#909090" stroke="#707070" stroke-width="0.3" />
|
<area fill="#909090" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="bridge" v="yes|true">
|
<m k="bridge" v="yes|true">
|
||||||
@@ -1061,7 +1042,7 @@
|
|||||||
|
|
||||||
<m k="boundary">
|
<m k="boundary">
|
||||||
<m k="boundary" v="national_park">
|
<m k="boundary" v="national_park">
|
||||||
<line dasharray="15, 5, 5, 5" fix="true" stroke="#c8c8c8" width="1.25" />
|
<area fill="#40d1d1d1" />
|
||||||
</m>
|
</m>
|
||||||
<m k="boundary" v="administrative">
|
<m k="boundary" v="administrative">
|
||||||
<m k="admin_level">
|
<m k="admin_level">
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<!--###### AREA styles ######-->
|
<!--###### AREA styles ######-->
|
||||||
|
|
||||||
<!--water-->
|
<!--water-->
|
||||||
<style-area fill="#b5d6f1" id="water" mesh="true" />
|
<style-area fill="#b5d6f1" id="water" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### LINE styles ######-->
|
<!--###### LINE styles ######-->
|
||||||
@@ -52,11 +52,16 @@
|
|||||||
<style-line id="secondary" stroke="#fdbf6f" width="1.4" />
|
<style-line id="secondary" stroke="#fdbf6f" width="1.4" />
|
||||||
<style-line id="tertiary" stroke="#ffff90" width="1.15" />
|
<style-line id="tertiary" stroke="#ffff90" width="1.15" />
|
||||||
|
|
||||||
|
<!--###### SYMBOL styles ######-->
|
||||||
|
|
||||||
|
<!-- oneway -->
|
||||||
|
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### ASSIGNMENT ######-->
|
<!--###### ASSIGNMENT ######-->
|
||||||
|
|
||||||
<m e="way" k="natural" v="issea|sea">
|
<m e="way" k="natural" v="issea|sea">
|
||||||
<area use="water" />
|
<area mesh="true" use="water" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m e="way" k="natural" v="nosea">
|
<m e="way" k="natural" v="nosea">
|
||||||
@@ -69,38 +74,38 @@
|
|||||||
<m k="landuse">
|
<m k="landuse">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m v="military">
|
<m v="military">
|
||||||
<area src="assets:patterns/military.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#40eeedea" />
|
||||||
</m>
|
</m>
|
||||||
<m v="residential|farmyard">
|
<m v="residential|farmyard">
|
||||||
<area fill="#e4e4e4" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
<m v="retail">
|
<m v="retail">
|
||||||
<area fill="#ffebeb" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#ffebeb" />
|
||||||
</m>
|
</m>
|
||||||
<m v="industrial|brownfield|railway">
|
<m v="industrial|brownfield|railway">
|
||||||
<area fill="#ecd8ff" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#ecd8ff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="commercial">
|
<m v="commercial">
|
||||||
<area fill="#ffffc0" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#ffffc0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="construction|greenfield">
|
<m v="construction|greenfield">
|
||||||
<area fill="#a47c41" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#a47c41" />
|
||||||
</m>
|
</m>
|
||||||
<m v="garages">
|
<m v="garages">
|
||||||
<area fill="#d6d6e4" />
|
<area fill="#d6d6e4" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m v="landfill|quarry">
|
<m v="landfill|quarry">
|
||||||
<area fill="#e9dd72" stroke="#556b2f" stroke-width="0.2" />
|
<area fill="#e9dd72" />
|
||||||
</m>
|
</m>
|
||||||
<m v="cemetery">
|
<m v="cemetery">
|
||||||
<area src="assets:patterns/cemetery.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#c7f1a3" />
|
||||||
</m>
|
</m>
|
||||||
<m v="field|farm|farmland|meadow|grass">
|
<m v="field|farm|farmland|meadow|grass">
|
||||||
<area fill="#ebfff2" stroke="#9ee673" stroke-width="0.1" />
|
<area fill="#ebfff2" />
|
||||||
</m>
|
</m>
|
||||||
<m v="allotments|village_green|recreation_ground">
|
<m v="allotments|village_green|recreation_ground">
|
||||||
<area fill="#bde3cb" stroke="#6fc13d" stroke-width="0.2" />
|
<area fill="#bde3cb" />
|
||||||
</m>
|
</m>
|
||||||
<m v="reservoir|basin">
|
<m v="reservoir|basin">
|
||||||
<area fill="#b5d6f1" />
|
<area fill="#b5d6f1" />
|
||||||
@@ -113,24 +118,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<m k="natural" v="grassland|scrub">
|
<m k="natural" v="grassland|scrub">
|
||||||
<area fill="#6fc18e" stroke="#6fc18e" stroke-width="0.2" />
|
<area fill="#6fc18e" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="natural|landuse" v="forest|wood">
|
<m k="natural|landuse" v="forest|wood">
|
||||||
<m k="wood">
|
<area fill="#6fc18e" />
|
||||||
<m k="wood" v="coniferous">
|
|
||||||
<area src="assets:patterns/wood-coniferous.png" />
|
|
||||||
</m>
|
|
||||||
<m k="wood" v="deciduous">
|
|
||||||
<area src="assets:patterns/wood-deciduous.png" />
|
|
||||||
</m>
|
|
||||||
<m k="wood" v="mixed">
|
|
||||||
<area src="assets:patterns/wood-mixed.png" />
|
|
||||||
</m>
|
|
||||||
</m>
|
|
||||||
<m k="wood" v="~">
|
|
||||||
<area fill="#6fc18e" stroke="#6fc18e" stroke-width="0.2" />
|
|
||||||
</m>
|
|
||||||
|
|
||||||
<m zoom-min="16">
|
<m zoom-min="16">
|
||||||
<text use="caption-small-blue" />
|
<text use="caption-small-blue" />
|
||||||
@@ -142,19 +134,19 @@
|
|||||||
<m k="amenity">
|
<m k="amenity">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m v="kindergarten|school|college|university">
|
<m v="kindergarten|school|college|university">
|
||||||
<area fill="#cdabde" stroke="#e9dd72" stroke-width="0.2" />
|
<area fill="#cdabde" />
|
||||||
</m>
|
</m>
|
||||||
<m v="grave_yard">
|
<m v="grave_yard">
|
||||||
<area src="assets:patterns/cemetery.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#c7f1a3" />
|
||||||
</m>
|
</m>
|
||||||
<m v="parking">
|
<m v="parking">
|
||||||
<area fill="#ffffc0" stroke="#e9dd72" stroke-width="0.2" />
|
<area fill="#ffffc0" />
|
||||||
<m k="access" v="private" zoom-min="15">
|
<m k="access" v="private" zoom-min="15">
|
||||||
<area src="assets:patterns/access-private.png" />
|
<area fill="#40ff0000" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes" v="fountain">
|
<m closed="yes" v="fountain">
|
||||||
<area fill="#b5d6f1" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b5d6f1" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -168,23 +160,23 @@
|
|||||||
<line stroke="#708599" fix="true" cap="butt" width="2.0" />
|
<line stroke="#708599" fix="true" cap="butt" width="2.0" />
|
||||||
</m> –>
|
</m> –>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#b5d6f1" stroke="#b5d6f1" stroke-width="0.4" />
|
<area fill="#b5d6f1" />
|
||||||
</m>
|
</m>
|
||||||
</m>-->
|
</m>-->
|
||||||
<m v="glacier">
|
<m v="glacier">
|
||||||
<area fill="#fafaff" stroke="#add8e6" stroke-width="0.8" />
|
<area fill="#fafaff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="land">
|
<m v="land">
|
||||||
<area fill="#f8f8f8" stroke="#e0e0e0" stroke-width="0.1" />
|
<area fill="#f8f8f8" />
|
||||||
</m>
|
</m>
|
||||||
<m v="beach">
|
<m v="beach">
|
||||||
<area fill="#eecc55" />
|
<area fill="#eecc55" />
|
||||||
</m>
|
</m>
|
||||||
<m v="heath">
|
<m v="heath">
|
||||||
<area fill="#ffffc0" stroke="#ffff90" stroke-width="0.2" />
|
<area fill="#ffffc0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="marsh|wetland">
|
<m v="marsh|wetland">
|
||||||
<area src="assets:patterns/marsh.png" />
|
<area fill="#deecb9" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m k="name" zoom-min="16">
|
<m k="name" zoom-min="16">
|
||||||
@@ -197,25 +189,24 @@
|
|||||||
<m k="leisure">
|
<m k="leisure">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m v="park|garden|golf_course|common|green">
|
<m v="park|garden|golf_course|common|green">
|
||||||
<area fill="#c7f1a3" stroke="#6fc18e" stroke-width="0.2" />
|
<area fill="#c7f1a3" />
|
||||||
</m>
|
</m>
|
||||||
<m v="playground|playing_fields|pitch|dog_park">
|
<m v="playground|playing_fields|pitch|dog_park">
|
||||||
<area fill="#c7f1a3" stroke="#6fc18e" stroke-width="0.2" />
|
<area fill="#c7f1a3" />
|
||||||
<m v="playground" zoom-min="17">
|
<m v="playground" zoom-min="17">
|
||||||
<symbol src="assets:symbols/amenity/playground.svg" />
|
<symbol src="assets:symbols/amenity/playground.svg" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m v="nature_reserve">
|
<m v="nature_reserve">
|
||||||
<area src="assets:patterns/nature-reserve.png" stroke="#6fc18e"
|
<area fill="#40abe29c" />
|
||||||
stroke-width="0.2" />
|
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m v="stadium|sports_centre|water_park">
|
<m v="stadium|sports_centre|water_park">
|
||||||
<area fill="#bde3cb" stroke="#6fc18e" stroke-width="0.2" />
|
<area fill="#bde3cb" />
|
||||||
</m>
|
</m>
|
||||||
<m v="track">
|
<m v="track">
|
||||||
<m k="area" v="yes|true">
|
<m k="area" v="yes|true">
|
||||||
<area fill="#bde3cb" stroke="#6fc18e" stroke-width="0.025" />
|
<area fill="#bde3cb" />
|
||||||
</m>
|
</m>
|
||||||
<m k="area" v="~|no|false">
|
<m k="area" v="~|no|false">
|
||||||
<line stroke="#6fc18e" width="0.75" />
|
<line stroke="#6fc18e" width="0.75" />
|
||||||
@@ -223,7 +214,7 @@
|
|||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m v="swimming_pool">
|
<m v="swimming_pool">
|
||||||
<area fill="#b5d6f1" stroke="#6060ff" stroke-width="0.2" />
|
<area fill="#b5d6f1" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<m k="name" zoom-min="16">
|
<m k="name" zoom-min="16">
|
||||||
@@ -281,7 +272,7 @@
|
|||||||
|
|
||||||
<!-- military -->
|
<!-- military -->
|
||||||
<m k="military">
|
<m k="military">
|
||||||
<area src="assets:patterns/military.png" stroke="#e4e4e4" stroke-width="0.2" />
|
<area fill="#40eeedea" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
|
|
||||||
@@ -291,10 +282,10 @@
|
|||||||
<symbol src="assets:symbols/sport/soccer.svg" />
|
<symbol src="assets:symbols/sport/soccer.svg" />
|
||||||
</m>
|
</m>
|
||||||
<m v="swimming|canoe|diving|scuba_diving">
|
<m v="swimming|canoe|diving|scuba_diving">
|
||||||
<area fill="#b5d6f1" stroke="#6060ff" stroke-width="0.2" />
|
<area fill="#b5d6f1" />
|
||||||
</m>
|
</m>
|
||||||
<m v="tennis">
|
<m v="tennis">
|
||||||
<area fill="#d18a6a" stroke="#b36c4c" stroke-width="0.2" />
|
<area fill="#d18a6a" />
|
||||||
<m zoom-min="17">
|
<m zoom-min="17">
|
||||||
<symbol src="assets:symbols/sport/tennis.svg" />
|
<symbol src="assets:symbols/sport/tennis.svg" />
|
||||||
</m>
|
</m>
|
||||||
@@ -308,7 +299,7 @@
|
|||||||
<area fill="#f2caea" />
|
<area fill="#f2caea" />
|
||||||
</m>
|
</m>
|
||||||
<m v="zoo|picnic_site|caravan_site|camp_site">
|
<m v="zoo|picnic_site|caravan_site|camp_site">
|
||||||
<area fill="#c7f1a3" stroke="#6fc18e" stroke-width="0.2" />
|
<area fill="#c7f1a3" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -393,28 +384,28 @@
|
|||||||
<m k="area" v="yes|true">
|
<m k="area" v="yes|true">
|
||||||
<m k="highway">
|
<m k="highway">
|
||||||
<m v="footway|footpath">
|
<m v="footway|footpath">
|
||||||
<area fill="#e5e0c2" stroke="#707070" stroke-width="1.15" />
|
<area fill="#e5e0c2" />
|
||||||
</m>
|
</m>
|
||||||
<m v="pedestrian">
|
<m v="pedestrian">
|
||||||
<area fill="#e5e0c2" stroke="#707070" stroke-width="1.15" />
|
<area fill="#e5e0c2" />
|
||||||
</m>
|
</m>
|
||||||
<m v="path">
|
<m v="path">
|
||||||
<area fill="#d0d0d0" stroke="#d0d0d0" stroke-width="1.15" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="service">
|
<m v="service">
|
||||||
<area fill="#ffffff" stroke="#707070" stroke-width="1.15" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="unclassified">
|
<m v="unclassified">
|
||||||
<area fill="#ffffff" stroke="#707070" stroke-width="1.3" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="residential">
|
<m v="residential">
|
||||||
<area fill="#ffffff" stroke="#707070" stroke-width="1.15" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
<m v="road">
|
<m v="road">
|
||||||
<area fill="#d0d0d0" />
|
<area fill="#d0d0d0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="living_street">
|
<m v="living_street">
|
||||||
<area fill="#ffffff" stroke="#ffffff" stroke-width="1.15" />
|
<area fill="#ffffff" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -435,7 +426,7 @@
|
|||||||
<m k="aeroway">
|
<m k="aeroway">
|
||||||
<m closed="yes" v="aerodrome">
|
<m closed="yes" v="aerodrome">
|
||||||
<m zoom-min="12">
|
<m zoom-min="12">
|
||||||
<area fill="#d8dcce" stroke="#b8acae" stroke-width="0.8" />
|
<area fill="#d8dcce" />
|
||||||
</m>
|
</m>
|
||||||
<m zoom-max="11">
|
<m zoom-max="11">
|
||||||
<caption dy="18" fill="#000000" k="ref" priority="5" size="19" stroke="#ffffff"
|
<caption dy="18" fill="#000000" k="ref" priority="5" size="19" stroke="#ffffff"
|
||||||
@@ -450,7 +441,8 @@
|
|||||||
<area fill="#f0f0f0" />
|
<area fill="#f0f0f0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="terminal">
|
<m v="terminal">
|
||||||
<area fill="#f3d6b6" stroke="#6a5a8e" stroke-width="0.2" />
|
<area fill="#f3d6b6" />
|
||||||
|
<line cap="butt" fix="true" stroke="#6a5a8e" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m v="runway">
|
<!-- <m v="runway">
|
||||||
@@ -553,9 +545,10 @@
|
|||||||
<m k="building|building:part">
|
<m k="building|building:part">
|
||||||
<m select="first">
|
<m select="first">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#f3d6b6" stroke="#6a5a8e" stroke-width="1.0" />
|
<area fill="#f3d6b6" />
|
||||||
|
<line cap="butt" fix="true" stroke="#6a5a8e" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
<m zoom-max="16">
|
<m closed="no">
|
||||||
<line cap="butt" fix="true" stroke="#6a5a8e" width="1.0" />
|
<line cap="butt" fix="true" stroke="#6a5a8e" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -781,18 +774,6 @@
|
|||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m zoom-min="16">
|
|
||||||
|
|
||||||
<line width="1.0" stroke="#ff0000" />
|
|
||||||
|
|
||||||
<m k="access" v="destination">
|
|
||||||
<line src="assets:patterns/access-destination.png" width="1.5" />
|
|
||||||
</m>
|
|
||||||
<m k="access" v="private">
|
|
||||||
<line src="assets:patterns/access-private.png" width="1.5" />
|
|
||||||
</m>
|
|
||||||
</m> -->
|
|
||||||
|
|
||||||
<!-- add outline for all matches -->
|
<!-- add outline for all matches -->
|
||||||
<m select="when-matched">
|
<m select="when-matched">
|
||||||
<outline use="casing" />
|
<outline use="casing" />
|
||||||
@@ -952,7 +933,7 @@
|
|||||||
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#e4e4e4" stroke="#d0d0d0" stroke-width="0.05" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -983,7 +964,7 @@
|
|||||||
<m k="area" v="~|false|no">
|
<m k="area" v="~|false|no">
|
||||||
<m k="highway">
|
<m k="highway">
|
||||||
<m k="oneway" v="yes|true" zoom-min="16">
|
<m k="oneway" v="yes|true" zoom-min="16">
|
||||||
<lineSymbol src="assets:symbols/oneway.svg" />
|
<symbol use="oneway" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
@@ -1013,7 +994,7 @@
|
|||||||
<m k="tunnel" v="~|false|no">
|
<m k="tunnel" v="~|false|no">
|
||||||
|
|
||||||
<m v="station">
|
<m v="station">
|
||||||
<area fill="#9b9b79" stroke="#707070" stroke-width="0.3" />
|
<area fill="#9b9b79" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="bridge" v="yes|true">
|
<m k="bridge" v="yes|true">
|
||||||
@@ -1061,7 +1042,7 @@
|
|||||||
|
|
||||||
<m k="boundary">
|
<m k="boundary">
|
||||||
<m k="boundary" v="national_park">
|
<m k="boundary" v="national_park">
|
||||||
<line dasharray="15, 5, 5, 5" fix="true" stroke="#4ef94b" width="1.25" />
|
<area fill="#40abe29c" />
|
||||||
</m>
|
</m>
|
||||||
<m k="boundary" v="administrative">
|
<m k="boundary" v="administrative">
|
||||||
<m k="admin_level">
|
<m k="admin_level">
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<style-area fade="15" fill="#ee606060" id="building" />
|
<style-area fade="15" fill="#ee606060" id="building" />
|
||||||
|
|
||||||
<!--water-->
|
<!--water-->
|
||||||
<style-area fill="#001223" id="water" mesh="true" />
|
<style-area fill="#001223" id="water" />
|
||||||
|
|
||||||
|
|
||||||
<!--###### LINE styles ######-->
|
<!--###### LINE styles ######-->
|
||||||
@@ -119,10 +119,15 @@
|
|||||||
<style-line cap="butt" id="water:outline" stroke="#a4bbcc" width="1.0" />
|
<style-line cap="butt" id="water:outline" stroke="#a4bbcc" width="1.0" />
|
||||||
<style-line cap="butt" id="water" stroke="#cca4bbcc" width="0.6" />
|
<style-line cap="butt" id="water" stroke="#cca4bbcc" width="0.6" />
|
||||||
|
|
||||||
|
<!--###### SYMBOL styles ######-->
|
||||||
|
|
||||||
|
<!-- oneway -->
|
||||||
|
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
|
||||||
|
|
||||||
<!--###### ASSIGNMENT ######-->
|
<!--###### ASSIGNMENT ######-->
|
||||||
|
|
||||||
<m e="way" k="natural" v="issea|sea">
|
<m e="way" k="natural" v="issea|sea">
|
||||||
<area use="water" />
|
<area mesh="true" use="water" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m e="way" k="natural" v="nosea">
|
<m e="way" k="natural" v="nosea">
|
||||||
@@ -168,7 +173,7 @@
|
|||||||
<m k="landuse|natural|leisure||amenity">
|
<m k="landuse|natural|leisure||amenity">
|
||||||
<!-- kind of more like landuse imho -->
|
<!-- kind of more like landuse imho -->
|
||||||
<m k="leisure|landuse" v="nature_reserve">
|
<m k="leisure|landuse" v="nature_reserve">
|
||||||
<area use="greens2" />
|
<area fill="#40abe29c" />
|
||||||
<m zoom-min="14">
|
<m zoom-min="14">
|
||||||
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
<line cap="butt" fix="true" stroke="#abe29c" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
@@ -229,17 +234,17 @@
|
|||||||
<!-- amenity -->
|
<!-- amenity -->
|
||||||
<m k="amenity">
|
<m k="amenity">
|
||||||
<m v="kindergarten|school|college|university" zoom-min="14">
|
<m v="kindergarten|school|college|university" zoom-min="14">
|
||||||
<area fill="#524459" stroke="#b094bf" stroke-width="0.2" />
|
<area fill="#524459" />
|
||||||
</m>
|
</m>
|
||||||
<m v="hospital">
|
<m v="hospital">
|
||||||
<area fill="#716553" />
|
<area fill="#716553" />
|
||||||
</m>
|
</m>
|
||||||
<m v="parking" zoom-min="14">
|
<m v="parking" zoom-min="14">
|
||||||
<area fill="#444434" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#444434" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m closed="yes" v="fountain">
|
<m closed="yes" v="fountain">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -292,7 +297,7 @@
|
|||||||
</m>
|
</m>
|
||||||
-->
|
-->
|
||||||
<m v="swimming_pool">
|
<m v="swimming_pool">
|
||||||
<area fill="#b4cbdc" stroke="#6060ff" stroke-width="0.2" />
|
<area fill="#b4cbdc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m v="track"> <m k="area" v="yes|true">
|
<!-- <m v="track"> <m k="area" v="yes|true">
|
||||||
@@ -925,7 +930,7 @@
|
|||||||
<line stroke="#e4e4e4" width="0.3" cap="butt" />
|
<line stroke="#e4e4e4" width="0.3" cap="butt" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#e4e4e4" stroke="#d0d0d0" stroke-width="0.05" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
</m> -->
|
</m> -->
|
||||||
|
|
||||||
@@ -1014,9 +1019,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- non-physical boundaries -->
|
<!-- non-physical boundaries -->
|
||||||
<!-- <m k="boundary"> <m k="boundary" v="national_park">
|
<m k="boundary" v="national_park">
|
||||||
<line stroke="#4ef94b" width="0.25" stroke-dasharray="15, 5, 5, 5"
|
<area fill="#40abe29c" />
|
||||||
/> -->
|
</m>
|
||||||
|
|
||||||
<!--<m k="boundary" v="administrative"> -->
|
<!--<m k="boundary" v="administrative"> -->
|
||||||
<m k="admin_level">
|
<m k="admin_level">
|
||||||
@@ -1073,7 +1078,7 @@
|
|||||||
<m k="area" v="~|false|no">
|
<m k="area" v="~|false|no">
|
||||||
<m k="highway">
|
<m k="highway">
|
||||||
<m k="oneway" v="yes|true" zoom-min="16">
|
<m k="oneway" v="yes|true" zoom-min="16">
|
||||||
<lineSymbol src="assets:symbols/oneway.svg" />
|
<symbol use="oneway" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|||||||
@@ -56,8 +56,7 @@
|
|||||||
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
<!-- <style-area id="greens" fill="#d2e5ce" fade="10" /> -->
|
||||||
|
|
||||||
<!--farmland-->
|
<!--farmland-->
|
||||||
<style-area fade="12" fill="#e4dab5" id="farmland" stroke="#d1dbc7" stroke-width="1.0"
|
<style-area fade="12" fill="#e4dab5" id="farmland" use="tex1" />
|
||||||
use="tex1" />
|
|
||||||
|
|
||||||
<!-- marsh|wetland|mud|nature_reserve -->
|
<!-- marsh|wetland|mud|nature_reserve -->
|
||||||
<style-area fade="12" fill="#deecb9" id="greens2" />
|
<style-area fade="12" fill="#deecb9" id="greens2" />
|
||||||
@@ -72,7 +71,7 @@
|
|||||||
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
<!-- <style-area id="wood" fill="#d1dbc7" fade="8" blend="11" blend-fill="#9ac56e" /> -->
|
||||||
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
<style-area blend="11" blend-fill="#83aa5b" fade="8" fill="#b3d095" id="wood" use="park" />
|
||||||
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
<!-- <style-line id="wood" fix="true" cap="butt" width="1.0" stroke="#9ac56e" /> -->
|
||||||
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" stroke="#d1dbc7" stroke-width="1.0"/> -->
|
<!-- <style-area id="wood" use="park" fill="#9ac56e" fade="8" /> -->
|
||||||
|
|
||||||
<!-- de:Kleingartengebiet -->
|
<!-- de:Kleingartengebiet -->
|
||||||
<style-area fade="12" fill="#efeae0" id="allotments" use="tex1" />
|
<style-area fade="12" fill="#efeae0" id="allotments" use="tex1" />
|
||||||
@@ -83,7 +82,7 @@
|
|||||||
<!--military-->
|
<!--military-->
|
||||||
<style-area fade="10" fill="#eeedea" id="military" />
|
<style-area fade="10" fill="#eeedea" id="military" />
|
||||||
<!--building-->
|
<!--building-->
|
||||||
<style-area fade="15" fill="#f2f0eb" id="building" stroke="#b7b6b3" stroke-width="1.0" />
|
<style-area fade="15" fill="#f2f0eb" id="building" />
|
||||||
<!--<style-area id="building" fill="#e9e6e3" fade="15"/>-->
|
<!--<style-area id="building" fill="#e9e6e3" fade="15"/>-->
|
||||||
|
|
||||||
<!--water-->
|
<!--water-->
|
||||||
@@ -268,10 +267,10 @@
|
|||||||
<area fill="#f2d9b1" />
|
<area fill="#f2d9b1" />
|
||||||
</m>
|
</m>
|
||||||
<!-- <m v="parking" zoom-min="15">
|
<!-- <m v="parking" zoom-min="15">
|
||||||
<area fill="#f4f4f4" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#f4f4f4" />
|
||||||
</m>
|
</m>
|
||||||
<m v="fountain" closed="yes">
|
<m v="fountain" closed="yes">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m> -->
|
</m> -->
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -305,12 +304,9 @@
|
|||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="landuse|natural" v="forest|wood">
|
<m k="landuse|natural" v="forest|wood">
|
||||||
<m zoom-max="9" zoom-min="8">
|
<m zoom-min="8">
|
||||||
<area use="wood" />
|
<area use="wood" />
|
||||||
</m>
|
</m>
|
||||||
<m zoom-min="10">
|
|
||||||
<area stroke="#91bf63" stroke-width="1.0" use="wood" />
|
|
||||||
</m>
|
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- keep grass above forest:wood and leisure:park! -->
|
<!-- keep grass above forest:wood and leisure:park! -->
|
||||||
@@ -336,10 +332,10 @@
|
|||||||
</m>
|
</m>
|
||||||
-->
|
-->
|
||||||
<m v="parking" zoom-min="15">
|
<m v="parking" zoom-min="15">
|
||||||
<area fill="#f4f4f4" stroke="#d4d4d4" stroke-width="0.2" />
|
<area fill="#f4f4f4" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes" v="fountain">
|
<m closed="yes" v="fountain">
|
||||||
<area fill="#b4cbdc" stroke="#000080" stroke-width="0.15" />
|
<area fill="#b4cbdc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
</m>
|
</m>
|
||||||
@@ -385,7 +381,7 @@
|
|||||||
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
<line cap="butt" fix="true" stroke="#d9d9a3" width="1.0" />
|
||||||
</m>
|
</m>
|
||||||
<m v="swimming_pool">
|
<m v="swimming_pool">
|
||||||
<area fill="#d4ebfc" stroke="#6060ff" stroke-width="0.2" />
|
<area fill="#d4ebfc" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- <m v="track"> <m k="area" v="yes|true">
|
<!-- <m v="track"> <m k="area" v="yes|true">
|
||||||
@@ -607,6 +603,7 @@
|
|||||||
<!-- Airport passenger building -->
|
<!-- Airport passenger building -->
|
||||||
<m v="terminal|hangar">
|
<m v="terminal|hangar">
|
||||||
<area use="building" />
|
<area use="building" />
|
||||||
|
<line use="building" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -620,6 +617,7 @@
|
|||||||
<m zoom-max="16" zoom-min="14">
|
<m zoom-max="16" zoom-min="14">
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fade="14" use="building" />
|
<area fade="14" use="building" />
|
||||||
|
<line fade="14" use="building" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="no">
|
<m closed="no">
|
||||||
<line fade="14" use="building" />
|
<line fade="14" use="building" />
|
||||||
@@ -905,7 +903,7 @@
|
|||||||
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
<line cap="butt" stroke="#e4e4e4" width="0.3" />
|
||||||
</m>
|
</m>
|
||||||
<m closed="yes">
|
<m closed="yes">
|
||||||
<area fill="#e4e4e4" stroke="#d0d0d0" stroke-width="1.05" />
|
<area fill="#e4e4e4" />
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -924,7 +922,7 @@
|
|||||||
<m k="tunnel" v="~|false|no">
|
<m k="tunnel" v="~|false|no">
|
||||||
|
|
||||||
<m k="railway" v="station">
|
<m k="railway" v="station">
|
||||||
<area fill="#dbdbc9" stroke="#707070" stroke-width="0.3" />
|
<area fill="#dbdbc9" />
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- railway bridge casings -->
|
<!-- railway bridge casings -->
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016-2018 Izumi Kawashima
|
* Copyright 2016-2018 Izumi Kawashima
|
||||||
* Copyright 2017-2018 devemux86
|
* Copyright 2017-2020 devemux86
|
||||||
* Copyright 2019 Gustl22
|
* Copyright 2019 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
@@ -23,13 +23,7 @@ import com.badlogic.gdx.Gdx;
|
|||||||
import com.badlogic.gdx.backends.gwt.GwtApplication;
|
import com.badlogic.gdx.backends.gwt.GwtApplication;
|
||||||
import com.badlogic.gdx.backends.gwt.GwtGraphics;
|
import com.badlogic.gdx.backends.gwt.GwtGraphics;
|
||||||
import com.badlogic.gdx.graphics.glutils.GLVersion;
|
import com.badlogic.gdx.graphics.glutils.GLVersion;
|
||||||
|
import org.oscim.backend.*;
|
||||||
import org.oscim.backend.AssetAdapter;
|
|
||||||
import org.oscim.backend.CanvasAdapter;
|
|
||||||
import org.oscim.backend.DateTimeAdapter;
|
|
||||||
import org.oscim.backend.GL;
|
|
||||||
import org.oscim.backend.GL30;
|
|
||||||
import org.oscim.backend.GLAdapter;
|
|
||||||
import org.oscim.core.MapPosition;
|
import org.oscim.core.MapPosition;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.gdx.GdxAssets;
|
import org.oscim.gdx.GdxAssets;
|
||||||
@@ -54,6 +48,8 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
class GwtMap extends GdxMap {
|
class GwtMap extends GdxMap {
|
||||||
static final Logger log = LoggerFactory.getLogger(GwtMap.class);
|
static final Logger log = LoggerFactory.getLogger(GwtMap.class);
|
||||||
|
|
||||||
@@ -107,9 +103,10 @@ class GwtMap extends GdxMap {
|
|||||||
|
|
||||||
if ("toner".equals(mapName))
|
if ("toner".equals(mapName))
|
||||||
ts = DefaultSources.STAMEN_TONER.build();
|
ts = DefaultSources.STAMEN_TONER.build();
|
||||||
else if ("osm".equals(mapName))
|
else if ("osm".equals(mapName)) {
|
||||||
ts = DefaultSources.OPENSTREETMAP.build();
|
ts = DefaultSources.OPENSTREETMAP.build();
|
||||||
else if ("watercolor".equals(mapName))
|
ts.setHttpRequestHeaders(Collections.singletonMap("User-Agent", "vtm-web-app"));
|
||||||
|
} else if ("watercolor".equals(mapName))
|
||||||
ts = DefaultSources.STAMEN_WATERCOLOR.build();
|
ts = DefaultSources.STAMEN_WATERCOLOR.build();
|
||||||
else if ("ne-landcover".equals(mapName))
|
else if ("ne-landcover".equals(mapName))
|
||||||
ts = DefaultSources.NE_LANDCOVER.build();
|
ts = DefaultSources.NE_LANDCOVER.build();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ apply plugin: 'maven'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api "org.slf4j:slf4j-api:$slf4jVersion"
|
api "org.slf4j:slf4j-api:$slf4jVersion"
|
||||||
compileOnly 'com.google.code.findbugs:jsr305:3.0.1'
|
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
38
vtm/resources/assets/shaders/accuracy_1.glsl
Normal file
38
vtm/resources/assets/shaders/accuracy_1.glsl
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#ifdef GLES
|
||||||
|
precision mediump float;
|
||||||
|
#endif
|
||||||
|
uniform mat4 u_mvp;
|
||||||
|
uniform float u_phase;
|
||||||
|
uniform float u_scale;
|
||||||
|
attribute vec2 a_pos;
|
||||||
|
varying vec2 v_tex;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_Position = u_mvp * vec4(a_pos * u_scale * u_phase, 0.0, 1.0);
|
||||||
|
v_tex = a_pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
$$
|
||||||
|
|
||||||
|
#ifdef GLES
|
||||||
|
precision mediump float;
|
||||||
|
#endif
|
||||||
|
varying vec2 v_tex;
|
||||||
|
uniform float u_scale;
|
||||||
|
uniform int u_mode;
|
||||||
|
uniform vec4 u_color;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
float len = 1.0 - length(v_tex);
|
||||||
|
if (u_mode == -1) {
|
||||||
|
gl_FragColor = u_color * len;
|
||||||
|
} else {
|
||||||
|
// outer ring
|
||||||
|
float a = smoothstep(0.0, 2.0 / u_scale, len);
|
||||||
|
// inner ring
|
||||||
|
float b = 0.8 * smoothstep(3.0 / u_scale, 4.0 / u_scale, len);
|
||||||
|
// - subtract inner from outer to create the outline
|
||||||
|
a = a - b;
|
||||||
|
gl_FragColor = u_color * a;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user