├── app
├── .gitignore
├── .directory
├── src
│ ├── main
│ │ ├── ic_marker-web.png
│ │ ├── ic_launcher-web.png
│ │ ├── ic_navigation-web.png
│ │ ├── ic_my_position-web.png
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_marker.png
│ │ │ │ ├── ic_navigation.png
│ │ │ │ └── ic_my_position.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_marker.png
│ │ │ │ ├── ic_navigation.png
│ │ │ │ └── ic_my_position.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_marker.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_my_position.png
│ │ │ │ └── ic_navigation.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_marker.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_my_position.png
│ │ │ │ └── ic_navigation.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_marker.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_navigation.png
│ │ │ │ └── ic_my_position.png
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── ic_info_black_24dp.png
│ │ │ │ ├── ic_sync_black_24dp.png
│ │ │ │ └── ic_notifications_black_24dp.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── ic_info_black_24dp.png
│ │ │ │ ├── ic_sync_black_24dp.png
│ │ │ │ └── ic_notifications_black_24dp.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── ic_info_black_24dp.png
│ │ │ │ ├── ic_sync_black_24dp.png
│ │ │ │ └── ic_notifications_black_24dp.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── ic_info_black_24dp.png
│ │ │ │ ├── ic_sync_black_24dp.png
│ │ │ │ └── ic_notifications_black_24dp.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── ic_info_black_24dp.png
│ │ │ │ ├── ic_sync_black_24dp.png
│ │ │ │ └── ic_notifications_black_24dp.png
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── strings.xml
│ │ │ ├── values-v21
│ │ │ │ └── styles.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── drawable-v21
│ │ │ │ ├── ic_info_black_24dp.xml
│ │ │ │ ├── ic_notifications_black_24dp.xml
│ │ │ │ └── ic_sync_black_24dp.xml
│ │ │ ├── xml
│ │ │ │ ├── pref_headers.xml
│ │ │ │ ├── pref_server.xml
│ │ │ │ └── pref_general.xml
│ │ │ ├── menu
│ │ │ │ └── menu_main.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── activity_view_map.xml
│ │ │ │ └── content_main.xml
│ │ │ ├── values-ja
│ │ │ │ └── strings.xml
│ │ │ └── values-ru
│ │ │ │ └── strings.xml
│ │ ├── java
│ │ │ └── me
│ │ │ │ └── dbarnett
│ │ │ │ └── acastus
│ │ │ │ ├── ResultNode.java
│ │ │ │ ├── MakeAPIRequest.java
│ │ │ │ ├── AppCompatPreferenceActivity.java
│ │ │ │ └── GeoLocation.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── me
│ │ │ └── dbarnett
│ │ │ └── acastus
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── me
│ │ └── dbarnett
│ │ └── acastus
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── styles
├── tron-style-4.0.0
│ ├── VERSION
│ ├── dist
│ │ └── .gitkeep
│ ├── .gitignore
│ ├── .gitmodules
│ ├── components
│ │ ├── images
│ │ │ ├── zoo.png
│ │ │ ├── star.png
│ │ │ ├── museum.png
│ │ │ ├── star-sdf.png
│ │ │ ├── station.png
│ │ │ ├── subway.png
│ │ │ ├── terrain.jpg
│ │ │ ├── terrain2.jpg
│ │ │ ├── tron@2x.png
│ │ │ ├── zoo-sdf.png
│ │ │ ├── museum-sdf.png
│ │ │ ├── subway-sdf.png
│ │ │ ├── station-sdf.png
│ │ │ ├── tron-terrain.jpg
│ │ │ └── sdf.sh
│ │ ├── fonts
│ │ │ ├── 8XtYtNKEyyZh481XVWfVOrO3LdcAZYWl9Si6vvxL-qU.woff
│ │ │ ├── 94ug0rEgQO_WuI_xKJMFc3YhjbSpvc47ee6xR_80Hnw.woff
│ │ │ ├── IkErdnKw9ItVkLeeur9GHfesZW2xOQ-xsNqO47m55DA.woff
│ │ │ ├── VWXaIPGrUapL_Y2vGs0lKALUuEpTyoUstqEm5AMlJo4.woff
│ │ │ └── ZA_4ooaF_Dfdn26t_IoQOaCWcynf_cDxXwCLxiixG1c.woff
│ │ └── fonts.yaml
│ ├── Makefile
│ ├── layers
│ │ ├── earth-labels.yaml
│ │ ├── earth.yaml
│ │ ├── landuse-labels.yaml
│ │ ├── boundaries-labels.yaml
│ │ ├── boundaries.yaml
│ │ ├── transit.yaml
│ │ ├── buildings-labels.yaml
│ │ ├── buildings.yaml
│ │ ├── water-labels.yaml
│ │ ├── water.yaml
│ │ └── ux-sdk-overlay.yaml
│ ├── styles
│ │ ├── common.yaml
│ │ ├── lines.yaml
│ │ └── polygons.yaml
│ ├── LICENSE
│ ├── tron-style.yaml
│ ├── tron-style-more-labels.yaml
│ ├── tron-style-no-labels.yaml
│ ├── README.md
│ └── lib
│ │ ├── FileSaver.js
│ │ └── keymaster.js
└── cinnabar-style-gh-pages
│ ├── VERSION
│ ├── dist
│ └── .gitkeep
│ ├── .gitignore
│ ├── images
│ └── refill@2x.png
│ ├── fonts
│ ├── OpenSans-Bold.woff
│ ├── OpenSans-Light.woff
│ ├── OpenSans-Italic.woff
│ ├── OpenSans-Regular.woff
│ ├── OpenSans-Semibold.woff
│ ├── Montserrat-Regular.woff
│ └── OpenSans-SemiboldItalic.woff
│ ├── Makefile
│ ├── LICENSE
│ ├── lib
│ ├── leaflet-hash.js
│ ├── FileSaver.js
│ └── keymaster.js
│ └── README.md
├── .idea
├── copyright
│ └── profiles_settings.xml
├── vcs.xml
├── modules.xml
├── runConfigurations.xml
├── gradle.xml
├── compiler.xml
└── misc.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── metadata
└── me.dbarnett.Acastus.txt
├── README.md
├── gradlew.bat
├── gradlew
└── LICENSE.txt
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/VERSION:
--------------------------------------------------------------------------------
1 | 4.0.0
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/dist/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/VERSION:
--------------------------------------------------------------------------------
1 | 6.0.1
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/dist/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | dist/*.zip
3 |
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | dist/*.zip
--------------------------------------------------------------------------------
/app/.directory:
--------------------------------------------------------------------------------
1 | [Dolphin]
2 | Timestamp=2016,7,25,15,34,28
3 | Version=3
4 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/ic_marker-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/ic_marker-web.png
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/ic_navigation-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/ic_navigation-web.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "blocks"]
2 | path = blocks
3 | url = https://github.com/tangrams/blocks
4 |
--------------------------------------------------------------------------------
/app/src/main/ic_my_position-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/ic_my_position-web.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-hdpi/ic_marker.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-mdpi/ic_marker.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xhdpi/ic_marker.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxhdpi/ic_marker.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-hdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-mdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_marker.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_my_position.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-hdpi/ic_my_position.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_my_position.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-mdpi/ic_my_position.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_my_position.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xhdpi/ic_my_position.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xhdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_my_position.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxhdpi/ic_my_position.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxhdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_navigation.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/zoo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/zoo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_my_position.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_my_position.png
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/images/refill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/images/refill@2x.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/star.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-hdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-hdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-mdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-mdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xhdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/museum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/museum.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/star-sdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/star-sdf.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/station.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/station.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/subway.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/subway.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/terrain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/terrain.jpg
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/terrain2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/terrain2.jpg
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/tron@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/tron@2x.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/zoo-sdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/zoo-sdf.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xxhdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_sync_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xxxhdpi/ic_sync_black_24dp.png
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/fonts/OpenSans-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/fonts/OpenSans-Bold.woff
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/fonts/OpenSans-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/fonts/OpenSans-Light.woff
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/museum-sdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/museum-sdf.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/subway-sdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/subway-sdf.png
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/fonts/OpenSans-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/fonts/OpenSans-Italic.woff
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/fonts/OpenSans-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/fonts/OpenSans-Regular.woff
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/fonts/OpenSans-Semibold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/fonts/OpenSans-Semibold.woff
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/station-sdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/station-sdf.png
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/tron-terrain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/images/tron-terrain.jpg
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/fonts/Montserrat-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/fonts/Montserrat-Regular.woff
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/fonts/OpenSans-SemiboldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/cinnabar-style-gh-pages/fonts/OpenSans-SemiboldItalic.woff
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/fonts/8XtYtNKEyyZh481XVWfVOrO3LdcAZYWl9Si6vvxL-qU.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/fonts/8XtYtNKEyyZh481XVWfVOrO3LdcAZYWl9Si6vvxL-qU.woff
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/fonts/94ug0rEgQO_WuI_xKJMFc3YhjbSpvc47ee6xR_80Hnw.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/fonts/94ug0rEgQO_WuI_xKJMFc3YhjbSpvc47ee6xR_80Hnw.woff
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/fonts/IkErdnKw9ItVkLeeur9GHfesZW2xOQ-xsNqO47m55DA.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/fonts/IkErdnKw9ItVkLeeur9GHfesZW2xOQ-xsNqO47m55DA.woff
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/fonts/VWXaIPGrUapL_Y2vGs0lKALUuEpTyoUstqEm5AMlJo4.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/fonts/VWXaIPGrUapL_Y2vGs0lKALUuEpTyoUstqEm5AMlJo4.woff
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/fonts/ZA_4ooaF_Dfdn26t_IoQOaCWcynf_cDxXwCLxiixG1c.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanielBarnett714/Acastus/HEAD/styles/tron-style-4.0.0/components/fonts/ZA_4ooaF_Dfdn26t_IoQOaCWcynf_cDxXwCLxiixG1c.woff
--------------------------------------------------------------------------------
/app/src/main/java/me/dbarnett/acastus/ResultNode.java:
--------------------------------------------------------------------------------
1 | package me.dbarnett.acastus;
2 |
3 | /**
4 | * Created by daniel on 7/24/16.
5 | */
6 | public class ResultNode {
7 |
8 | public String name;
9 | public double lat;
10 | public double lon;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/images/sdf.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | convert $1 -filter Jinc -resize 400% -threshold 30% \( +clone -negate -morphology Distance Euclidean -level 50%,-50% \) -morphology Distance Euclidean -compose Plus -composite -level 0%,100% $2
4 | convert $2 -resize 25% $2
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Sep 16 19:40:58 EDT 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/Makefile:
--------------------------------------------------------------------------------
1 | all: dist
2 |
3 | dist:
4 | tangram-bundle cinnabar-style.yaml
5 | mv cinnabar-style.zip dist/cinnabar-style.zip
6 |
7 | clean:
8 | rm -rf dist
9 | mkdir dist
10 |
11 | tag:
12 | git tag -m 'See CHANGELOG for details.' -a v`cat VERSION`
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #00e676
4 | #00c853
5 | #757575
6 | #232629
7 | #fcfcfc
8 | #7f8c8d
9 |
10 |
--------------------------------------------------------------------------------
/app/src/test/java/me/dbarnett/acastus/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.dbarnett.acastus;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_info_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/me/dbarnett/acastus/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package me.dbarnett.acastus;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/Makefile:
--------------------------------------------------------------------------------
1 | all: dist
2 |
3 | dist:
4 | tangram-bundle tron-style.yaml
5 | mv tron-style.zip dist/tron-style.zip
6 |
7 | tangram-bundle tron-style-more-labels.yaml
8 | mv tron-style-more-labels.zip dist/tron-style-more-labels.zip
9 |
10 | tangram-bundle tron-style-no-labels.yaml
11 | mv tron-style-no-labels.zip dist/tron-style-no-labels.zip
12 |
13 | clean:
14 | rm -rf dist
15 | mkdir dist
16 |
17 | tag:
18 | git tag -m 'See CHANGELOG for details.' -a v`cat VERSION`
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_sync_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/earth-labels.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | # tuck this into existing earth layer
3 | earth:
4 | earth-labels:
5 | filter: { name: true }
6 | island:
7 | filter: { kind: [archipelago, island, islet] }
8 | draw:
9 | text:
10 | visible: global.text_visible_island
11 | text_wrap: 10
12 | font:
13 | family: Orbitron
14 | size: [[10,12px],[16,16px]]
15 | fill: [0.594,0.990,0.944]
16 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/daniel/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_server.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
20 |
21 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/styles/common.yaml:
--------------------------------------------------------------------------------
1 | import:
2 | - ../blocks/functions/zoom.yaml
3 | - ../blocks/functions/pulse.yaml
4 | - ../blocks/geometry/dynamic-width.yaml
5 | - ../blocks/geometry/dynamic-height.yaml
6 |
7 | styles:
8 | tron-palette:
9 | shaders:
10 | blocks:
11 | global: |
12 | vec3 palette(in float x) {
13 | return mix(vec3(0.000,1.000,1.),
14 | vec3(1.,0.,0.),
15 | vec3(smoothstep(0.0,1.048, x),
16 | sin(x*2.806),
17 | smoothstep(-0.512,1.072,x)))*(1.0-sin(-0.196+x*3.950)*0.380);
18 | }
19 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.0"
6 |
7 | defaultConfig {
8 | applicationId "me.dbarnett.acastus"
9 | minSdkVersion 19
10 | targetSdkVersion 24
11 | versionCode 15
12 | versionName "1.13"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 |
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 |
22 | sourceSets.main.assets.srcDirs = ['../styles']
23 | }
24 |
25 | dependencies {
26 | compile fileTree(dir: 'libs', include: ['*.jar'])
27 | testCompile 'junit:junit:4.12'
28 | compile 'com.android.support:appcompat-v7:24.0.0'
29 | compile 'com.android.support:design:24.0.0'
30 | compile 'com.android.support:support-v4:24.0.0'
31 | compile 'com.mapzen.tangram:tangram:0.5.1'
32 | }
33 |
--------------------------------------------------------------------------------
/metadata/me.dbarnett.Acastus.txt:
--------------------------------------------------------------------------------
1 | Categories:Navigation
2 | License:LGPL
3 | Web Site:https://danielbarnett714.github.io/Acastus/
4 | Source Code:https://github.com/DanielBarnett714/Acastus
5 | Issue Tracker:https://github.com/DanielBarnett714/Acastus/issues
6 | Donate:https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=VTUD5XRYMT686&lc=US&item_name=Acastus¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
7 | Bitcoin:1NjjuTxXm3ezpnVUGk4VmdEZUcym3SKZ8z
8 |
9 | Auto Name:Acastus
10 | Summary:A free and open source address/POI search for navigation apps
11 | Description:
12 | A private, free and open source replacement for Google Maps and other geocoding services
13 | that relies on Pelias, which you can run on your own server. It uses the pelias-api to fetch results to your phone, allowing
14 | you to search for places in Acastus. Then open and navigate to the result in your preferred
15 | navigation app, such as OsmAnd or Maps.me.
16 |
17 | Repo Type:git
18 | Repo:https://github.com/DanielBarnett714/Acastus
19 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/earth.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | earth:
3 | data: { source: mapzen }
4 | draw:
5 | polygons:
6 | order: global.order
7 | color: [0.267,0.365,0.502]
8 | early:
9 | filter: { $zoom: { max: 7 } }
10 | draw:
11 | polygons:
12 | style: earth-early
13 | later:
14 | filter: { $zoom: { min: 7 } }
15 | draw:
16 | polygons:
17 | style: polygons
18 | color: [[7,[0.242,0.332,0.456]],[8,[0.212,0.302,0.431]]]
19 |
20 | styles:
21 | earth-early:
22 | base: polygons
23 | mix: [functions-zoom, polygons-diagonal-opaque-stripes]
24 | shaders:
25 | defines:
26 | ZOOM_START: 0.
27 | ZOOM_END: 6.5
28 | ZOOM_MAX: 6.
29 |
30 | STRIPES_ALPHA: 1.
31 | STRIPES_SCALE: mix(25.,50.,smoothstep(0.,1.,1.-zoom()))
32 | STRIPES_WIDTH: 1.-zoom()-.2
33 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
32 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013-2016 Mapzen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Mapzen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/components/fonts.yaml:
--------------------------------------------------------------------------------
1 | # Fonts
2 | fonts:
3 | Aldrich:
4 | - weight: normal # Regular
5 | # url: https://fonts.gstatic.com/s/aldrich/v6/VWXaIPGrUapL_Y2vGs0lKALUuEpTyoUstqEm5AMlJo4.woff
6 | url: fonts/VWXaIPGrUapL_Y2vGs0lKALUuEpTyoUstqEm5AMlJo4.woff
7 | Audiowide:
8 | - weight: normal # Regular
9 | # url: https://fonts.gstatic.com/s/audiowide/v4/8XtYtNKEyyZh481XVWfVOrO3LdcAZYWl9Si6vvxL-qU.woff
10 | url: fonts/8XtYtNKEyyZh481XVWfVOrO3LdcAZYWl9Si6vvxL-qU.woff
11 | Cairo:
12 | - weight: normal # Regular
13 | # url: https://fonts.gstatic.com/s/cairo/v1/ZA_4ooaF_Dfdn26t_IoQOaCWcynf_cDxXwCLxiixG1c.woff
14 | url: fonts/ZA_4ooaF_Dfdn26t_IoQOaCWcynf_cDxXwCLxiixG1c.woff
15 | Orbitron:
16 | - weight: normal # Regular
17 | # url: https://fonts.gstatic.com/s/orbitron/v7/94ug0rEgQO_WuI_xKJMFc3YhjbSpvc47ee6xR_80Hnw.woff
18 | url: fonts/94ug0rEgQO_WuI_xKJMFc3YhjbSpvc47ee6xR_80Hnw.woff
19 | Play:
20 | - weight: normal # Regular
21 | # url: https://fonts.gstatic.com/s/play/v7/IkErdnKw9ItVkLeeur9GHfesZW2xOQ-xsNqO47m55DA.woff
22 | url: fonts/IkErdnKw9ItVkLeeur9GHfesZW2xOQ-xsNqO47m55DA.woff
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_general.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
20 |
21 |
22 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
17 |
18 |
22 |
23 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/landuse-labels.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | # tuck this into existing landuse layer
3 | landuse:
4 | landuse-labels:
5 | filter:
6 | all:
7 | - label_placement: true
8 | - name: true
9 | draw:
10 | text:
11 | text_source: global.ux_language_text_source
12 | move_into_tile: true
13 | priority: 100
14 | visible: global.text_visible_landuse_generic
15 | interactive: global.sdk_interactive
16 | font:
17 | family: Cairo
18 | fill: [0.149,0.871,0.992]
19 | style: italic
20 | size: 11px
21 | pier:
22 | filter: { kind: [pier] }
23 | draw:
24 | icons:
25 | size: 18px
26 | sprite: function() { return feature.kind; }
27 | priority: 65
28 | visible: global.icon_visible_poi_landuse
29 | interactive: global.sdk_interactive
30 | text:
31 | font:
32 | family: Cairo
33 | fill: [0.345,0.953,0.769]
34 | size: 11px
35 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/boundaries-labels.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | boundaries:
3 | country:
4 | labels-z9-up:
5 | filter: { name: true, $zoom: { min: 9 }, not: { maritime_boundary: true } }
6 | draw:
7 | text:
8 | priority: 2
9 | visible: global.text_visible_admin
10 | text_source: global.ux_language_text_source_boundary_lines
11 | text_wrap: 100px
12 | font:
13 | family: Aldrich
14 | size: 9px
15 | fill: [0.369,0.624,1.000]
16 | transform: uppercase
17 |
18 | region:
19 | labels-z9-up:
20 | filter: { name: true, $zoom: { min: 9 }, not: { maritime_boundary: true } }
21 | draw:
22 | text-blend-order:
23 | priority: 3
24 | visible: global.text_visible_admin
25 | text_source: global.ux_language_text_source_boundary_lines
26 | text_wrap: 100px
27 | offset: 10px
28 | anchor: top
29 | font:
30 | family: Aldrich
31 | size: 9px
32 | fill: [0.369,0.624,1.000]
33 | transform: uppercase
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Acastus
2 | 
3 |
4 | [
](https://f-droid.org/app/me.dbarnett.acastus)
7 |
8 | [
](https://play.google.com/store/apps/details?id=me.dbarnett.acastus)
11 |
12 | Acastus is a completely private, free and open source Address / POI lookup application for android.
13 |
14 | Use it to find nearby places, all without the privacy invasions and tracking features of other
15 | apps.
16 |
17 | Share your location to other people, knowing full well that the information is kept private.
18 |
19 | Acastus relies on Pelias as the backend, a replacement for Google Maps and other geocoding services
20 | that you can run on your own server. It uses the pelias-api to fetch results to your phone, allowing
21 | you to search for places, then open and navigate to the result in your preferred
22 | navigation app such as OsmAnd or Maps.me.
23 |
24 | Details on setting up your own Pelias instance are here: https://github.com/pelias/pelias
25 |
26 | Donations are welcome and greatly appreciated:
27 |
28 | [Bitcoin](https://blockchain.info/address/1NjjuTxXm3ezpnVUGk4VmdEZUcym3SKZ8z)
29 |
30 | [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=VTUD5XRYMT686&lc=US&item_name=Acastus¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
31 |
32 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/boundaries.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | boundaries:
3 | data: { source: mapzen, layer: boundaries }
4 | draw:
5 | lines:
6 | order: global.order
7 |
8 | country:
9 | filter:
10 | kind: country
11 | draw:
12 | lines:
13 | width: [[1,0px],[2,0px],[3,0.5px],[9,2px],[16,4px],[17,14m]]
14 | color: black
15 | water:
16 | filter: { maritime_boundary: true }
17 | draw:
18 | lines:
19 | visible: false
20 |
21 | country_disputed:
22 | filter: { kind: [disputed, indefinite, indeterminate, lease_limit, line_of_control, overlay_limit] }
23 | draw:
24 | dashed:
25 | order: global.order
26 | color: black
27 | width: [[1, 0.2px], [3, 0px], [4, 1.0px], [9, 1.5px], [14, 2.5px], [16, 3.5px], [17, 10m]]
28 |
29 | region:
30 | filter:
31 | kind: region
32 | draw:
33 | lines:
34 | width: [[0,0px],[4,0px],[5,0.5px],[8,1px],[14,1.5px],[16,3.0px],[17,10m]]
35 | color: black
36 | water:
37 | filter: { maritime_boundary: true }
38 | draw:
39 | lines:
40 | visible: false
41 | early:
42 | filter: { not: { min_zoom: 2 }, $zoom: { max: 8 } }
43 | draw:
44 | lines:
45 | visible: false
46 |
47 | styles:
48 | dashed:
49 | base: lines
50 | dash: [1.25, 1.25]
51 | #dash_background_color: [0.808,0.860,0.851]
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_view_map.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
26 |
35 |
36 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
24 |
25 |
30 |
31 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Acastus
3 |
4 | 設定
5 |
6 | 場所を共有
7 | 設定
8 |
9 |
10 |
11 |
12 | 全般
13 |
14 | サーバー
15 |
16 | 場所を許可する
17 | あなたの場所を使用して、結果を戻します。
18 |
19 | 使用キロ
20 | 使用キロの代わりにマイル
21 |
22 | GoogleマップのURLを使用します
23 | 代わりに、ジオ・リンク・タイプのGoogleマップのURLを使用します
24 |
25 | 最近の結果を保存
26 | 最近の結果を保存して後で使用します。
27 |
28 | アプリのテーマ
29 | ダークテーマを使用します
30 |
31 | サーバーアドレス
32 |
33 | 最近の結果をクリア
34 |
35 | 地図/ナビゲーションアプリをインストールする必要があります。
36 |
37 | 私の現在の場所
38 |
39 | 共有した場所
40 |
41 | ナビゲート
42 |
43 | 住所/場所をクリップボードにコピー
44 |
45 | GPS 座標をクリップボードにコピー
46 |
47 | この場所を共有
48 |
49 | 私の場所を共有
50 |
51 | クリップボードにコピーしました
52 |
53 | 住所/場所の検索
54 |
55 | 住所/場所の共有
56 |
57 | 場所にアクセス中...
58 |
59 | 場所が有効ではありません
60 |
61 | 寄付する
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/java/me/dbarnett/acastus/MakeAPIRequest.java:
--------------------------------------------------------------------------------
1 | package me.dbarnett.acastus;
2 |
3 | import org.json.JSONException;
4 | import org.json.JSONObject;
5 |
6 | import java.io.BufferedReader;
7 | import java.io.IOException;
8 | import java.io.InputStreamReader;
9 | import java.net.HttpURLConnection;
10 | import java.net.URL;
11 |
12 | /**
13 | * Author: Daniel Barnett
14 | */
15 | public class MakeAPIRequest {
16 |
17 | /**
18 | * Fetch search results json object.
19 | *
20 | * @param searchQuery the search query
21 | * @return the json object
22 | * @throws IOException the io exception
23 | * @throws JSONException the json exception
24 | */
25 | public JSONObject fetchSearchResults(String searchQuery) throws IOException, JSONException {
26 | HttpURLConnection urlConnection = null;
27 | URL url = new URL(searchQuery);
28 | urlConnection = (HttpURLConnection) url.openConnection();
29 | urlConnection.setRequestMethod("GET");
30 | urlConnection.setReadTimeout(10000 /* milliseconds */);
31 | urlConnection.setConnectTimeout(15000 /* milliseconds */);
32 | urlConnection.setDoOutput(true);
33 | urlConnection.connect();
34 | BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
35 | String jsonString;
36 | StringBuilder sb = new StringBuilder();
37 | String line;
38 | while ((line = br.readLine()) != null) {
39 | sb.append(line + "\n");
40 | }
41 | br.close();
42 | jsonString = sb.toString();
43 | return new JSONObject(jsonString);
44 | }
45 |
46 | /**
47 | * Is json valid boolean.
48 | *
49 | * @param checkObject the check object
50 | * @return the boolean
51 | */
52 | public static boolean isJSONValid(JSONObject checkObject) {
53 | try {
54 | JSONObject geocoding = checkObject.getJSONObject("geocoding");
55 | JSONObject engine = geocoding.getJSONObject("engine");
56 | String engineName = engine.getString("name");
57 | if (!engineName.equals("Pelias")){
58 | return false;
59 | }
60 |
61 | } catch (JSONException ex) {
62 | return false;
63 | }
64 | return true;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
15 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
45 |
46 |
50 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Acastus
4 |
5 | Настройки
6 |
7 | Расшарить местоположение
8 | Настройки
9 |
10 |
11 |
12 |
13 | Общие
14 |
15 | Сервер
16 |
17 | Разрешить местоположение
18 | Исп-те ваше местоположение для результатов вокруг
19 |
20 | Исп-ть километры
21 | Исп-ть километры вместо миль
22 |
23 | Исп-ть Google Maps URL
24 | Исп-ть Google Maps URL вместо типа Geo link
25 |
26 | Сохранить последние
27 | Сохр-ть последн. рез-ты для дальн. исп-ия
28 |
29 | Тема приложения
30 | Исп-ть темную тему
31 |
32 |
33 | Адрес сервера
34 |
35 | Очистить недавние
36 |
37 | Должно быть установлено навигационное приложение.
38 |
39 | Текущее местоположение
40 |
41 | Расшаренное местоположение
42 |
43 | Навигация
44 |
45 | Копировать адрес/место в буфер
46 |
47 | Копировать GPS координаты в буфер
48 |
49 | Расшарить это местоположение
50 |
51 | Расшарить мое местоположение
52 |
53 | Скопировано в буфер
54 |
55 | Поиск адреса/места
56 |
57 | Расшарить адрес/место
58 |
59 | Доступ к местоположению
60 |
61 | Местоположение не включено
62 |
63 | Вознаградить
64 |
65 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Acastus
3 |
4 | Settings
5 |
6 | Share Location
7 | Settings
8 |
9 |
10 |
11 |
12 | General
13 |
14 | Server
15 |
16 | Allow Location
17 | Use your location to return results near you.
18 |
19 | Use kilometers
20 | Use kilometers instead of miles.
21 |
22 | Use Google Maps URL
23 | Use Google Maps URL instead of the Geo link type.
24 |
25 | Save Recents
26 | Save recent results for later use.
27 |
28 | App Theme
29 | Use Dark Theme
30 |
31 |
32 | Server Address
33 |
34 | https://search.mapzen.com
35 |
36 | API Key
37 |
38 | Clear Recents
39 |
40 | You must have a Maps/Navigation App installed.
41 |
42 | My Current Location
43 |
44 | Shared Location
45 |
46 | Navigate
47 |
48 | Copy address/place to clipboard
49 |
50 | Copy GPS coordinates to clipboard
51 |
52 | Share this location
53 |
54 | Share my location
55 |
56 | Copied to clipboard
57 |
58 | Search for address/place
59 |
60 | Share address/place
61 |
62 | Accessing location...
63 |
64 | Location not enabled
65 |
66 | Donate
67 |
68 |
69 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.8
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/styles/lines.yaml:
--------------------------------------------------------------------------------
1 | import:
2 | # Blocks
3 | - ../blocks/lines/glow.yaml
4 | - ../blocks/lines/dots.yaml
5 | - ../blocks/lines/dots-glow.yaml
6 |
7 | styles:
8 | lines-coast:
9 | base: lines
10 | texcoords: true
11 | blend: add
12 | shaders:
13 | defines:
14 | COAST_WAVES_AMOUNT: 5.
15 | COAST_WAVES_SPEED: 0.1
16 | COAST_WAVES_ANIMATED: true
17 | blocks:
18 | color: |
19 | float pct = 0.0;
20 | // glow
21 | pct = smoothstep(0.,2.,1.-v_texcoord.x);
22 | // waves
23 | #ifdef COAST_WAVES_ANIMATED
24 | pct += (1.-fract(v_texcoord.x*COAST_WAVES_AMOUNT+(fract(u_time*COAST_WAVES_SPEED))))*pct;
25 | #else
26 | pct += (1.-fract(v_texcoord.x*COAST_WAVES_AMOUNT))*pct;
27 | #endif
28 |
29 | color *= pct;
30 | lines-traffic-animation:
31 | base: lines
32 | mix: [generative-random, tron-palette, functions-zoom]
33 | texcoords: true
34 | shaders:
35 | defines:
36 | ZOOM_START: 11.
37 | ZOOM_END: 18.
38 | DATASTREAM_SPEED: 50.
39 | DATASTREAM_ROADS: 5.0
40 | DATASTREAM_MARGIN: z*.3
41 | DATASTREAM_COLOR: palette( fract(floor(v_texcoord.x*DATASTREAM_ROADS)/DATASTREAM_ROADS+u_time*.1)*z )
42 | DATASTREAM_AMOUNT: .8
43 | DATASTREAM_ANIMATED: global.sdk_animated
44 | blocks:
45 | global: |
46 | float datastream_pattern(vec2 st, float v, float t) {
47 | float p = floor(st.y+v);
48 | return step(t, (random(p*.000001)+random(p))*.5 );
49 | }
50 | color: |
51 | #ifdef DATASTREAM_ANIMATED
52 | vec2 st = v_texcoord.xy;
53 | float z = zoom();
54 | float datastream_speed = (-.5 * random(floor(v_texcoord.x*DATASTREAM_ROADS)) - .5);
55 |
56 | #ifdef DATASTREAM_TWOWAYS
57 | if (st.x < 0.5) {
58 | datastream_speed *= -1.;
59 | }
60 | #endif
61 |
62 | color.rgb = mix(color.rgb,
63 | DATASTREAM_COLOR,
64 | z*
65 | datastream_pattern( st,
66 | (u_time*DATASTREAM_SPEED)*datastream_speed,
67 | DATASTREAM_AMOUNT)*
68 | smoothstep(DATASTREAM_MARGIN,1.,sin(fract(v_texcoord.x*DATASTREAM_ROADS)*3.1415))
69 | );
70 | #endif
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/lib/leaflet-hash.js:
--------------------------------------------------------------------------------
1 | (function(window) {
2 |
3 | L.Hash = function(map) {
4 |
5 | if (map) {
6 | this.init(map);
7 | }
8 | };
9 |
10 | L.Hash.parseHash = function(hash) {
11 | if(hash.indexOf('#') === 0) {
12 | hash = hash.substr(1);
13 | }
14 | var args = hash.split("/");
15 | if (args.length == 3) {
16 | var zoom = parseInt(args[0], 10),
17 | lat = parseFloat(args[1]),
18 | lon = parseFloat(args[2]);
19 | if (isNaN(zoom) || isNaN(lat) || isNaN(lon)) {
20 | return false;
21 | } else {
22 | return {
23 | center: new L.LatLng(lat, lon),
24 | zoom: zoom
25 | };
26 | }
27 | } else {
28 | return false;
29 | }
30 | };
31 |
32 | L.Hash.formatHash = function(map) {
33 | var center = map.getCenter(),
34 | zoom = map.getZoom(),
35 | precision = Math.max(0, Math.ceil(Math.log(zoom) / Math.LN2));
36 |
37 | // cap zoom at 5 digits for beauty
38 | return "#" + [parseFloat(zoom.toFixed(5)),
39 | center.lat.toFixed(precision),
40 | center.lng.toFixed(precision)
41 | ].join("/");
42 | },
43 |
44 | L.Hash.prototype = {
45 | map: null,
46 | lastHash: null,
47 |
48 | parseHash: L.Hash.parseHash,
49 | formatHash: L.Hash.formatHash,
50 |
51 | init: function(map) {
52 | this.map = map;
53 |
54 | // reset the hash
55 | this.lastHash = null;
56 |
57 | if (!this.isListening) {
58 | this.startListening();
59 | }
60 | },
61 |
62 | removeFrom: function(map) {
63 | if (this.changeTimeout) {
64 | clearTimeout(this.changeTimeout);
65 | }
66 |
67 | if (this.isListening) {
68 | this.stopListening();
69 | }
70 |
71 | this.map = null;
72 | },
73 |
74 | // defer hash change updates every changeDefer milliseconds
75 | changeDefer: 250,
76 | changeTimeout: null,
77 | onMapMove: function() {
78 | // bail if we're moving the map (updating from a hash),
79 | // or if the map is not yet loaded
80 | if (this.movingMap || !this.map._loaded) {
81 | return false;
82 | }
83 |
84 | var hash = this.formatHash(this.map);
85 | if (this.lastHash != hash) {
86 | this.lastHash = hash;
87 | }
88 | if (!this.changeTimeout) {
89 | var that = this;
90 | this.changeTimeout = setTimeout(function() {
91 |
92 | // update the hash
93 | window.location.replace(hash);
94 |
95 | that.changeTimeout = null;
96 | }, this.changeDefer);
97 | }
98 | },
99 |
100 | movingMap: false,
101 |
102 | isListening: false,
103 | startListening: function() {
104 | this.map.on("moveend", this.onMapMove, this);
105 |
106 | this.isListening = true;
107 | },
108 |
109 | stopListening: function() {
110 | this.map.off("moveend", this.onMapMove, this);
111 |
112 | this.isListening = false;
113 | }
114 | };
115 | L.hash = function(map) {
116 | return new L.Hash(map);
117 | };
118 | L.Map.prototype.addHash = function() {
119 | this._hash = L.hash(this);
120 | };
121 | L.Map.prototype.removeHash = function() {
122 | this._hash.removeFrom();
123 | };
124 | })(window);
125 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/transit.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | transit:
3 | data: { source: mapzen, layer: transit }
4 | transit-lines:
5 | filter: { not: { kind: [platform] } }
6 | draw:
7 | lines:
8 | order: global.order
9 | railway:
10 | filter: { kind: [railway,train] }
11 | draw:
12 | lines:
13 | style: railway-dashed
14 | color: [0.267,0.000,0.427]
15 | width: [[9,0.5px],[14,0.5px],[16,0.5px],[18,0.75px],[19,2px]]
16 | subway:
17 | filter: { kind: [subway,tram,light_rail] }
18 | draw:
19 | lines:
20 | style: transit-glow
21 | color: [1.00,0.000,0.250]
22 | width: [[9,0.5px],[13,2px],[16,5px],[18,9px],[20,12px]]
23 | color-light_rail:
24 | filter: { kind: [light_rail] }
25 | draw:
26 | lines:
27 | color: [0.817,0.000,1.000]
28 | width: [[9,0.5px],[13,1px],[16,3px],[18,7px],[20,10px]]
29 | color-tram:
30 | filter: { kind: [tram] }
31 | draw:
32 | lines:
33 | color: [0.817,0.000,1.000]
34 | width: [[9,0.5px],[13,0.75px],[16,2px],[18,6px],[20,9px]]
35 | early-light_rail:
36 | filter: { kind: [light_rail], $zoom: { max: 11 } }
37 | draw:
38 | lines:
39 | visible: false
40 | early-tram:
41 | filter: { kind: [tram], $zoom: { max: 12 } }
42 | draw:
43 | lines:
44 | visible: false
45 |
46 | platforms:
47 | filter: { kind: platform }
48 | draw:
49 | lines_transparent:
50 | order: function() { if($zoom<17) { return feature.sort_rank; } else { return 435; } }
51 | color: [0.278,0.412,1.000,0.20]
52 | width: 5m
53 | visible: true
54 | polygons_transparent:
55 | order: function() { if($zoom<17) { return feature.sort_rank; } else { return 435; } }
56 | polygon_geom:
57 | filter: { $geometry: polygon }
58 | draw:
59 | polygons_transparent:
60 | color: [0.278,0.412,1.000,0.20]
61 | visible: true
62 | lines_transparent:
63 | visible: false
64 |
65 | styles:
66 | transit-glow:
67 | base: lines
68 | mix: [lines-glow]
69 | shaders:
70 | defines:
71 | GLOW_WIDTH: 0.5
72 | GLOW_BRIGHTNESS: .4
73 |
74 | railway-dashed:
75 | base: lines
76 | dash: [6,2]
77 | dash_background_color: [0.212,0.302,0.427]
78 | # shaders:
79 | # blocks:
80 | # position: |
81 | # v_texcoord.y *= 11.;
82 |
83 | lines_transparent:
84 | base: lines
85 | blend: overlay
86 |
87 | polygons_transparent:
88 | base: polygons
89 | blend: overlay
90 |
--------------------------------------------------------------------------------
/app/src/main/java/me/dbarnett/acastus/AppCompatPreferenceActivity.java:
--------------------------------------------------------------------------------
1 | package me.dbarnett.acastus;
2 |
3 | import android.content.res.Configuration;
4 | import android.os.Bundle;
5 | import android.preference.PreferenceActivity;
6 | import android.support.annotation.LayoutRes;
7 | import android.support.annotation.Nullable;
8 | import android.support.v7.app.ActionBar;
9 | import android.support.v7.app.AppCompatDelegate;
10 | import android.support.v7.widget.Toolbar;
11 | import android.view.MenuInflater;
12 | import android.view.View;
13 | import android.view.ViewGroup;
14 |
15 | /**
16 | * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
17 | * to be used with AppCompat.
18 | */
19 | public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
20 |
21 | private AppCompatDelegate mDelegate;
22 |
23 | @Override
24 | protected void onCreate(Bundle savedInstanceState) {
25 | getDelegate().installViewFactory();
26 | getDelegate().onCreate(savedInstanceState);
27 | super.onCreate(savedInstanceState);
28 | }
29 |
30 | @Override
31 | protected void onPostCreate(Bundle savedInstanceState) {
32 | super.onPostCreate(savedInstanceState);
33 | getDelegate().onPostCreate(savedInstanceState);
34 | }
35 |
36 | public ActionBar getSupportActionBar() {
37 | return getDelegate().getSupportActionBar();
38 | }
39 |
40 | public void setSupportActionBar(@Nullable Toolbar toolbar) {
41 | getDelegate().setSupportActionBar(toolbar);
42 | }
43 |
44 | @Override
45 | public MenuInflater getMenuInflater() {
46 | return getDelegate().getMenuInflater();
47 | }
48 |
49 | @Override
50 | public void setContentView(@LayoutRes int layoutResID) {
51 | getDelegate().setContentView(layoutResID);
52 | }
53 |
54 | @Override
55 | public void setContentView(View view) {
56 | getDelegate().setContentView(view);
57 | }
58 |
59 | @Override
60 | public void setContentView(View view, ViewGroup.LayoutParams params) {
61 | getDelegate().setContentView(view, params);
62 | }
63 |
64 | @Override
65 | public void addContentView(View view, ViewGroup.LayoutParams params) {
66 | getDelegate().addContentView(view, params);
67 | }
68 |
69 | @Override
70 | protected void onPostResume() {
71 | super.onPostResume();
72 | getDelegate().onPostResume();
73 | }
74 |
75 | @Override
76 | protected void onTitleChanged(CharSequence title, int color) {
77 | super.onTitleChanged(title, color);
78 | getDelegate().setTitle(title);
79 | }
80 |
81 | @Override
82 | public void onConfigurationChanged(Configuration newConfig) {
83 | super.onConfigurationChanged(newConfig);
84 | getDelegate().onConfigurationChanged(newConfig);
85 | }
86 |
87 | @Override
88 | protected void onStop() {
89 | super.onStop();
90 | getDelegate().onStop();
91 | }
92 |
93 | @Override
94 | protected void onDestroy() {
95 | super.onDestroy();
96 | getDelegate().onDestroy();
97 | }
98 |
99 | public void invalidateOptionsMenu() {
100 | getDelegate().invalidateOptionsMenu();
101 | }
102 |
103 | private AppCompatDelegate getDelegate() {
104 | if (mDelegate == null) {
105 | mDelegate = AppCompatDelegate.create(this, null);
106 | }
107 | return mDelegate;
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/buildings-labels.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | # tuck this into existing buildings layer
3 | buildings:
4 | buildings-labels:
5 | filter:
6 | all:
7 | - { $zoom: { min: 17 } }
8 | - $geometry: point
9 | - not: { location: underground, kind: address }
10 | - name: true
11 | - function() { return global.text_visible_building; }
12 | # - kind: [false, building, university, college, school, kindergarten]
13 | any:
14 | - { $zoom: [16], area: { min: 5000 } }
15 | - { $zoom: [16], area: { min: 5000 } }
16 | - { $zoom: [16], area: { min: 10000 }, landuse_kind: true }
17 | - { $zoom: [16], area: { min: 7000 }, kind: [university, college, school, kindergarten] }
18 | - { $zoom: [16], volume: { min: 50000 }, name: true }
19 | - { $zoom: [17], area: { min: 3000 } }
20 | - { $zoom: [17], area: { min: 2000 }, kind: [university, college, school, kindergarten] }
21 | - { $zoom: [18], area: { min: 1000 } }
22 | - { $zoom: [18], kind: [university, college, school, kindergarten] }
23 | - { $zoom: [19], area: { min: 200 } }
24 | - { $zoom: { min: 19 }, kind: [university, college, school, kindergarten] }
25 | - { $zoom: { min: 20 }, area: true }
26 | draw:
27 | text:
28 | text_source: global.ux_language_text_source
29 | interactive: global.sdk_interactive
30 | move_into_tile: true
31 | priority: 70
32 | order: 7
33 | font:
34 | fill: [0.882,0.894,0.914]
35 | family: Aldrich
36 | size: [[17,10px],[18,11px],[20,12px]]
37 | building-labels-z16:
38 | filter: function() { if( $zoom == 16 && feature.name.length > 20 ) { return true; } else { return false; } }
39 | draw:
40 | text:
41 | visible: false
42 | building-labels-z17:
43 | filter: function() { if( $zoom == 17 && feature.name.length > 30 ) { return true; } else { return false; } }
44 | draw:
45 | text:
46 | visible: false
47 | building-labels-z20+:
48 | filter: { $zoom: { min: 20 } }
49 | draw:
50 | text:
51 | text_source: global.ux_language_text_source_building_and_address
52 | address-labels:
53 | data: { source: mapzen, layer: buildings }
54 | filter:
55 | all:
56 | - $zoom: { min: 20 }
57 | - function() { return global.text_visible_address; }
58 | any:
59 | - kind: address
60 | - { label_position: yes, addr_housenumber: true, name: false }
61 | draw:
62 | text:
63 | text_source: global.ux_language_text_source
64 | interactive: global.sdk_interactive
65 | order: 7
66 | text_source: addr_housenumber
67 | font:
68 | fill: [0.882,0.894,0.914]
69 | family: Cairo
70 | size: 10px
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/styles/polygons.yaml:
--------------------------------------------------------------------------------
1 | import:
2 | # Blocks
3 | - ../blocks/elevation/stripes.yaml
4 | - ../blocks/elevation/dash.yaml
5 | - ../blocks/polygons/dots.yaml
6 | - ../blocks/tiling/simplex.yaml
7 | - ../blocks/generative/noise.yaml
8 | - ../blocks/polygons/stripes.yaml
9 | - ../blocks/polygons/diagonal-stripes.yaml
10 | - ../blocks/polygons/diagonal-grid.yaml
11 | # Utils
12 | - ../blocks/geometry/normal.yaml
13 |
14 | styles:
15 | polygons-diagonal-opaque-stripes:
16 | base: polygons
17 | mix: [polygons-diagonal-stripes]
18 | shaders:
19 | defines:
20 | BACKGROUND_COLOR: vec3(0.)
21 | blocks:
22 | filter: |
23 | color.rgb = mix(BACKGROUND_COLOR,color.rgb, color.a);
24 | color.a = 1.;
25 |
26 | polygons-building-wall:
27 | base: polygons
28 | mix: [functions-zoom, geometry-normal,generative-random, tron-palette, geometry-dynamic-height]
29 | texcoords: true
30 | blend: add
31 | shaders:
32 | defines:
33 | ZOOM_START: 16.
34 | ZOOM_END: 20.
35 | WALL_LINES_COLOR: vec3(0.181,0.259,0.370)
36 | WALL_PCT: 1.
37 | WALL_HEIGHT: .5
38 | blocks:
39 | color: |
40 | if (isWall()) {
41 | float r = 0.1+random(color.r)*.9;
42 | float g = 0.1+random(color.g)*.9;
43 | float b = 0.1+random(color.b)*.9;
44 | float z = zoom();
45 |
46 | float lineWidth = 0.003*z;
47 | color = mix(vec4(0.),
48 | vec4(WALL_LINES_COLOR,1.),
49 | 1.0-(step(lineWidth,v_texcoord.x)-step(1.0-lineWidth,v_texcoord.x))*
50 | (step(lineWidth,v_texcoord.y)-step(1.0-lineWidth,v_texcoord.y)) );
51 | vec2 st = v_texcoord.xy;
52 | if (r > 0.5 ) st = vec2(v_texcoord.x, worldPosition().z*0.01);
53 | if (g > 0.5 ) st *= mix(10.,50.,random(g));
54 | if (b > 0.5 ) st.x += step(1., mod(st.y,2.0)) * 0.5;
55 |
56 | float n = random(floor(st));
57 | color = mix(color,
58 | mix(vec4(WALL_LINES_COLOR, n),
59 | vec4(palette(r), 1.)*n,
60 | z),
61 | mix(.15,WALL_PCT,z)-v_texcoord.y*WALL_HEIGHT);
62 | } else {
63 | color = vec4(0.);
64 | }
65 | polygons-shimmering:
66 | base: polygons
67 | mix: [functions-zoom, tiling-simplex, generative-noise]
68 | shaders:
69 | defines:
70 | ZOOM_START: 11.
71 | ZOOM_END: 20.
72 | SHIMMERING_ZOOM_IN: 0.01
73 | SHIMMERING_ZOOM_OUT: 30.
74 |
75 | SHIMMERING_SCALE: 1.
76 | SHIMMERING_COLOR: color.rgb
77 | SHIMMERING_BACKGROUND_COLOR: color.rgb*.5
78 | SHIMMERING_SPEED: 0.1
79 | SHIMMERING_AMOUNT: 1.
80 | SHIMMERING_ANIMATED: true
81 |
82 | SPACE_CONSTANT_PIXEL_SCALE: 695.
83 | SPACE_CONSTANT_DOT_WRAP: 1e4
84 | blocks:
85 | color: |
86 | float z = mix(SHIMMERING_ZOOM_IN, SHIMMERING_ZOOM_OUT, zoom());
87 | vec2 S = skew((worldPosition().xy*(floor(z)*0.001)*SHIMMERING_SCALE));
88 | vec2 S_f = fract(S);
89 | #ifdef SHIMMERING_ANIMATED
90 | float n = snoise(vec3(floor(S+step(S_f.x,S_f.y)*5.),u_time*SHIMMERING_SPEED));
91 | #else
92 | float n = snoise(floor(S+step(S_f.x,S_f.y)*5.));
93 | #endif
94 | color.rgb = mix(SHIMMERING_COLOR,
95 | mix(SHIMMERING_BACKGROUND_COLOR,SHIMMERING_COLOR,n),
96 | SHIMMERING_AMOUNT);
97 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/buildings.yaml:
--------------------------------------------------------------------------------
1 | global:
2 | building_style: buildings_with_labels
3 | building_lines_with_or_without_labels: [0.512,0.594,0.840]
4 |
5 | layers:
6 | buildings:
7 | data: { source: mapzen }
8 | filter:
9 | not: { location: underground }
10 | draw:
11 | polygons:
12 | visible: false
13 | order: global.order
14 | # order: 6580
15 | color: [0.212,0.302,0.431]
16 | lines:
17 | style: lines
18 | order: global.order_add_1
19 | # order: 6600
20 | visible: false
21 | # color: [0.412,0.686,0.859]
22 | color: [0.004,0.165,0.933]
23 | width: 1px
24 | footprints:
25 | filter:
26 | any:
27 | # show footprints for buildings at least one zoom level before they will be extruded
28 | - { $zoom: [14], scale_rank: [0,1,2,3] }
29 | # - { $zoom: [14], area: { min: 5000 } }
30 | # - { $zoom: [14], height: { min: 190 } }
31 | # - { $zoom: [14], volume: { min: 150000 } }
32 | - { $zoom: [15], height: { min: 100 } }
33 | - { $zoom: [15], area: { min: 2500 } }
34 | - { $zoom: [15], volume: { min: 100000 } }
35 | - { $zoom: [15], scale_rank: [0,1,2,3] }
36 | - { $zoom: { min: 16 }, area: true }
37 | draw:
38 | polygons:
39 | color: [0.212,0.302,0.431]
40 | visible: true
41 | lines:
42 | color: [0.392,0.627,0.651]
43 | width: [[14,0.55px],[16,0.5px]]
44 | visible: true
45 | # before zoom 15, we want buidings to be below roads...
46 | # (once they extrude, then we want them to be above roads, which is the default data value)
47 | before_z15:
48 | filter:
49 | $zoom: { max: 16 }
50 | draw:
51 | polygons:
52 | order: 5800 #290 * 20
53 | lines:
54 | order: 5820 #291 * 20
55 |
56 | extrude:
57 | filter:
58 | all:
59 | - function() { return global.sdk_building_extrude; }
60 | - $zoom: { min: 16 }
61 | - any:
62 | - { $zoom: [16], height: { min: 60 } }
63 | - { $zoom: [16], area: { min: 1200 } }
64 | - { $zoom: [16], volume: { min: 70000 } }
65 | - { $zoom: { min: 17 } }
66 | draw:
67 | polygons:
68 | visible: true
69 | style: global.building_style
70 | color: global.pseudoRandomColor
71 | # color: [0.592,0.827,0.851]
72 | extrude: global.building_extrude_height
73 | lines:
74 | visible: true
75 | style: buildings-lns
76 | color: [[16,[0.428,0.687,0.717]],[18,global.building_lines_with_or_without_labels]]
77 | width: [[12, .1px], [14, 0.1px], [16, 0.75px], [17, 0.85px], [18, 1.0px]]
78 | extrude: global.building_extrude_height
79 |
80 | styles:
81 | geometry-dynamic-height:
82 | shaders:
83 | defines:
84 | ZOOM_START: 16.0
85 | ZOOM_END: 20.0
86 | HEIGHT_MIN: .0
87 | HEIGHT_MAX: 2.0
88 |
89 | buildings_with_labels:
90 | base: polygons
91 | mix: [polygons-building-wall]
92 | texcoords: true
93 | blend: add
94 | shaders:
95 | defines:
96 | WALL_PCT: .85
97 | WALL_HEIGHT: .85
98 |
99 | buildings_no_labels:
100 | base: polygons
101 | mix: [polygons-building-wall]
102 | texcoords: true
103 | blend: add
104 | shaders:
105 | defines:
106 | WALL_PCT: 1.0
107 |
108 | buildings-lns:
109 | base: lines
110 | mix: [geometry-dynamic-width, geometry-dynamic-height]
111 | shaders:
112 | defines:
113 | ZOOM_START: 16.
114 | ZOOM_END: 20.
115 | WIDTH_MIN: .7
116 | WIDTH_MAX: 1.0
117 |
118 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/tron-style.yaml:
--------------------------------------------------------------------------------
1 | import:
2 | # Components
3 | - components/globals.yaml
4 | - components/fonts.yaml
5 |
6 | # Styles
7 | - styles/common.yaml
8 | - styles/points.yaml
9 | - styles/lines.yaml
10 | - styles/polygons.yaml
11 |
12 | # Layers
13 | - layers/water.yaml
14 | - layers/water-labels.yaml
15 | - layers/earth.yaml
16 | - layers/earth-labels.yaml
17 | - layers/roads.yaml
18 | - layers/roads-labels.yaml
19 | - layers/transit.yaml
20 | - layers/transit-overlay.yaml
21 | - layers/buildings.yaml
22 | - layers/buildings-labels.yaml
23 | - layers/landuse.yaml
24 | - layers/landuse-labels.yaml
25 | - layers/boundaries.yaml
26 | - layers/boundaries-labels.yaml
27 | - layers/places.yaml
28 | - layers/pois.yaml
29 | - layers/ux-sdk-overlay.yaml
30 |
31 | # Sources
32 | sources:
33 | mapzen:
34 | type: MVT
35 | url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt
36 | url_params:
37 | api_key: global.sdk_mapzen_api_key
38 | rasters: [normals-elevation]
39 | max_zoom: 16
40 | normals-elevation:
41 | type: Raster
42 | url: https://tile.mapzen.com/mapzen/terrain/v1/normal/{z}/{x}/{y}.png
43 | url_params:
44 | api_key: global.sdk_mapzen_api_key
45 | max_zoom: 15
46 |
47 | # Only enable this for local debug, should not be enabled for prod (app inserts these at runtime)
48 | # These are all in San Francisco, California
49 | #
50 | # Current location gem
51 | # mz_current_location:
52 | # type: GeoJSON
53 | # url: https://gist.githubusercontent.com/anonymous/9e9588228b0a604264a2/raw/b28be49bea0b7feb859eb65b588c28e9fee5ae2c/map.geojson
54 | # # Route line
55 | # mz_route_line:
56 | # type: GeoJSON
57 | # # sf to ny
58 | # url: https://gist.githubusercontent.com/anonymous/30c6c1a75c168d91d90c/raw/92bfe55e622766d250b1f2f5d17bdc7c26acb956/map.geojson
59 | # # local sf trip
60 | # # url: https://gist.githubusercontent.com/anonymous/9a610ebda6fe4be7bccc/raw/8d217e43f2412d48d01534ba115f1e42dac72e68/map.geojson
61 | # # Dashed route line
62 | # mz_dash_line:
63 | # type: GeoJSON
64 | # url: https://gist.githubusercontent.com/anonymous/d73b851c64c3e5fbfc2754aa32f44c10/raw/938ae435776e176919c4797bed1465a92e403ef3/map.geojson
65 | # # Transit route line
66 | # mz_route_line_transit:
67 | # type: GeoJSON
68 | # url: https://gist.githubusercontent.com/anonymous/71ae88cbc6d62c4d141ecd6a61060050/raw/2254bbc18243f5dc609e663a580c9412a7447936/map.geojson
69 | # # Pin at start of route
70 | # mz_route_start:
71 | # type: GeoJSON
72 | # url: https://gist.githubusercontent.com/anonymous/5262969cb7549ea69221/raw/be03f233fa323d9b5cf50ef1d8e89a1faa3750f1/map.geojson
73 | # # Pin at end of route
74 | # mz_route_destination:
75 | # type: GeoJSON
76 | # url: https://gist.githubusercontent.com/anonymous/dbae9635dfe46796490e/raw/df55c318635a7d91b309ed40754d4738a292fd38/map.geojson
77 | # # Arrow for current route location
78 | # mz_route_location:
79 | # type: GeoJSON
80 | # url: https://gist.githubusercontent.com/anonymous/36613092be6e2aa004fd/raw/f753d13069425199e1dea1b449ef67d723f6510e/map.geojson
81 | # # Dots for transit stops in route preview
82 | # mz_route_transit_stop:
83 | # type: GeoJSON
84 | # url: https://gist.githubusercontent.com/anonymous/b9f16bca4a804f50faf71277d52ee4ab/raw/db13e4e765fa1ac8844b8ba02f4a0f66fe772907/map.geojson
85 | # # Pins showing search result locations
86 | # mz_search_result:
87 | # type: GeoJSON
88 | # url: https://gist.githubusercontent.com/anonymous/57dc09eeb120919f76de/raw/43426217da3c2bae0522dc4257aaa61e4df3981e/map.geojson
89 | # # Default point styling (SDK)
90 | # mz_default_point:
91 | # type: GeoJSON
92 | # url: https://gist.githubusercontent.com/anonymous/16324c771edfce45be0721390389b878/raw/7dbaebf17da7da8562e6c6f8768bc8cff83efa88/map.geojson
93 | # # Default shield styling (SDK)
94 | # mz_default_shield:
95 | # type: GeoJSON
96 | # url: https://gist.githubusercontent.com/anonymous/5a789f6bd8b51b5693ba9cd57a767aa1/raw/d4523a6c9deebca125298c31085958262caa1ecd/map.geojson
97 | # # Default line styling (SDK)
98 | # mz_default_line:
99 | # type: GeoJSON
100 | # url: https://gist.githubusercontent.com/anonymous/26f4e8b6b34b2617b5d5533d89decb39/raw/df8e180ab4f7f19448014dccc4a755f7cfa20003/map.geojson
101 | # # Default polygon styling (SDK)
102 | # mz_default_polygon:
103 | # type: GeoJSON
104 | # url: https://gist.githubusercontent.com/anonymous/88235c795bb44b8c45150bdd5561f947/raw/71d4fab97b6513833bf1a589167119e6169ef86d/map.geojson
105 |
106 | # Camera
107 | cameras:
108 | cam:
109 | type: perspective
110 |
111 | scene:
112 | animated: global.sdk_animated
113 | background:
114 | color: '#364d6d'
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/README.md:
--------------------------------------------------------------------------------
1 | # Tangram Cinnabar Style
2 |
3 | **Cinnabar** is a classic look and should be your go-to for general mapping applications. Give [OpenStreetMap](http://www.openstreetmap.org/) data a refined basemap skin using the [Tangram](http://github.com/tangrams/tangram) graphics library and Mapzen's versatile [Vector Tiles](https://mapzen.com/projects/vector-tiles/).
4 |
5 | This style is a High Road influenced evolution of the [Traditional](http://tangrams.github.io/tangram/#mapzen,40.70531887544228,-74.0097749233246,16) style [Stamen](http://stamen.com/) created for Mapzen's [Open](https://mapzen.com/blog/we-made-an-app) Android app in 2014. Please use and adapt the open source scene file in your own projects!
6 |
7 | **Looking for help?** There is a mini tutorial after the preview image below walking thru [Vector Tiles API key signup](https://github.com/tangrams/cinnabar-style-no-labels/blob/gh-pages/README.md#sign-up-for-a-vector-tiles-api-key) and [building a Leaflet map](https://github.com/tangrams/cinnabar-style-no-labels/blob/gh-pages/README.md#building-a-leaflet-map-using-tangram-and-this-scene-file) using Tangram and this repo's scene file.
8 |
9 | ### A family of styles with many flavours
10 |
11 | Mapzen offers the Cinnabar style in three flavors:
12 |
13 | 2. **Default** (this repo) - Some labels for streets, cities, water bodies, and some big parks with name only (no icons). No business labels. Good for data visualization overlays that need to provide some location context.
14 | 1. **[More labels](https://github.com/tangrams/cinnabar-style-more-labels)** - Full set of labels, including high contrast icons highlighting OpenStreetMap business listing data.
15 | 3. **[No labels](https://github.com/tangrams/cinnabar-style-no-labels)** - Just the lines and polygons, please.
16 |
17 | **Looking for a different style?** We offer a range of styles including [Refill](https://github.com/tangrams/refill) (high contrast black & white cartography) and [Zinc](https://github.com/tangrams/zinc-style) (soft gray cartography).
18 |
19 |
20 | **Live Cinnabar demo:** http://tangrams.github.io/cinnabar-style
21 |
22 | 
23 |
24 |
25 | ## Developer resources
26 |
27 | **So how do you actually use this stuff?** Tangram styles are called "scenes" and are written in YAML. The scene file (e.g.: [cinnabar-style.yaml](https://github.com/tangrams/cinnabar-style/blob/gh-pages/cinnabar-style.yaml)) requires a vector tile source. To use Mapzen's vector tile service you must first obtain a free developer API key and update your scene file with that key.
28 |
29 | ### Sign up for a Mapzen Vector Tiles API key
30 |
31 | **Mapzen Vector Tiles are a free, shared tile service.** As such, there are generous limitations on requests to prevent individual users from degrading the overall system performance.
32 |
33 | 1. Go to https://mapzen.com/developers.
34 | 2. Sign in with your GitHub account. If you have not done this before, you need to agree to the terms first.
35 | 3. Create a new key for Vector Tiles, and optionally, give it a project name so you can remember the purpose of the key.
36 | 4. Keep the web page open so you can copy the key into your source code later.
37 |
38 | ### Building a Leaflet map using Tangram
39 |
40 | Using Tangram and Mapzen's Vector tiles inside the popular [Leaflet](http://leafletjs.com) mapping framework is easy. We'll make it even easier soon to do this via a Leaflet [provider](https://github.com/leaflet-extras/leaflet-providers), but in the meantime...
41 |
42 | 1. Update your copy of the scene file on [line 453](https://github.com/tangrams/cinnabar-style/blob/gh-pages/cinnabar-style.yaml#L453) to reference the API key you created in Step 3 in the **Sign up** section above.
43 | `url: //vector.mapzen.com/osm/all/{z}/{x}/{y}.topojson?api_key=vector-tiles-{your-api-key-here}`
44 | 2. Reference the [index-demo.html](index-demo.html) file in any of the style repos for how to configure Leaflet with Tangram and the scene file (e.g.: [Cinnabar](http://github.com/tangrams/cinnabar-style)).
45 | 3. Looking for a more sophisticated implementation that includes basic search? The main [index.html](index.html) file has a more real world example.
46 | 4. Need help testing your map locally? See the README in each repo.
47 | 5. Wondering where to host your map? Make a public repo on Github (or fork ours!) and enjoy their [GitHub Pages](https://pages.github.com) to github.io magic dance.
48 |
49 | ### Tangram resources
50 |
51 | 1. [Procedural Cartography with Tangram](https://github.com/mapzen/presentations/tree/master/08-2015-JSGEO) Patricio's presentation notes from [JS.Geo](http://www.jsgeo.com) metope in August 2015.
52 | 2. [Walkthrough: Make a map with Tangram](https://mapzen.com/documentation/tangram/walkthrough/) by Rhonda on Mapzen's documentation team.
53 |
54 | ### To run locally
55 |
56 | Want to modify the style to fit your needs? Clone or downloaded the repo locally. Then...
57 |
58 | Start a web server in the repo's directory:
59 |
60 | python -m SimpleHTTPServer 8000
61 |
62 | If that doesn't work, try:
63 |
64 | python -m http.server 8000
65 |
66 | Then navigate to: [http://localhost:8000](http://localhost:8000), which loads the [index.html](index.html) file.
67 |
68 |
69 | **You should be all set, happy mapping!** But please let us know at [hello@mapzen.com](mailto:hello@mapzen.com) or via Twitter [@mapzen](http://twitter.com/mapzen) if you encounter any funk and we'll help you get up and running.
70 |
71 | ### See also:
72 |
73 | * Blog post announcing this style...
74 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/java/me/dbarnett/acastus/GeoLocation.java:
--------------------------------------------------------------------------------
1 | package me.dbarnett.acastus;
2 |
3 | import android.content.Context;
4 | import android.location.Criteria;
5 | import android.location.Location;
6 | import android.location.LocationListener;
7 | import android.location.LocationManager;
8 | import android.os.Bundle;
9 | import android.os.Handler;
10 | import android.os.Looper;
11 | import android.widget.Toast;
12 | import java.math.BigDecimal;
13 | import java.math.RoundingMode;
14 | import java.util.Timer;
15 | import java.util.TimerTask;
16 |
17 | /**
18 | * Author: Daniel Barnett
19 | */
20 | public class GeoLocation implements LocationListener{
21 | /**
22 | * The Location manager.
23 | */
24 | public LocationManager locationManager;
25 |
26 | Context context;
27 |
28 |
29 | /**
30 | * Instantiates a new Geo location.
31 | *
32 | * @param locationManager the location manager
33 | */
34 | GeoLocation(LocationManager locationManager, Context context) {
35 | this.locationManager = locationManager;
36 | this.context = context;
37 | updateLocation();
38 |
39 |
40 | }
41 |
42 | public void updateLocation(){
43 | Criteria criteria = new Criteria();
44 | String bestProvider = String.valueOf(locationManager.getBestProvider(criteria, true)).toString();
45 | try {
46 | locationManager.requestLocationUpdates(bestProvider, 60000, 15, this);
47 | Handler h = new Handler(Looper.getMainLooper());
48 | h.post(new Runnable() {
49 | public void run() {
50 | Toast.makeText(context, R.string.accessing_location, Toast.LENGTH_SHORT).show();
51 | }
52 | });
53 | }catch (SecurityException e){
54 |
55 | }
56 |
57 | }
58 |
59 |
60 |
61 | /**
62 | * Distance double.
63 | *
64 | * @param lat1 the lat 1
65 | * @param lat2 the lat 2
66 | * @param lon1 the lon 1
67 | * @param lon2 the lon 2
68 | * @return the double
69 | */
70 | public static double distance(double lat1, double lat2, double lon1, double lon2, boolean kilometers) {
71 | final int R = 6371; // Radius of the earth
72 | Double latDistance = Math.toRadians(lat2 - lat1);
73 | Double lonDistance = Math.toRadians(lon2 - lon1);
74 | Double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)
75 | + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))
76 | * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);
77 | Double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
78 | double distance = R * c * 1000; // convert to meters
79 | distance = Math.pow(distance, 2);
80 | if (kilometers){
81 | return round((Math.sqrt(distance)/1609.344)*1.60934, 2);
82 | }
83 | return round(Math.sqrt(distance)/1609.344, 2);
84 | }
85 |
86 | /**
87 | * Round double.
88 | *
89 | * @param value the value
90 | * @param places the places
91 | * @return the double
92 | */
93 | public static double round(double value, int places) {
94 | if (places < 0) {
95 | throw new IllegalArgumentException();
96 | }
97 | BigDecimal bd = new BigDecimal(value);
98 | bd = bd.setScale(places, RoundingMode.HALF_UP);
99 | return bd.doubleValue();
100 | }
101 |
102 | /**
103 | * Get location double [ ].
104 | *
105 | * @return the double [ ]
106 | */
107 | public Double[] getLocation() {
108 | Criteria criteria;
109 | String bestProvider;
110 | double latitude, longitude;
111 | try {
112 | if (MainActivity.isLocationEnabled()) {
113 | criteria = new Criteria();
114 | bestProvider = String.valueOf(locationManager.getBestProvider(criteria, true)).toString();
115 |
116 | Location location = locationManager.getLastKnownLocation(bestProvider);
117 | if (location != null) {
118 | latitude = location.getLatitude();
119 | longitude = location.getLongitude();
120 | Double[] coordinates = new Double[2];
121 | coordinates[0] = latitude;
122 | coordinates[1] = longitude;
123 | return coordinates;
124 | }
125 | else{
126 | try{
127 | updateLocation();
128 | Handler h = new Handler(Looper.getMainLooper());
129 | h.post(new Runnable() {
130 | public void run() {
131 | Toast.makeText(context, R.string.accessing_location, Toast.LENGTH_SHORT).show();
132 | }
133 | });
134 | }catch (RuntimeException e){
135 |
136 | }
137 | return null;
138 | }
139 | }else {
140 | return null;
141 | }
142 | }catch (SecurityException e){
143 | Handler h = new Handler(Looper.getMainLooper());
144 | h.post(new Runnable() {
145 | public void run() {
146 | Toast.makeText(context, R.string.location_not_enabled, Toast.LENGTH_SHORT).show();
147 | }
148 | });
149 | return null;
150 | }
151 | }
152 |
153 |
154 |
155 | @Override
156 | public void onLocationChanged(Location location) {
157 | try {
158 | locationManager.removeUpdates(this);
159 | }catch (SecurityException e){
160 |
161 | }
162 |
163 |
164 | }
165 |
166 | @Override
167 | public void onStatusChanged(String s, int i, Bundle bundle) {
168 |
169 | }
170 |
171 | @Override
172 | public void onProviderEnabled(String s) {
173 | MainActivity.useLocation = true;
174 | }
175 |
176 | @Override
177 | public void onProviderDisabled(String s) {
178 | MainActivity.useLocation = false;
179 | }
180 | }
181 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/tron-style-more-labels.yaml:
--------------------------------------------------------------------------------
1 | import:
2 | # Components
3 | - components/globals.yaml
4 | - components/fonts.yaml
5 |
6 | # Styles
7 | - styles/common.yaml
8 | - styles/points.yaml
9 | - styles/lines.yaml
10 | - styles/polygons.yaml
11 |
12 | # Layers
13 | - layers/water.yaml
14 | - layers/water-labels.yaml
15 | - layers/earth.yaml
16 | - layers/earth-labels.yaml
17 | - layers/roads.yaml
18 | - layers/roads-labels.yaml
19 | - layers/transit.yaml
20 | - layers/transit-overlay.yaml
21 | - layers/buildings.yaml
22 | - layers/buildings-labels.yaml
23 | - layers/landuse.yaml
24 | - layers/landuse-labels.yaml
25 | - layers/boundaries.yaml
26 | - layers/boundaries-labels.yaml
27 | - layers/places.yaml
28 | - layers/pois.yaml
29 | - layers/ux-sdk-overlay.yaml
30 |
31 | # Sources
32 | sources:
33 | mapzen:
34 | type: MVT
35 | url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt
36 | url_params:
37 | api_key: global.sdk_mapzen_api_key
38 | rasters: [normals-elevation]
39 | max_zoom: 16
40 | normals-elevation:
41 | type: Raster
42 | url: https://tile.mapzen.com/mapzen/terrain/v1/normal/{z}/{x}/{y}.png
43 | url_params:
44 | api_key: global.sdk_mapzen_api_key
45 | max_zoom: 15
46 |
47 | # Only enable this for local debug, should not be enabled for prod (app inserts these at runtime)
48 | # These are all in San Francisco, California
49 | #
50 | # Current location gem
51 | # mz_current_location:
52 | # type: GeoJSON
53 | # url: https://gist.githubusercontent.com/anonymous/9e9588228b0a604264a2/raw/b28be49bea0b7feb859eb65b588c28e9fee5ae2c/map.geojson
54 | # # Route line
55 | # mz_route_line:
56 | # type: GeoJSON
57 | # # sf to ny
58 | # url: https://gist.githubusercontent.com/anonymous/30c6c1a75c168d91d90c/raw/92bfe55e622766d250b1f2f5d17bdc7c26acb956/map.geojson
59 | # # local sf trip
60 | # # url: https://gist.githubusercontent.com/anonymous/9a610ebda6fe4be7bccc/raw/8d217e43f2412d48d01534ba115f1e42dac72e68/map.geojson
61 | # # Dashed route line
62 | # mz_dash_line:
63 | # type: GeoJSON
64 | # url: https://gist.githubusercontent.com/anonymous/d73b851c64c3e5fbfc2754aa32f44c10/raw/938ae435776e176919c4797bed1465a92e403ef3/map.geojson
65 | # # Transit route line
66 | # mz_route_line_transit:
67 | # type: GeoJSON
68 | # url: https://gist.githubusercontent.com/anonymous/71ae88cbc6d62c4d141ecd6a61060050/raw/2254bbc18243f5dc609e663a580c9412a7447936/map.geojson
69 | # # Pin at start of route
70 | # mz_route_start:
71 | # type: GeoJSON
72 | # url: https://gist.githubusercontent.com/anonymous/5262969cb7549ea69221/raw/be03f233fa323d9b5cf50ef1d8e89a1faa3750f1/map.geojson
73 | # # Pin at end of route
74 | # mz_route_destination:
75 | # type: GeoJSON
76 | # url: https://gist.githubusercontent.com/anonymous/dbae9635dfe46796490e/raw/df55c318635a7d91b309ed40754d4738a292fd38/map.geojson
77 | # # Arrow for current route location
78 | # mz_route_location:
79 | # type: GeoJSON
80 | # url: https://gist.githubusercontent.com/anonymous/36613092be6e2aa004fd/raw/f753d13069425199e1dea1b449ef67d723f6510e/map.geojson
81 | # # Dots for transit stops in route preview
82 | # mz_route_transit_stop:
83 | # type: GeoJSON
84 | # url: https://gist.githubusercontent.com/anonymous/b9f16bca4a804f50faf71277d52ee4ab/raw/db13e4e765fa1ac8844b8ba02f4a0f66fe772907/map.geojson
85 | # # Pins showing search result locations
86 | # mz_search_result:
87 | # type: GeoJSON
88 | # url: https://gist.githubusercontent.com/anonymous/57dc09eeb120919f76de/raw/43426217da3c2bae0522dc4257aaa61e4df3981e/map.geojson
89 | # # Default point styling (SDK)
90 | # mz_default_point:
91 | # type: GeoJSON
92 | # url: https://gist.githubusercontent.com/anonymous/16324c771edfce45be0721390389b878/raw/7dbaebf17da7da8562e6c6f8768bc8cff83efa88/map.geojson
93 | # # Default shield styling (SDK)
94 | # mz_default_shield:
95 | # type: GeoJSON
96 | # url: https://gist.githubusercontent.com/anonymous/5a789f6bd8b51b5693ba9cd57a767aa1/raw/d4523a6c9deebca125298c31085958262caa1ecd/map.geojson
97 | # # Default line styling (SDK)
98 | # mz_default_line:
99 | # type: GeoJSON
100 | # url: https://gist.githubusercontent.com/anonymous/26f4e8b6b34b2617b5d5533d89decb39/raw/df8e180ab4f7f19448014dccc4a755f7cfa20003/map.geojson
101 | # # Default polygon styling (SDK)
102 | # mz_default_polygon:
103 | # type: GeoJSON
104 | # url: https://gist.githubusercontent.com/anonymous/88235c795bb44b8c45150bdd5561f947/raw/71d4fab97b6513833bf1a589167119e6169ef86d/map.geojson
105 |
106 | # Camera
107 | cameras:
108 | cam:
109 | type: perspective
110 |
111 | scene:
112 | animated: global.sdk_animated
113 | background:
114 | color: '#364d6d'
115 |
116 | global:
117 | text_visible_building: true # false for default
118 | text_visible_address: true # false for default
119 | icon_size_green: [[13, '14px'], [16, '18px'], [18, '19px']] # 0px for no, default, more [[13, '14px'], [16, '18px'], [18, '19px']]
120 | icon_size_green_nationl_park: [[10, '18px'], [12, '28px'], [13, '36px']] # 0px for no, default, more [[10, '18px'], [12, '28px'], [13, '36px']]
121 | icon_size_green_airport: [[13, '12px'], [14, '12px'], [17, '18px'], [19, '36px']] # 0px for no, default, more [[13, '12px'], [14, '12px'], [17, '18px'], [19, '36px']]
122 | icon_size_green_l: [[14, '24px'], [16, '32px']] # 0px for no, default, more [[14, '24px'], [16, '32px']]
123 | label_visible_poi_landuse: true #false by default
124 | icon_visible_poi_landuse: true #false by default
125 | text_visible_poi_landuse: true #false by default
126 | text_visible_landuse_generic: true #false by default
127 | label_visible_station: true #false by default
128 | icon_visible_station: true #false by default
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/tron-style-no-labels.yaml:
--------------------------------------------------------------------------------
1 | import:
2 | # Components
3 | - components/globals.yaml
4 | - components/fonts.yaml
5 |
6 | # Styles
7 | - styles/common.yaml
8 | - styles/points.yaml
9 | - styles/lines.yaml
10 | - styles/polygons.yaml
11 |
12 | # Layers
13 | - layers/water.yaml
14 | - layers/water-labels.yaml
15 | - layers/earth.yaml
16 | - layers/earth-labels.yaml
17 | - layers/roads.yaml
18 | - layers/roads-labels.yaml
19 | - layers/transit.yaml
20 | - layers/transit-overlay.yaml
21 | - layers/buildings.yaml
22 | - layers/buildings-labels.yaml
23 | - layers/landuse.yaml
24 | - layers/landuse-labels.yaml
25 | - layers/boundaries.yaml
26 | - layers/boundaries-labels.yaml
27 | - layers/places.yaml
28 | - layers/pois.yaml
29 | - layers/ux-sdk-overlay.yaml
30 |
31 | # Sources
32 | sources:
33 | mapzen:
34 | type: MVT
35 | url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt
36 | url_params:
37 | api_key: global.sdk_mapzen_api_key
38 | rasters: [normals-elevation]
39 | max_zoom: 16
40 | normals-elevation:
41 | type: Raster
42 | url: https://tile.mapzen.com/mapzen/terrain/v1/normal/{z}/{x}/{y}.png
43 | url_params:
44 | api_key: global.sdk_mapzen_api_key
45 | max_zoom: 15
46 |
47 | # Only enable this for local debug, should not be enabled for prod (app inserts these at runtime)
48 | # These are all in San Francisco, California
49 | #
50 | # Current location gem
51 | # mz_current_location:
52 | # type: GeoJSON
53 | # url: https://gist.githubusercontent.com/anonymous/9e9588228b0a604264a2/raw/b28be49bea0b7feb859eb65b588c28e9fee5ae2c/map.geojson
54 | # # Route line
55 | # mz_route_line:
56 | # type: GeoJSON
57 | # # sf to ny
58 | # url: https://gist.githubusercontent.com/anonymous/30c6c1a75c168d91d90c/raw/92bfe55e622766d250b1f2f5d17bdc7c26acb956/map.geojson
59 | # # local sf trip
60 | # # url: https://gist.githubusercontent.com/anonymous/9a610ebda6fe4be7bccc/raw/8d217e43f2412d48d01534ba115f1e42dac72e68/map.geojson
61 | # # Dashed route line
62 | # mz_dash_line:
63 | # type: GeoJSON
64 | # url: https://gist.githubusercontent.com/anonymous/d73b851c64c3e5fbfc2754aa32f44c10/raw/938ae435776e176919c4797bed1465a92e403ef3/map.geojson
65 | # # Transit route line
66 | # mz_route_line_transit:
67 | # type: GeoJSON
68 | # url: https://gist.githubusercontent.com/anonymous/71ae88cbc6d62c4d141ecd6a61060050/raw/2254bbc18243f5dc609e663a580c9412a7447936/map.geojson
69 | # # Pin at start of route
70 | # mz_route_start:
71 | # type: GeoJSON
72 | # url: https://gist.githubusercontent.com/anonymous/5262969cb7549ea69221/raw/be03f233fa323d9b5cf50ef1d8e89a1faa3750f1/map.geojson
73 | # # Pin at end of route
74 | # mz_route_destination:
75 | # type: GeoJSON
76 | # url: https://gist.githubusercontent.com/anonymous/dbae9635dfe46796490e/raw/df55c318635a7d91b309ed40754d4738a292fd38/map.geojson
77 | # # Arrow for current route location
78 | # mz_route_location:
79 | # type: GeoJSON
80 | # url: https://gist.githubusercontent.com/anonymous/36613092be6e2aa004fd/raw/f753d13069425199e1dea1b449ef67d723f6510e/map.geojson
81 | # # Dots for transit stops in route preview
82 | # mz_route_transit_stop:
83 | # type: GeoJSON
84 | # url: https://gist.githubusercontent.com/anonymous/b9f16bca4a804f50faf71277d52ee4ab/raw/db13e4e765fa1ac8844b8ba02f4a0f66fe772907/map.geojson
85 | # # Pins showing search result locations
86 | # mz_search_result:
87 | # type: GeoJSON
88 | # url: https://gist.githubusercontent.com/anonymous/57dc09eeb120919f76de/raw/43426217da3c2bae0522dc4257aaa61e4df3981e/map.geojson
89 | # # Default point styling (SDK)
90 | # mz_default_point:
91 | # type: GeoJSON
92 | # url: https://gist.githubusercontent.com/anonymous/16324c771edfce45be0721390389b878/raw/7dbaebf17da7da8562e6c6f8768bc8cff83efa88/map.geojson
93 | # # Default shield styling (SDK)
94 | # mz_default_shield:
95 | # type: GeoJSON
96 | # url: https://gist.githubusercontent.com/anonymous/5a789f6bd8b51b5693ba9cd57a767aa1/raw/d4523a6c9deebca125298c31085958262caa1ecd/map.geojson
97 | # # Default line styling (SDK)
98 | # mz_default_line:
99 | # type: GeoJSON
100 | # url: https://gist.githubusercontent.com/anonymous/26f4e8b6b34b2617b5d5533d89decb39/raw/df8e180ab4f7f19448014dccc4a755f7cfa20003/map.geojson
101 | # # Default polygon styling (SDK)
102 | # mz_default_polygon:
103 | # type: GeoJSON
104 | # url: https://gist.githubusercontent.com/anonymous/88235c795bb44b8c45150bdd5561f947/raw/71d4fab97b6513833bf1a589167119e6169ef86d/map.geojson
105 |
106 | # Camera
107 | cameras:
108 | cam:
109 | type: perspective
110 |
111 | scene:
112 | animated: global.sdk_animated
113 | background:
114 | color: '#364d6d'
115 |
116 | global:
117 | #label visibility
118 | text_visible_admin: false
119 | text_visible_populated_places: false
120 | icon_visible_populated_places: false
121 | text_visible_neighbourhoods: false
122 | text_visible_neighbourhoods_e: false
123 | text_visible_water: false
124 | text_visible_water_labels: false
125 | text_visible_roads: false
126 | text_visible_building: false
127 | text_visible_address: false
128 | label_visible_landuse_green: false
129 | icon_visible_landuse_green: false
130 | icon_size_green: [[0, '0px']] # 0px for no, default, more [[13, '14px'], [16, '18px'], [18, '19px']]
131 | icon_size_green_nationl_park: [[0, '0px']] # 0px for no, default, more [[10, '18px'], [12, '28px'], [13, '36px']]
132 | icon_size_green_airport: [[0, '0px']] # 0px for no, default, more [[13, '12px'], [14, '12px'], [17, '18px'], [19, '36px']]
133 | icon_size_green_l: [[0, '0px']] # 0px for no, default, more [[14, '24px'], [16, '32px']]
134 | text_visible_landuse_green: false
135 | label_visible_poi_landuse: false #false by default
136 | icon_visible_poi_landuse: false #false by default
137 | text_visible_poi_landuse: false #false by default
138 | label_visible_poi_landuse_e: false
139 | icon_visible_poi_landuse_e: false
140 | text_visible_poi_landuse_e: false
141 | text_visible_landuse_generic: false #false by default
142 | label_visible_station: false #false by default
143 | icon_visible_station: false #false by default
144 | text_visible_station: true
145 | text_visible_island: false
146 | text_visible_aerialway: false
147 | text_visible_airport_gate: false
148 | text_visible_exits: false
149 | sdk_road_shields: false
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/water-labels.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | # tuck this into existing water layer
3 | water:
4 | water-area-labels:
5 | visible: global.text_visible_water_labels
6 | filter:
7 | all:
8 | - name: true
9 | - $geometry: point
10 | - not: { kind: [riverbank, dock, playa] }
11 | - area: true
12 | any:
13 | # show labels for smaller landuse areas at higher zooms
14 | - { $zoom: { min: 5 }, area: { min: 10000000000 } }
15 | - { $zoom: { min: 6 }, area: { min: 5000000000 } }
16 | - { $zoom: { min: 7 }, area: { min: 400000000 } }
17 | - { $zoom: { min: 8 }, area: { min: 200000000 } }
18 | - { $zoom: { min: 9 }, area: { min: 100000000 } }
19 | - { $zoom: { min: 10 }, area: { min: 100000000 } }
20 | - { $zoom: { min: 11 }, area: { min: 10000000 } }
21 | - { $zoom: { min: 12 }, area: { min: 2000000 } }
22 | - { $zoom: { min: 13 }, area: { min: 1000000 } }
23 | - { $zoom: { min: 14 }, area: { min: 500000 } }
24 | - { $zoom: { min: 15 }, area: { min: 100000 } }
25 | - { $zoom: { min: 15 }, area: { min: 50000 } }
26 | - { $zoom: { min: 16 }, area: { min: 20000 } }
27 | - { $zoom: { min: 17 } }
28 | default-label-text:
29 | draw:
30 | text:
31 | text_source: global.ux_language_text_source
32 | font:
33 | fill: [0.370,0.622,1.000]
34 | family: Aldrich
35 | size: 12px
36 |
37 | lakes-labels:
38 | filter:
39 | $zoom: { min: 4 }
40 | draw:
41 | text:
42 | font:
43 | size: [[5,9px],[8,12px]]
44 |
45 | ocean-sea-labels:
46 | visible: global.text_visible_water_labels
47 | filter: { name: true, kind: [sea, ocean] }
48 | draw:
49 | text:
50 | text_source: global.ux_language_text_source
51 | font:
52 | fill: [0.370,0.622,1.000]
53 | family: Aldrich
54 | size: 12px
55 | transform: uppercase
56 |
57 | ocean-spacer:
58 | filter: { kind: ocean }
59 | ocean-spacer-z1-z4:
60 | filter: { $zoom: { min: 1, max: 4 } }
61 | draw:
62 | text:
63 | text_source: global.ux_language_text_source_sea
64 | text_wrap: false
65 | ocean-spacer-z4-up:
66 | filter: { $zoom: { min: 4 } }
67 | draw:
68 | text:
69 | text_source: global.ux_language_text_source_ocean
70 | text_wrap: false
71 | ocean-labels-z1-z2:
72 | filter: { $zoom: [0,1,2] }
73 | draw:
74 | text: { visible: false }
75 | ocean-labels-z3-z4:
76 | filter: { $zoom: [3] }
77 | draw:
78 | text:
79 | font:
80 | size: [[3,12px],[6,17px]]
81 |
82 |
83 | sea-early:
84 | filter: { $zoom: [3], kind: sea }
85 | draw: { text: { visible: false } }
86 | sea-spacer:
87 | filter: { not: { kind: [ocean] }, $zoom: { min: 5 } }
88 | draw:
89 | text:
90 | text_source: global.ux_language_text_source_sea
91 | text_wrap: false
92 |
93 | sea-labels:
94 | filter: { not: { kind: [ocean] } }
95 | draw:
96 | text:
97 | font:
98 | size: [[4,9px],[8,14px]]
99 |
100 | playa-labels:
101 | visible: global.text_visible_water_labels
102 | filter:
103 | all:
104 | - name: true
105 | - $geometry: point
106 | - kind: playa
107 | - area: true
108 | any:
109 | # show labels for smaller landuse areas at higher zooms
110 | - { $zoom: { min: 7 }, area: { min: 1500000000 } }
111 | - { $zoom: { min: 8 }, area: { min: 200000000 } }
112 | - { $zoom: { min: 9 }, area: { min: 100000000 } }
113 | - { $zoom: { min: 10 }, area: { min: 100000000 } }
114 | - { $zoom: { min: 11 }, area: { min: 10000000 } }
115 | - { $zoom: { min: 12 }, area: { min: 2000000 } }
116 | - { $zoom: { min: 13 }, area: { min: 1000000 } }
117 | - { $zoom: { min: 14 }, area: { min: 500000 } }
118 | - { $zoom: { min: 15 }, area: { min: 100000 } }
119 | - { $zoom: { min: 15 }, area: { min: 50000 } }
120 | - { $zoom: { min: 16 }, area: { min: 20000 } }
121 | - { $zoom: { min: 17 } }
122 | draw:
123 | text:
124 | text_source: global.ux_language_text_source
125 | font:
126 | fill: [0.351,0.770,0.950]
127 | family: Aldrich
128 | size: 10px
129 |
130 | water-line-labels:
131 | visible: global.text_visible_water_labels
132 | filter:
133 | all:
134 | - name: true
135 | - $geometry: line
136 | - kind: [river,canal,stream,dam,ditch,drain]
137 | - $zoom: { min: 14 }
138 | draw:
139 | text:
140 | text_source: global.ux_language_text_source
141 | font:
142 | fill: [0.370,0.622,1.000]
143 | family: Aldrich
144 | size: 12px
145 | water-line-labels:
146 | filter: { $zoom: [14] }
147 | draw:
148 | text:
149 | font:
150 | size: [[14,10px],[17,14px]]
151 | not-river-not-stream:
152 | filter: { kind: [canal,dam,ditch,drain], $zoom: { max: 16 } }
153 | draw:
154 | text:
155 | visible: false
156 | stream:
157 | filter: { kind: [stream], $zoom: { max: 17 } }
158 | draw:
159 | text:
160 | visible: false
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/README.md:
--------------------------------------------------------------------------------
1 | ## TRON 2.0
2 |
3 | Welcome to TRON 2.0 by [Geraldine Sarmiento](https://twitter.com/sensescape) and [Patricio Gonzalez Vivo](https://twitter.com/patriciogv). Rebuilt from the ground up to take advantage of the latest features of [Tangram (JS and ES)](https://mapzen.com/products/tangram/) graphics engine and conventions.
4 |
5 | TRON is an exploration of scale transformations in the visual language of TRON with the use of Tangram [blocks](http://tangrams.github.io/blocks/). On this new version, visual forms and elements transform per zoom, revealing new cartographic details and a new experience of scale.
6 |
7 | Beside the design challenges we want to make the source more approachable by dividing the scene file in multiple smaller pieces. So instead of having a single monolitical `.yaml` scene file you will find smaller modules that focus on a particular aspect of the map scene.
8 |
9 | ## How it works?
10 |
11 | The main elements are:
12 |
13 | - [`tron-style.yaml`](tron-style.yaml): is the main `.yaml` file that mix and hold all together. There you will find the definition of the `sources`, `cameras` and `scene:background:color`, together with the imports that glow and conects the `layers`, `styles` and `components` resources.
14 |
15 | - [`layers/` folder](layers/): [layers on Tangram](https://mapzen.com/documentation/tangram/Filters-Overview/) are the set of rules that filter the data (comming from the `sources`) into different **style rules**. Tell how each component on the map should be treat. If it's `text`, `points`, `lines` or `polygons`. What's the default `size` and `color`, etc. In this folder you will find different `.yaml` scene files that carefully make sense of the data and display it in a cartographical intuitive way. This meticulus work was made by [Geraldine Sarmiento](https://twitter.com/sensescape) and [Nathaniel V. KELSO](https://twitter.com/kelsosCorner). At the end of each one of this layer-files you will find also a `styles` secction where the **custom shaders** are defined and crafted by [me (Patricio Gonzalez Vivo).](https://twitter.com/patriciogv) Shaders are not a simple thing, but at [Mapzen](https://mapzen.com) we are trying to make them more aproachable. Tangram `styles` can be mix, so for this map style we try to use that property to reduce the complexity and size of the shader by reusing them as much as possible.
16 |
17 | - [`styles/` folder](styles): contain all the `styles` that are shared across layers. Is defenetly a more **abstract** layer. This folder sorts the `styles` by their `base` geoemtry (`points`, `lines` or `polygons`). Also for those `styles` common to all the other geometries can be found in `common.yaml`. You will note that most [shader styles](https://mapzen.com/documentation/tangram/Shaders-Overview/) "extends" from [blocks](http://tangrams.github.io/blocks/). As part of the efford on making GLSL Shaders more aproachable in Tangram. I had start a tool box library of shaders snippets that can be mix together, call [Tangram Blocks](http://tangrams.github.io/blocks/).
18 |
19 | - [`components/` folder](components): This folders holds some of the global resources use in the scene, like [`fonts`](components/fonts.yaml) and [`images/`](components/images). Also there you can find the [`globals.yaml`](components/globals.yaml). This particular file is very interesting because holds `globals` variables and JS functions that control the map. From it is possible to customize the map, like **turning on or off the animations** or **changing the language**.
20 |
21 | ## Bundling
22 |
23 | Having the scene file distributed accross different smaller modules creates more network calls. To solve this you will find in this repository a `bundle.py` script that construct a ZIP file (`tron.zip`) that will hold all the files needed.
24 |
25 | To use it you will:
26 |
27 | - first to clone locally the repository:
28 |
29 | ```bash
30 | git clone https://github.com/tangrams/tron-style.git
31 | cd tron
32 | ```
33 |
34 | - Load the [Tangram Blocks](http://tangrams.github.io/blocks/) submodule:
35 |
36 | ```bash
37 | git submodule update --init --recursive
38 | ```
39 |
40 | - Install some Python modules:
41 |
42 | ```bash
43 | pip install pyyaml
44 | ```
45 |
46 | - Then finally run the script
47 |
48 | ```bash
49 | python <(curl -s https://raw.githubusercontent.com/tangrams/bundler/master/bundler.py)
50 | ```
51 |
52 | ## Edit
53 |
54 | One of the nice things of running a local instance of a [Tangram](https://mapzen.com/products/tangram/) scene is the hability to modify it and learn from it! We defenetly encourage to do it. You can host the style by doing:
55 |
56 | ```bash
57 | python -m SimpleHTTPServer 8000
58 | ```
59 |
60 | Althought we also have been working on a way to edit [Tangram](https://mapzen.com/products/tangram/) scene files and see it change inmediatly. The project is call [TangramPlay](https://mapzen.com/tangram/play/) and can be found [here](https://mapzen.com/tangram/play/).
61 |
62 | A quick way to start playing with Tron2.0 is by importing the scene file and inmediatly start editing on top of the scene file. For that:
63 |
64 | 1. [Click here to open Tron in TangramPlay](https://mapzen.com/tangram/play/?scene=https%3A%2F%2Fgist.githubusercontent.com%2Fanonymous%2F14f1c7495dde62cf831427dc9be89ec9%2Fraw%2F0b25fc8a0e90115090c90928d0fefa4423106b9b%2Fscene.yaml#8/40.574/-74.051)
65 |
66 | 2. Once you finish you can download it or copy it back to your local file, but **remember** to take out the first line `import`.
67 |
68 | ## About the process
69 |
70 | Here are some resource we share and sketch [Geraldine Sarmiento](https://twitter.com/sensescape) and [I](https://twitter.com/patriciogv) during the development of TRON2.0. We hope you enjoy it.
71 |
72 | - [Inspiration Pintboard](https://www.pinterest.com/patriciogonzv/tron-20/)
73 |
74 | [ Generative Tron Palette](http://player.thebookofshaders.com/?log=160726003844)
75 | [ Glow lines ](http://player.thebookofshaders.com/?log=160726010850)
76 | [ Highways](http://player.thebookofshaders.com/?log=161011181616)
77 | [ Grid animation](http://player.thebookofshaders.com/?log=160706191515)
78 | [ Grid animation](http://player.thebookofshaders.com/?log=160705205611)
79 | [ Stripes](http://player.thebookofshaders.com/?log=160229221706)
80 | [ Stripes animation](http://player.thebookofshaders.com/?log=160705204919)
81 | [ Simplex Grid animation](http://player.thebookofshaders.com/?log=160313020334)
82 | [ Dots pattern](http://player.thebookofshaders.com/?log=160621211003)
83 | [ Mosaic-dots transition](http://player.thebookofshaders.com/?log=160622150357)
84 | [ Stripes](http://player.thebookofshaders.com/?log=160621210032)
85 | [ Stripes-char transition](http://player.thebookofshaders.com/?log=160621170831)
86 | [ Contours](http://player.thebookofshaders.com/?log=160626213924)
87 | [ Hill Shading](http://player.thebookofshaders.com/?log=160705083231)
88 | [ Buildings window](http://player.thebookofshaders.com/?log=160707203604)
89 | [ Generative Icons](http://player.thebookofshaders.com/?log=160805190306)
90 | [ Animated Icons](http://player.thebookofshaders.com/?log=160805194757)
91 | [ Animating Icons w POIs SDF's](http://player.thebookofshaders.com/?log=160818140257)
92 | [ Animating Icons w POIs SDF's](http://player.thebookofshaders.com/?log=160817211857)
93 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/water.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | water:
3 | data: { source: mapzen }
4 | draw:
5 | polygons:
6 | style: water
7 | order: global.order
8 | # color: [0.149,0.153,0.329]
9 | # color: [0.189,0.193,0.369]
10 | color: [0.200,0.200,0.360]
11 |
12 | later:
13 | filter: { $zoom: { min: 11 } }
14 | draw:
15 | polygons:
16 | style: water-later
17 | lakes:
18 | filter:
19 | all:
20 | - kind: [ocean, lake, water, riverbank, reservoir, swimming_pool]
21 | # WARNING: any area filters here must match the area filters in the water-boundaries-not_ocean layer
22 | any:
23 | # limit show smaller landuse areas to higher zooms
24 | - { $zoom: { min: 1 }, area: { min: 40000000000 } }
25 | - { $zoom: { min: 2 }, area: { min: 20000000000 } }
26 | # some weird natural earth scale set transition
27 | - { $zoom: { min: 3 }, area: { min: 80000000000 } }
28 | - { $zoom: { min: 4 }, area: { min: 5000000000 } }
29 | - { $zoom: { min: 5 }, area: { min: 700000000 } }
30 | - { $zoom: { min: 6 }, area: { min: 500000000 } }
31 | - { $zoom: { min: 7 }, area: { min: 160000000 } }
32 | - { $zoom: { min: 8 }, area: { min: 40000000 } }
33 | - { $zoom: { min: 9 }, area: { min: 10000000 } }
34 | - { $zoom: { min: 10 }, area: { min: 8000000 } }
35 | - { $zoom: { min: 11 }, area: { min: 2000000 } }
36 | - { $zoom: { min: 12 }, area: { min: 200000 } }
37 | - { $zoom: { min: 13 }, area: { min: 100000 } }
38 | - { $zoom: { min: 14 }, area: { min: 2000 } }
39 | - { $zoom: { min: 15 } }
40 | draw:
41 | polygons:
42 | style: water
43 |
44 | other_areas:
45 | filter: { not: { kind: [ocean, lake, water, reservoir] }, $zoom: { min: 10 }, area: { min: 100 } }
46 | draw:
47 | polygons:
48 | style: water
49 |
50 | later:
51 | filter: { $zoom: { min: 11 } }
52 | draw:
53 | polygons:
54 | style: water-later
55 |
56 | swimming-pool-later:
57 | filter:
58 | kind: swimming_pool
59 | draw:
60 | polygons:
61 | style: polygons
62 | color: [0.000,0.496,0.930]
63 |
64 | playas:
65 | filter: { kind: playa, $zoom: { min: 4 } }
66 | draw:
67 | polygons:
68 | style: polygons
69 | order: global.order
70 | color: [[4,[0.263,0.361,0.498]],[9,[0.193,0.275,0.389]]]
71 |
72 | swimming_pool:
73 | filter: { kind: swimming_pool }
74 | draw:
75 | polygons:
76 | style: polygons
77 | color: [0.000,0.496,0.930]
78 |
79 | boundaries:
80 | filter: { boundary: true, kind: ocean }
81 | # don't animate early, save the fan, save the planet!
82 | early:
83 | filter: { $zoom: { max: 16 } }
84 | draw:
85 | lines:
86 | style: coastline-glow
87 | order: global.order
88 | width: [[4,0px],[11,2.5px],[14,6px],[16,10px]]
89 | color: [0.370,0.622,1.000]
90 | join: round
91 | animated:
92 | filter: { $zoom: { min: 16 } }
93 | draw:
94 | lines:
95 | style: water-boundaries-animated
96 | order: global.order
97 | width: [[16,21px],[18,30px],[20,36]]
98 | color: [0.091,0.329,0.692]
99 | join: round
100 |
101 | boundaries-not_ocean:
102 | filter:
103 | all:
104 | - boundary: true
105 | - not: { kind: [ocean, playa] }
106 | - $zoom: { min: 8 }
107 | # WARNING: any area filters here must match the area filters in the lakes layer
108 | any:
109 | # limit show smaller landuse areas to higher zooms
110 | - { $zoom: { min: 1 }, area: { min: 40000000000 } }
111 | - { $zoom: { min: 2 }, area: { min: 20000000000 } }
112 | # some weird natural earth scale set transition
113 | - { $zoom: { min: 3 }, area: { min: 80000000000 } }
114 | - { $zoom: { min: 4 }, area: { min: 5000000000 } }
115 | - { $zoom: { min: 5 }, area: { min: 700000000 } }
116 | - { $zoom: { min: 6 }, area: { min: 500000000 } }
117 | - { $zoom: { min: 7 }, area: { min: 160000000 } }
118 | - { $zoom: { min: 8 }, area: { min: 40000000 } }
119 | - { $zoom: { min: 9 }, area: { min: 10000000 } }
120 | - { $zoom: { min: 10 }, area: { min: 8000000 } }
121 | - { $zoom: { min: 11 }, area: { min: 2000000 } }
122 | - { $zoom: { min: 12 }, area: { min: 200000 } }
123 | - { $zoom: { min: 13 }, area: { min: 100000 } }
124 | - { $zoom: { min: 14 }, area: { min: 2000 } }
125 | - { $zoom: { min: 15 } }
126 | draw:
127 | lines:
128 | order: global.order
129 | color: [0.155,0.482,0.910]
130 | width: [[8,0px],[13,1px],[15,1.25px],[20,3px]]
131 | join: round
132 |
133 | swimming_pool:
134 | filter: { kind: swimming_pool }
135 | draw:
136 | lines:
137 | style: swimming-pool-glow
138 | color: [0.407,0.846,0.850]
139 | width: [[8,0px],[13,3px],[15,4px],[20,12px]]
140 |
141 | boundaries-not_ocean-riverbank:
142 | # river boundaries like the thames in london, la seine in paris
143 | filter: { kind: riverbank }
144 | draw:
145 | lines:
146 | color: [0.155,0.482,0.910]
147 | width: [[8,0px],[13,1px],[15,1.25px],[20,8px]]
148 |
149 | styles:
150 | water:
151 | base: polygons
152 | mix: [functions-zoom, polygons-diagonal-opaque-stripes]
153 | shaders:
154 | defines:
155 | ZOOM_START: 3.
156 | ZOOM_END: 12.
157 | ZOOM_MAX: 14.
158 | ZOOM_IN: .9
159 | ZOOM_OUT: -.2
160 |
161 | STRIPES_ALPHA: 1.
162 | STRIPES_SCALE: 25.
163 | STRIPES_WIDTH: zoom()
164 |
165 | water-later:
166 | base: polygons
167 | mix: [functions-zoom, polygons-shimmering]
168 | shaders:
169 | defines:
170 | ZOOM_START: 11.
171 | ZOOM_END: 20.
172 |
173 | SHIMMERING_COLOR: color.rgb
174 | SHIMMERING_BACKGROUND_COLOR: vec3(0.03,0.05,0.07)
175 | SHIMMERING_SPEED: .5
176 | SHIMMERING_AMOUNT: .1+zoom()*.9
177 | SHIMMERING_ANIMATED: global.sdk_animated
178 | water-boundaries-animated:
179 | base: lines
180 | mix: [lines-coast]
181 | shaders:
182 | defines:
183 | COAST_WAVES_ANIMATED: global.sdk_animated
184 | swimming-pool-glow:
185 | base: lines
186 | mix: [lines-glow]
187 | shaders:
188 | defines:
189 | GLOW_WIDTH: .75
190 | GLOW_BRIGHTNESS: .25
191 | coastline-glow:
192 | base: lines
193 | mix: [lines-glow]
194 | shaders:
195 | defines:
196 | GLOW_WIDTH: .5
197 | GLOW_BRIGHTNESS: .5
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/lib/FileSaver.js:
--------------------------------------------------------------------------------
1 | /* FileSaver.js
2 | * A saveAs() FileSaver implementation.
3 | * 2014-07-25
4 | *
5 | * By Eli Grey, http://eligrey.com
6 | * License: X11/MIT
7 | * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
8 | */
9 |
10 | /*global self */
11 | /*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
12 |
13 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
14 |
15 | var saveAs = saveAs
16 | // IE 10+ (native saveAs)
17 | || (typeof navigator !== "undefined" &&
18 | navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
19 | // Everyone else
20 | || (function(view) {
21 | "use strict";
22 | // IE <10 is explicitly unsupported
23 | if (typeof navigator !== "undefined" &&
24 | /MSIE [1-9]\./.test(navigator.userAgent)) {
25 | return;
26 | }
27 | var
28 | doc = view.document
29 | // only get URL when necessary in case Blob.js hasn't overridden it yet
30 | , get_URL = function() {
31 | return view.URL || view.webkitURL || view;
32 | }
33 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
34 | , can_use_save_link = !view.externalHost && "download" in save_link
35 | , click = function(node) {
36 | var event = doc.createEvent("MouseEvents");
37 | event.initMouseEvent(
38 | "click", true, false, view, 0, 0, 0, 0, 0
39 | , false, false, false, false, 0, null
40 | );
41 | node.dispatchEvent(event);
42 | }
43 | , webkit_req_fs = view.webkitRequestFileSystem
44 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
45 | , throw_outside = function(ex) {
46 | (view.setImmediate || view.setTimeout)(function() {
47 | throw ex;
48 | }, 0);
49 | }
50 | , force_saveable_type = "application/octet-stream"
51 | , fs_min_size = 0
52 | // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 for
53 | // the reasoning behind the timeout and revocation flow
54 | , arbitrary_revoke_timeout = 10
55 | , revoke = function(file) {
56 | var revoker = function() {
57 | if (typeof file === "string") { // file is an object URL
58 | get_URL().revokeObjectURL(file);
59 | } else { // file is a File
60 | file.remove();
61 | }
62 | };
63 | if (view.chrome) {
64 | revoker();
65 | } else {
66 | setTimeout(revoker, arbitrary_revoke_timeout);
67 | }
68 | }
69 | , dispatch = function(filesaver, event_types, event) {
70 | event_types = [].concat(event_types);
71 | var i = event_types.length;
72 | while (i--) {
73 | var listener = filesaver["on" + event_types[i]];
74 | if (typeof listener === "function") {
75 | try {
76 | listener.call(filesaver, event || filesaver);
77 | } catch (ex) {
78 | throw_outside(ex);
79 | }
80 | }
81 | }
82 | }
83 | , FileSaver = function(blob, name) {
84 | // First try a.download, then web filesystem, then object URLs
85 | var
86 | filesaver = this
87 | , type = blob.type
88 | , blob_changed = false
89 | , object_url
90 | , target_view
91 | , dispatch_all = function() {
92 | dispatch(filesaver, "writestart progress write writeend".split(" "));
93 | }
94 | // on any filesys errors revert to saving with object URLs
95 | , fs_error = function() {
96 | // don't create more object URLs than needed
97 | if (blob_changed || !object_url) {
98 | object_url = get_URL().createObjectURL(blob);
99 | }
100 | if (target_view) {
101 | target_view.location.href = object_url;
102 | } else {
103 | var new_tab = view.open(object_url, "_blank");
104 | if (new_tab == undefined && typeof safari !== "undefined") {
105 | //Apple do not allow window.open, see http://bit.ly/1kZffRI
106 | view.location.href = object_url
107 | }
108 | }
109 | filesaver.readyState = filesaver.DONE;
110 | dispatch_all();
111 | revoke(object_url);
112 | }
113 | , abortable = function(func) {
114 | return function() {
115 | if (filesaver.readyState !== filesaver.DONE) {
116 | return func.apply(this, arguments);
117 | }
118 | };
119 | }
120 | , create_if_not_found = {create: true, exclusive: false}
121 | , slice
122 | ;
123 | filesaver.readyState = filesaver.INIT;
124 | if (!name) {
125 | name = "download";
126 | }
127 | if (can_use_save_link) {
128 | object_url = get_URL().createObjectURL(blob);
129 | save_link.href = object_url;
130 | save_link.download = name;
131 | click(save_link);
132 | filesaver.readyState = filesaver.DONE;
133 | dispatch_all();
134 | revoke(object_url);
135 | return;
136 | }
137 | // Object and web filesystem URLs have a problem saving in Google Chrome when
138 | // viewed in a tab, so I force save with application/octet-stream
139 | // http://code.google.com/p/chromium/issues/detail?id=91158
140 | // Update: Google errantly closed 91158, I submitted it again:
141 | // https://code.google.com/p/chromium/issues/detail?id=389642
142 | if (view.chrome && type && type !== force_saveable_type) {
143 | slice = blob.slice || blob.webkitSlice;
144 | blob = slice.call(blob, 0, blob.size, force_saveable_type);
145 | blob_changed = true;
146 | }
147 | // Since I can't be sure that the guessed media type will trigger a download
148 | // in WebKit, I append .download to the filename.
149 | // https://bugs.webkit.org/show_bug.cgi?id=65440
150 | if (webkit_req_fs && name !== "download") {
151 | name += ".download";
152 | }
153 | if (type === force_saveable_type || webkit_req_fs) {
154 | target_view = view;
155 | }
156 | if (!req_fs) {
157 | fs_error();
158 | return;
159 | }
160 | fs_min_size += blob.size;
161 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
162 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
163 | var save = function() {
164 | dir.getFile(name, create_if_not_found, abortable(function(file) {
165 | file.createWriter(abortable(function(writer) {
166 | writer.onwriteend = function(event) {
167 | target_view.location.href = file.toURL();
168 | filesaver.readyState = filesaver.DONE;
169 | dispatch(filesaver, "writeend", event);
170 | revoke(file);
171 | };
172 | writer.onerror = function() {
173 | var error = writer.error;
174 | if (error.code !== error.ABORT_ERR) {
175 | fs_error();
176 | }
177 | };
178 | "writestart progress write abort".split(" ").forEach(function(event) {
179 | writer["on" + event] = filesaver["on" + event];
180 | });
181 | writer.write(blob);
182 | filesaver.abort = function() {
183 | writer.abort();
184 | filesaver.readyState = filesaver.DONE;
185 | };
186 | filesaver.readyState = filesaver.WRITING;
187 | }), fs_error);
188 | }), fs_error);
189 | };
190 | dir.getFile(name, {create: false}, abortable(function(file) {
191 | // delete file if it already exists
192 | file.remove();
193 | save();
194 | }), abortable(function(ex) {
195 | if (ex.code === ex.NOT_FOUND_ERR) {
196 | save();
197 | } else {
198 | fs_error();
199 | }
200 | }));
201 | }), fs_error);
202 | }), fs_error);
203 | }
204 | , FS_proto = FileSaver.prototype
205 | , saveAs = function(blob, name) {
206 | return new FileSaver(blob, name);
207 | }
208 | ;
209 | FS_proto.abort = function() {
210 | var filesaver = this;
211 | filesaver.readyState = filesaver.DONE;
212 | dispatch(filesaver, "abort");
213 | };
214 | FS_proto.readyState = FS_proto.INIT = 0;
215 | FS_proto.WRITING = 1;
216 | FS_proto.DONE = 2;
217 |
218 | FS_proto.error =
219 | FS_proto.onwritestart =
220 | FS_proto.onprogress =
221 | FS_proto.onwrite =
222 | FS_proto.onabort =
223 | FS_proto.onerror =
224 | FS_proto.onwriteend =
225 | null;
226 |
227 | return saveAs;
228 | }(
229 | typeof self !== "undefined" && self
230 | || typeof window !== "undefined" && window
231 | || this.content
232 | ));
233 | // `self` is undefined in Firefox for Android content script context
234 | // while `this` is nsIContentFrameMessageManager
235 | // with an attribute `content` that corresponds to the window
236 |
237 | if (typeof module !== "undefined" && module !== null) {
238 | module.exports = saveAs;
239 | } else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
240 | define([], function() {
241 | return saveAs;
242 | });
243 | }
244 |
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/lib/FileSaver.js:
--------------------------------------------------------------------------------
1 | /* FileSaver.js
2 | * A saveAs() FileSaver implementation.
3 | * 2014-07-25
4 | *
5 | * By Eli Grey, http://eligrey.com
6 | * License: X11/MIT
7 | * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
8 | */
9 |
10 | /*global self */
11 | /*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
12 |
13 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
14 |
15 | var saveAs = saveAs
16 | // IE 10+ (native saveAs)
17 | || (typeof navigator !== "undefined" &&
18 | navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
19 | // Everyone else
20 | || (function(view) {
21 | "use strict";
22 | // IE <10 is explicitly unsupported
23 | if (typeof navigator !== "undefined" &&
24 | /MSIE [1-9]\./.test(navigator.userAgent)) {
25 | return;
26 | }
27 | var
28 | doc = view.document
29 | // only get URL when necessary in case Blob.js hasn't overridden it yet
30 | , get_URL = function() {
31 | return view.URL || view.webkitURL || view;
32 | }
33 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
34 | , can_use_save_link = !view.externalHost && "download" in save_link
35 | , click = function(node) {
36 | var event = doc.createEvent("MouseEvents");
37 | event.initMouseEvent(
38 | "click", true, false, view, 0, 0, 0, 0, 0
39 | , false, false, false, false, 0, null
40 | );
41 | node.dispatchEvent(event);
42 | }
43 | , webkit_req_fs = view.webkitRequestFileSystem
44 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
45 | , throw_outside = function(ex) {
46 | (view.setImmediate || view.setTimeout)(function() {
47 | throw ex;
48 | }, 0);
49 | }
50 | , force_saveable_type = "application/octet-stream"
51 | , fs_min_size = 0
52 | // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 for
53 | // the reasoning behind the timeout and revocation flow
54 | , arbitrary_revoke_timeout = 10
55 | , revoke = function(file) {
56 | var revoker = function() {
57 | if (typeof file === "string") { // file is an object URL
58 | get_URL().revokeObjectURL(file);
59 | } else { // file is a File
60 | file.remove();
61 | }
62 | };
63 | if (view.chrome) {
64 | revoker();
65 | } else {
66 | setTimeout(revoker, arbitrary_revoke_timeout);
67 | }
68 | }
69 | , dispatch = function(filesaver, event_types, event) {
70 | event_types = [].concat(event_types);
71 | var i = event_types.length;
72 | while (i--) {
73 | var listener = filesaver["on" + event_types[i]];
74 | if (typeof listener === "function") {
75 | try {
76 | listener.call(filesaver, event || filesaver);
77 | } catch (ex) {
78 | throw_outside(ex);
79 | }
80 | }
81 | }
82 | }
83 | , FileSaver = function(blob, name) {
84 | // First try a.download, then web filesystem, then object URLs
85 | var
86 | filesaver = this
87 | , type = blob.type
88 | , blob_changed = false
89 | , object_url
90 | , target_view
91 | , dispatch_all = function() {
92 | dispatch(filesaver, "writestart progress write writeend".split(" "));
93 | }
94 | // on any filesys errors revert to saving with object URLs
95 | , fs_error = function() {
96 | // don't create more object URLs than needed
97 | if (blob_changed || !object_url) {
98 | object_url = get_URL().createObjectURL(blob);
99 | }
100 | if (target_view) {
101 | target_view.location.href = object_url;
102 | } else {
103 | var new_tab = view.open(object_url, "_blank");
104 | if (new_tab == undefined && typeof safari !== "undefined") {
105 | //Apple do not allow window.open, see http://bit.ly/1kZffRI
106 | view.location.href = object_url
107 | }
108 | }
109 | filesaver.readyState = filesaver.DONE;
110 | dispatch_all();
111 | revoke(object_url);
112 | }
113 | , abortable = function(func) {
114 | return function() {
115 | if (filesaver.readyState !== filesaver.DONE) {
116 | return func.apply(this, arguments);
117 | }
118 | };
119 | }
120 | , create_if_not_found = {create: true, exclusive: false}
121 | , slice
122 | ;
123 | filesaver.readyState = filesaver.INIT;
124 | if (!name) {
125 | name = "download";
126 | }
127 | if (can_use_save_link) {
128 | object_url = get_URL().createObjectURL(blob);
129 | save_link.href = object_url;
130 | save_link.download = name;
131 | click(save_link);
132 | filesaver.readyState = filesaver.DONE;
133 | dispatch_all();
134 | revoke(object_url);
135 | return;
136 | }
137 | // Object and web filesystem URLs have a problem saving in Google Chrome when
138 | // viewed in a tab, so I force save with application/octet-stream
139 | // http://code.google.com/p/chromium/issues/detail?id=91158
140 | // Update: Google errantly closed 91158, I submitted it again:
141 | // https://code.google.com/p/chromium/issues/detail?id=389642
142 | if (view.chrome && type && type !== force_saveable_type) {
143 | slice = blob.slice || blob.webkitSlice;
144 | blob = slice.call(blob, 0, blob.size, force_saveable_type);
145 | blob_changed = true;
146 | }
147 | // Since I can't be sure that the guessed media type will trigger a download
148 | // in WebKit, I append .download to the filename.
149 | // https://bugs.webkit.org/show_bug.cgi?id=65440
150 | if (webkit_req_fs && name !== "download") {
151 | name += ".download";
152 | }
153 | if (type === force_saveable_type || webkit_req_fs) {
154 | target_view = view;
155 | }
156 | if (!req_fs) {
157 | fs_error();
158 | return;
159 | }
160 | fs_min_size += blob.size;
161 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
162 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
163 | var save = function() {
164 | dir.getFile(name, create_if_not_found, abortable(function(file) {
165 | file.createWriter(abortable(function(writer) {
166 | writer.onwriteend = function(event) {
167 | target_view.location.href = file.toURL();
168 | filesaver.readyState = filesaver.DONE;
169 | dispatch(filesaver, "writeend", event);
170 | revoke(file);
171 | };
172 | writer.onerror = function() {
173 | var error = writer.error;
174 | if (error.code !== error.ABORT_ERR) {
175 | fs_error();
176 | }
177 | };
178 | "writestart progress write abort".split(" ").forEach(function(event) {
179 | writer["on" + event] = filesaver["on" + event];
180 | });
181 | writer.write(blob);
182 | filesaver.abort = function() {
183 | writer.abort();
184 | filesaver.readyState = filesaver.DONE;
185 | };
186 | filesaver.readyState = filesaver.WRITING;
187 | }), fs_error);
188 | }), fs_error);
189 | };
190 | dir.getFile(name, {create: false}, abortable(function(file) {
191 | // delete file if it already exists
192 | file.remove();
193 | save();
194 | }), abortable(function(ex) {
195 | if (ex.code === ex.NOT_FOUND_ERR) {
196 | save();
197 | } else {
198 | fs_error();
199 | }
200 | }));
201 | }), fs_error);
202 | }), fs_error);
203 | }
204 | , FS_proto = FileSaver.prototype
205 | , saveAs = function(blob, name) {
206 | return new FileSaver(blob, name);
207 | }
208 | ;
209 | FS_proto.abort = function() {
210 | var filesaver = this;
211 | filesaver.readyState = filesaver.DONE;
212 | dispatch(filesaver, "abort");
213 | };
214 | FS_proto.readyState = FS_proto.INIT = 0;
215 | FS_proto.WRITING = 1;
216 | FS_proto.DONE = 2;
217 |
218 | FS_proto.error =
219 | FS_proto.onwritestart =
220 | FS_proto.onprogress =
221 | FS_proto.onwrite =
222 | FS_proto.onabort =
223 | FS_proto.onerror =
224 | FS_proto.onwriteend =
225 | null;
226 |
227 | return saveAs;
228 | }(
229 | typeof self !== "undefined" && self
230 | || typeof window !== "undefined" && window
231 | || this.content
232 | ));
233 | // `self` is undefined in Firefox for Android content script context
234 | // while `this` is nsIContentFrameMessageManager
235 | // with an attribute `content` that corresponds to the window
236 |
237 | if (typeof module !== "undefined" && module !== null) {
238 | module.exports = saveAs;
239 | } else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
240 | define([], function() {
241 | return saveAs;
242 | });
243 | }
244 |
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/lib/keymaster.js:
--------------------------------------------------------------------------------
1 | // keymaster.js
2 | // (c) 2011-2013 Thomas Fuchs
3 | // keymaster.js may be freely distributed under the MIT license.
4 |
5 | ;(function(global){
6 | var k,
7 | _handlers = {},
8 | _mods = { 16: false, 18: false, 17: false, 91: false },
9 | _scope = 'all',
10 | // modifier keys
11 | _MODIFIERS = {
12 | '⇧': 16, shift: 16,
13 | '⌥': 18, alt: 18, option: 18,
14 | '⌃': 17, ctrl: 17, control: 17,
15 | '⌘': 91, command: 91
16 | },
17 | // special keys
18 | _MAP = {
19 | backspace: 8, tab: 9, clear: 12,
20 | enter: 13, 'return': 13,
21 | esc: 27, escape: 27, space: 32,
22 | left: 37, up: 38,
23 | right: 39, down: 40,
24 | del: 46, 'delete': 46,
25 | home: 36, end: 35,
26 | pageup: 33, pagedown: 34,
27 | ',': 188, '.': 190, '/': 191,
28 | '`': 192, '-': 189, '=': 187,
29 | ';': 186, '\'': 222,
30 | '[': 219, ']': 221, '\\': 220
31 | },
32 | code = function(x){
33 | return _MAP[x] || x.toUpperCase().charCodeAt(0);
34 | },
35 | _downKeys = [];
36 |
37 | for(k=1;k<20;k++) _MAP['f'+k] = 111+k;
38 |
39 | // IE doesn't support Array#indexOf, so have a simple replacement
40 | function index(array, item){
41 | var i = array.length;
42 | while(i--) if(array[i]===item) return i;
43 | return -1;
44 | }
45 |
46 | // for comparing mods before unassignment
47 | function compareArray(a1, a2) {
48 | if (a1.length != a2.length) return false;
49 | for (var i = 0; i < a1.length; i++) {
50 | if (a1[i] !== a2[i]) return false;
51 | }
52 | return true;
53 | }
54 |
55 | var modifierMap = {
56 | 16:'shiftKey',
57 | 18:'altKey',
58 | 17:'ctrlKey',
59 | 91:'metaKey'
60 | };
61 | function updateModifierKey(event) {
62 | for(k in _mods) _mods[k] = event[modifierMap[k]];
63 | };
64 |
65 | // handle keydown event
66 | function dispatch(event) {
67 | var key, handler, k, i, modifiersMatch, scope;
68 | key = event.keyCode;
69 |
70 | if (index(_downKeys, key) == -1) {
71 | _downKeys.push(key);
72 | }
73 |
74 | // if a modifier key, set the key. property to true and return
75 | if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko
76 | if(key in _mods) {
77 | _mods[key] = true;
78 | // 'assignKey' from inside this closure is exported to window.key
79 | for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;
80 | return;
81 | }
82 | updateModifierKey(event);
83 |
84 | // see if we need to ignore the keypress (filter() can can be overridden)
85 | // by default ignore key presses if a select, textarea, or input is focused
86 | if(!assignKey.filter.call(this, event)) return;
87 |
88 | // abort if no potentially matching shortcuts found
89 | if (!(key in _handlers)) return;
90 |
91 | scope = getScope();
92 |
93 | // for each potential shortcut
94 | for (i = 0; i < _handlers[key].length; i++) {
95 | handler = _handlers[key][i];
96 |
97 | // see if it's in the current scope
98 | if(handler.scope == scope || handler.scope == 'all'){
99 | // check if modifiers match if any
100 | modifiersMatch = handler.mods.length > 0;
101 | for(k in _mods)
102 | if((!_mods[k] && index(handler.mods, +k) > -1) ||
103 | (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;
104 | // call the handler and stop the event if neccessary
105 | if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){
106 | if(handler.method(event, handler)===false){
107 | if(event.preventDefault) event.preventDefault();
108 | else event.returnValue = false;
109 | if(event.stopPropagation) event.stopPropagation();
110 | if(event.cancelBubble) event.cancelBubble = true;
111 | }
112 | }
113 | }
114 | }
115 | };
116 |
117 | // unset modifier keys on keyup
118 | function clearModifier(event){
119 | var key = event.keyCode, k,
120 | i = index(_downKeys, key);
121 |
122 | // remove key from _downKeys
123 | if (i >= 0) {
124 | _downKeys.splice(i, 1);
125 | }
126 |
127 | if(key == 93 || key == 224) key = 91;
128 | if(key in _mods) {
129 | _mods[key] = false;
130 | for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;
131 | }
132 | };
133 |
134 | function resetModifiers() {
135 | for(k in _mods) _mods[k] = false;
136 | for(k in _MODIFIERS) assignKey[k] = false;
137 | };
138 |
139 | // parse and assign shortcut
140 | function assignKey(key, scope, method){
141 | var keys, mods;
142 | keys = getKeys(key);
143 | if (method === undefined) {
144 | method = scope;
145 | scope = 'all';
146 | }
147 |
148 | // for each shortcut
149 | for (var i = 0; i < keys.length; i++) {
150 | // set modifier keys if any
151 | mods = [];
152 | key = keys[i].split('+');
153 | if (key.length > 1){
154 | mods = getMods(key);
155 | key = [key[key.length-1]];
156 | }
157 | // convert to keycode and...
158 | key = key[0]
159 | key = code(key);
160 | // ...store handler
161 | if (!(key in _handlers)) _handlers[key] = [];
162 | _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });
163 | }
164 | };
165 |
166 | // unbind all handlers for given key in current scope
167 | function unbindKey(key, scope) {
168 | var multipleKeys, keys,
169 | mods = [],
170 | i, j, obj;
171 |
172 | multipleKeys = getKeys(key);
173 |
174 | for (j = 0; j < multipleKeys.length; j++) {
175 | keys = multipleKeys[j].split('+');
176 |
177 | if (keys.length > 1) {
178 | mods = getMods(keys);
179 | key = keys[keys.length - 1];
180 | }
181 |
182 | key = code(key);
183 |
184 | if (scope === undefined) {
185 | scope = getScope();
186 | }
187 | if (!_handlers[key]) {
188 | return;
189 | }
190 | for (i = 0; i < _handlers[key].length; i++) {
191 | obj = _handlers[key][i];
192 | // only clear handlers if correct scope and mods match
193 | if (obj.scope === scope && compareArray(obj.mods, mods)) {
194 | _handlers[key][i] = {};
195 | }
196 | }
197 | }
198 | };
199 |
200 | // Returns true if the key with code 'keyCode' is currently down
201 | // Converts strings into key codes.
202 | function isPressed(keyCode) {
203 | if (typeof(keyCode)=='string') {
204 | keyCode = code(keyCode);
205 | }
206 | return index(_downKeys, keyCode) != -1;
207 | }
208 |
209 | function getPressedKeyCodes() {
210 | return _downKeys.slice(0);
211 | }
212 |
213 | function filter(event){
214 | var tagName = (event.target || event.srcElement).tagName;
215 | // ignore keypressed in any elements that support keyboard data input
216 | return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');
217 | }
218 |
219 | // initialize key. to false
220 | for(k in _MODIFIERS) assignKey[k] = false;
221 |
222 | // set current scope (default 'all')
223 | function setScope(scope){ _scope = scope || 'all' };
224 | function getScope(){ return _scope || 'all' };
225 |
226 | // delete all handlers for a given scope
227 | function deleteScope(scope){
228 | var key, handlers, i;
229 |
230 | for (key in _handlers) {
231 | handlers = _handlers[key];
232 | for (i = 0; i < handlers.length; ) {
233 | if (handlers[i].scope === scope) handlers.splice(i, 1);
234 | else i++;
235 | }
236 | }
237 | };
238 |
239 | // abstract key logic for assign and unassign
240 | function getKeys(key) {
241 | var keys;
242 | key = key.replace(/\s/g, '');
243 | keys = key.split(',');
244 | if ((keys[keys.length - 1]) == '') {
245 | keys[keys.length - 2] += ',';
246 | }
247 | return keys;
248 | }
249 |
250 | // abstract mods logic for assign and unassign
251 | function getMods(key) {
252 | var mods = key.slice(0, key.length - 1);
253 | for (var mi = 0; mi < mods.length; mi++)
254 | mods[mi] = _MODIFIERS[mods[mi]];
255 | return mods;
256 | }
257 |
258 | // cross-browser events
259 | function addEvent(object, event, method) {
260 | if (object.addEventListener)
261 | object.addEventListener(event, method, false);
262 | else if(object.attachEvent)
263 | object.attachEvent('on'+event, function(){ method(window.event) });
264 | };
265 |
266 | // set the handlers globally on document
267 | addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48
268 | addEvent(document, 'keyup', clearModifier);
269 |
270 | // reset modifiers to false whenever the window is (re)focused.
271 | addEvent(window, 'focus', resetModifiers);
272 |
273 | // store previously defined key
274 | var previousKey = global.key;
275 |
276 | // restore previously defined key and return reference to our key object
277 | function noConflict() {
278 | var k = global.key;
279 | global.key = previousKey;
280 | return k;
281 | }
282 |
283 | // set window.key and window.key.set/get/deleteScope, and the default filter
284 | global.key = assignKey;
285 | global.key.setScope = setScope;
286 | global.key.getScope = getScope;
287 | global.key.deleteScope = deleteScope;
288 | global.key.filter = filter;
289 | global.key.isPressed = isPressed;
290 | global.key.getPressedKeyCodes = getPressedKeyCodes;
291 | global.key.noConflict = noConflict;
292 | global.key.unbind = unbindKey;
293 |
294 | if(typeof module !== 'undefined') module.exports = assignKey;
295 |
296 | })(this);
--------------------------------------------------------------------------------
/styles/cinnabar-style-gh-pages/lib/keymaster.js:
--------------------------------------------------------------------------------
1 | // keymaster.js
2 | // (c) 2011-2013 Thomas Fuchs
3 | // keymaster.js may be freely distributed under the MIT license.
4 |
5 | ;(function(global){
6 | var k,
7 | _handlers = {},
8 | _mods = { 16: false, 18: false, 17: false, 91: false },
9 | _scope = 'all',
10 | // modifier keys
11 | _MODIFIERS = {
12 | '⇧': 16, shift: 16,
13 | '⌥': 18, alt: 18, option: 18,
14 | '⌃': 17, ctrl: 17, control: 17,
15 | '⌘': 91, command: 91
16 | },
17 | // special keys
18 | _MAP = {
19 | backspace: 8, tab: 9, clear: 12,
20 | enter: 13, 'return': 13,
21 | esc: 27, escape: 27, space: 32,
22 | left: 37, up: 38,
23 | right: 39, down: 40,
24 | del: 46, 'delete': 46,
25 | home: 36, end: 35,
26 | pageup: 33, pagedown: 34,
27 | ',': 188, '.': 190, '/': 191,
28 | '`': 192, '-': 189, '=': 187,
29 | ';': 186, '\'': 222,
30 | '[': 219, ']': 221, '\\': 220
31 | },
32 | code = function(x){
33 | return _MAP[x] || x.toUpperCase().charCodeAt(0);
34 | },
35 | _downKeys = [];
36 |
37 | for(k=1;k<20;k++) _MAP['f'+k] = 111+k;
38 |
39 | // IE doesn't support Array#indexOf, so have a simple replacement
40 | function index(array, item){
41 | var i = array.length;
42 | while(i--) if(array[i]===item) return i;
43 | return -1;
44 | }
45 |
46 | // for comparing mods before unassignment
47 | function compareArray(a1, a2) {
48 | if (a1.length != a2.length) return false;
49 | for (var i = 0; i < a1.length; i++) {
50 | if (a1[i] !== a2[i]) return false;
51 | }
52 | return true;
53 | }
54 |
55 | var modifierMap = {
56 | 16:'shiftKey',
57 | 18:'altKey',
58 | 17:'ctrlKey',
59 | 91:'metaKey'
60 | };
61 | function updateModifierKey(event) {
62 | for(k in _mods) _mods[k] = event[modifierMap[k]];
63 | };
64 |
65 | // handle keydown event
66 | function dispatch(event) {
67 | var key, handler, k, i, modifiersMatch, scope;
68 | key = event.keyCode;
69 |
70 | if (index(_downKeys, key) == -1) {
71 | _downKeys.push(key);
72 | }
73 |
74 | // if a modifier key, set the key. property to true and return
75 | if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko
76 | if(key in _mods) {
77 | _mods[key] = true;
78 | // 'assignKey' from inside this closure is exported to window.key
79 | for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;
80 | return;
81 | }
82 | updateModifierKey(event);
83 |
84 | // see if we need to ignore the keypress (filter() can can be overridden)
85 | // by default ignore key presses if a select, textarea, or input is focused
86 | if(!assignKey.filter.call(this, event)) return;
87 |
88 | // abort if no potentially matching shortcuts found
89 | if (!(key in _handlers)) return;
90 |
91 | scope = getScope();
92 |
93 | // for each potential shortcut
94 | for (i = 0; i < _handlers[key].length; i++) {
95 | handler = _handlers[key][i];
96 |
97 | // see if it's in the current scope
98 | if(handler.scope == scope || handler.scope == 'all'){
99 | // check if modifiers match if any
100 | modifiersMatch = handler.mods.length > 0;
101 | for(k in _mods)
102 | if((!_mods[k] && index(handler.mods, +k) > -1) ||
103 | (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;
104 | // call the handler and stop the event if neccessary
105 | if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){
106 | if(handler.method(event, handler)===false){
107 | if(event.preventDefault) event.preventDefault();
108 | else event.returnValue = false;
109 | if(event.stopPropagation) event.stopPropagation();
110 | if(event.cancelBubble) event.cancelBubble = true;
111 | }
112 | }
113 | }
114 | }
115 | };
116 |
117 | // unset modifier keys on keyup
118 | function clearModifier(event){
119 | var key = event.keyCode, k,
120 | i = index(_downKeys, key);
121 |
122 | // remove key from _downKeys
123 | if (i >= 0) {
124 | _downKeys.splice(i, 1);
125 | }
126 |
127 | if(key == 93 || key == 224) key = 91;
128 | if(key in _mods) {
129 | _mods[key] = false;
130 | for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;
131 | }
132 | };
133 |
134 | function resetModifiers() {
135 | for(k in _mods) _mods[k] = false;
136 | for(k in _MODIFIERS) assignKey[k] = false;
137 | };
138 |
139 | // parse and assign shortcut
140 | function assignKey(key, scope, method){
141 | var keys, mods;
142 | keys = getKeys(key);
143 | if (method === undefined) {
144 | method = scope;
145 | scope = 'all';
146 | }
147 |
148 | // for each shortcut
149 | for (var i = 0; i < keys.length; i++) {
150 | // set modifier keys if any
151 | mods = [];
152 | key = keys[i].split('+');
153 | if (key.length > 1){
154 | mods = getMods(key);
155 | key = [key[key.length-1]];
156 | }
157 | // convert to keycode and...
158 | key = key[0]
159 | key = code(key);
160 | // ...store handler
161 | if (!(key in _handlers)) _handlers[key] = [];
162 | _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });
163 | }
164 | };
165 |
166 | // unbind all handlers for given key in current scope
167 | function unbindKey(key, scope) {
168 | var multipleKeys, keys,
169 | mods = [],
170 | i, j, obj;
171 |
172 | multipleKeys = getKeys(key);
173 |
174 | for (j = 0; j < multipleKeys.length; j++) {
175 | keys = multipleKeys[j].split('+');
176 |
177 | if (keys.length > 1) {
178 | mods = getMods(keys);
179 | key = keys[keys.length - 1];
180 | }
181 |
182 | key = code(key);
183 |
184 | if (scope === undefined) {
185 | scope = getScope();
186 | }
187 | if (!_handlers[key]) {
188 | return;
189 | }
190 | for (i = 0; i < _handlers[key].length; i++) {
191 | obj = _handlers[key][i];
192 | // only clear handlers if correct scope and mods match
193 | if (obj.scope === scope && compareArray(obj.mods, mods)) {
194 | _handlers[key][i] = {};
195 | }
196 | }
197 | }
198 | };
199 |
200 | // Returns true if the key with code 'keyCode' is currently down
201 | // Converts strings into key codes.
202 | function isPressed(keyCode) {
203 | if (typeof(keyCode)=='string') {
204 | keyCode = code(keyCode);
205 | }
206 | return index(_downKeys, keyCode) != -1;
207 | }
208 |
209 | function getPressedKeyCodes() {
210 | return _downKeys.slice(0);
211 | }
212 |
213 | function filter(event){
214 | var tagName = (event.target || event.srcElement).tagName;
215 | // ignore keypressed in any elements that support keyboard data input
216 | return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');
217 | }
218 |
219 | // initialize key. to false
220 | for(k in _MODIFIERS) assignKey[k] = false;
221 |
222 | // set current scope (default 'all')
223 | function setScope(scope){ _scope = scope || 'all' };
224 | function getScope(){ return _scope || 'all' };
225 |
226 | // delete all handlers for a given scope
227 | function deleteScope(scope){
228 | var key, handlers, i;
229 |
230 | for (key in _handlers) {
231 | handlers = _handlers[key];
232 | for (i = 0; i < handlers.length; ) {
233 | if (handlers[i].scope === scope) handlers.splice(i, 1);
234 | else i++;
235 | }
236 | }
237 | };
238 |
239 | // abstract key logic for assign and unassign
240 | function getKeys(key) {
241 | var keys;
242 | key = key.replace(/\s/g, '');
243 | keys = key.split(',');
244 | if ((keys[keys.length - 1]) == '') {
245 | keys[keys.length - 2] += ',';
246 | }
247 | return keys;
248 | }
249 |
250 | // abstract mods logic for assign and unassign
251 | function getMods(key) {
252 | var mods = key.slice(0, key.length - 1);
253 | for (var mi = 0; mi < mods.length; mi++)
254 | mods[mi] = _MODIFIERS[mods[mi]];
255 | return mods;
256 | }
257 |
258 | // cross-browser events
259 | function addEvent(object, event, method) {
260 | if (object.addEventListener)
261 | object.addEventListener(event, method, false);
262 | else if(object.attachEvent)
263 | object.attachEvent('on'+event, function(){ method(window.event) });
264 | };
265 |
266 | // set the handlers globally on document
267 | addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48
268 | addEvent(document, 'keyup', clearModifier);
269 |
270 | // reset modifiers to false whenever the window is (re)focused.
271 | addEvent(window, 'focus', resetModifiers);
272 |
273 | // store previously defined key
274 | var previousKey = global.key;
275 |
276 | // restore previously defined key and return reference to our key object
277 | function noConflict() {
278 | var k = global.key;
279 | global.key = previousKey;
280 | return k;
281 | }
282 |
283 | // set window.key and window.key.set/get/deleteScope, and the default filter
284 | global.key = assignKey;
285 | global.key.setScope = setScope;
286 | global.key.getScope = getScope;
287 | global.key.deleteScope = deleteScope;
288 | global.key.filter = filter;
289 | global.key.isPressed = isPressed;
290 | global.key.getPressedKeyCodes = getPressedKeyCodes;
291 | global.key.noConflict = noConflict;
292 | global.key.unbind = unbindKey;
293 |
294 | if(typeof module !== 'undefined') module.exports = assignKey;
295 |
296 | })(this);
--------------------------------------------------------------------------------
/styles/tron-style-4.0.0/layers/ux-sdk-overlay.yaml:
--------------------------------------------------------------------------------
1 | layers:
2 | # Map overlays for styling the server response (using special source layer names) for route line, current location, and search result pins
3 | mz_route_line:
4 | data: { source: mz_route_line }
5 | draw:
6 | ux-route-line-overlay:
7 | color: [1.000, 1.000, 0.000, 1.00]
8 | order: 500
9 | width: [[0,5px],[5,12px],[11,12px],[13,14px],[14,18px],[15,24px],[16,28px],[17,30px],[18,30px]]
10 | mz_route_line_dash:
11 | data: { source: mz_dash_line }
12 | draw:
13 | ux-route-line-dash-overlay:
14 | color: [1.000,1.000,0.000]
15 | order: 500
16 | width: [[2,2px],[5,2.5px],[11,3px],[16,7px],[17,9px]]
17 | mz_route_line_transit:
18 | data: { source: mz_route_line_transit }
19 | draw:
20 | ux-transit-line-overlay:
21 | # each transit route segment could be a different "line" each with it's own color
22 | # but some transit lines don't define a color, in those cases default to blue
23 | # and since the color is coming from Transit.land they call it "color" instead of "colour"
24 | color: function() { return feature.color || '#06a6d4'; }
25 | order: 500
26 | width: [[0,5px],[5,12px],[11,12px],[13,14px],[14,18px],[15,24px],[16,28px],[17,30px],[18,30px]]
27 | mz_current_location_gem:
28 | data: { source: mz_current_location }
29 | draw:
30 | ux-location-gem-overlay:
31 | interactive: global.sdk_interactive
32 | sprite: ux-current-location
33 | size: 36px
34 | collide: false
35 | transition: { show: { time: 0s }, hide: { time: 0s } }
36 | mz_route_location:
37 | data: { source: mz_route_location }
38 | draw:
39 | ux-location-gem-overlay:
40 | interactive: global.sdk_interactive
41 | sprite: ux-route-arrow
42 | size: [60px,60px]
43 | collide: false
44 | transition: { show: { time: 0s }, hide: { time: 0s } }
45 | mz_route_start:
46 | data: { source: mz_route_start }
47 | draw:
48 | ux-icons-overlay:
49 | interactive: global.sdk_interactive
50 | priority: 1
51 | sprite: ux-route-start
52 | size: [36px,46px]
53 | collide: false
54 | anchor: top
55 | transition: { show: { time: 0s }, hide: { time: 0s } }
56 | mz_route_destination:
57 | data: { source: mz_route_destination }
58 | draw:
59 | ux-icons-overlay:
60 | interactive: global.sdk_interactive
61 | priority: 1
62 | sprite: ux-route-stop
63 | size: [36px,46px]
64 | collide: false
65 | anchor: top
66 | transition: { show: { time: 0s }, hide: { time: 0s } }
67 | mz_route_transit_stop:
68 | data: { source: mz_route_transit_stop }
69 | draw:
70 | ux-icons-overlay:
71 | interactive: global.sdk_interactive
72 | sprite: ux-transit-stop
73 | size: [15px,15px]
74 | collide: false
75 | transition: { show: { time: 0s }, hide: { time: 0s } }
76 | mz_search_result:
77 | data: { source: mz_search_result }
78 | draw:
79 | ux-icons-overlay:
80 | interactive: global.sdk_interactive
81 | sprite: ux-search-active
82 | size: [36px,54px]
83 | collide: false
84 | anchor: top
85 | transition: { show: { time: 0s }, hide: { time: 0s } }
86 | inactive:
87 | filter: { state: inactive }
88 | draw:
89 | ux-icons-overlay:
90 | sprite: ux-search-inactive
91 | mz_dropped_pin:
92 | data: { source: mz_dropped_pin }
93 | draw:
94 | ux-icons-overlay:
95 | interactive: global.sdk_interactive
96 | sprite: ux-search-active
97 | size: [36px,54px]
98 | collide: false
99 | anchor: top
100 | transition: { show: { time: 0s }, hide: { time: 0s } }
101 |
102 | # Used by the SDK to place point, line, and polygon overlays on the map
103 | mz_default_point:
104 | data: { source: mz_default_point }
105 | draw:
106 | sdk-point-overlay:
107 | interactive: global.sdk_interactive
108 | sprite: ux-search-active
109 | size: [36px,54px]
110 | collide: false
111 | anchor: top
112 | transition: { show: { time: 0s }, hide: { time: 0s } }
113 | mz_default_shield:
114 | data: { source: mz_default_shield }
115 | draw:
116 | sdk-shield-overlay:
117 | interactive: global.sdk_interactive
118 | sprite: |
119 | function() {
120 | if( feature.ref ) {
121 | return ('sdk_shield-' + feature.ref.length + 'char');
122 | } else {
123 | return ('sdk_shield-' + feature.name.length + 'char');
124 | }
125 | }
126 | sprite_default: sdk_shield-1char
127 | color: global.sdk_shield_color
128 | collide: false
129 | transition: { show: { time: 0s }, hide: { time: 0s } }
130 | text:
131 | # offset: [0px, -1px]
132 | text_source: |
133 | function() {
134 | if( feature.ref ) {
135 | return feature.ref;
136 | } else {
137 | return feature.name;
138 | }
139 | }
140 | anchor: center
141 | font:
142 | family: Montserrat
143 | fill: global.sdk_shield_text_color
144 | style: bold
145 | size: [[7,7px],[12,8px],[16,11px]]
146 |
147 | width_1char:
148 | filter: |
149 | function() {
150 | if( feature.ref ) {
151 | return (feature.ref.length === 1);
152 | } else {
153 | return (feature.name.length === 1);
154 | }
155 | }
156 | draw:
157 | sdk-shield-overlay:
158 | size: [[6,[16px,16px]],[13,[18px,18px]],[16,[21px,21px]]]
159 | width_2char:
160 | filter: |
161 | function() {
162 | if( feature.ref ) {
163 | return (feature.ref.length === 2);
164 | } else {
165 | return (feature.name.length === 2);
166 | }
167 | }
168 | draw:
169 | sdk-shield-overlay:
170 | size: [[6,[21px,16px]],[13,[24px,18px]],[16,[28px,21px]]]
171 | width_3char:
172 | filter: |
173 | function() {
174 | if( feature.ref ) {
175 | return (feature.ref.length === 3);
176 | } else {
177 | return (feature.name.length === 3);
178 | }
179 | }
180 | draw:
181 | sdk-shield-overlay:
182 | size: [[6,[27px,16px]],[13,[31px,18px]],[16,[36px,21px]]]
183 | width_4char:
184 | filter: |
185 | function() {
186 | if( feature.ref ) {
187 | return (feature.ref.length === 4);
188 | } else {
189 | return (feature.name.length === 4);
190 | }
191 | }
192 | draw:
193 | sdk-shield-overlay:
194 | size: [[6,[32px,16px]],[13,[36px,18px]],[16,[41px,21px]]]
195 | width_5char:
196 | filter: |
197 | function() {
198 | if( feature.ref ) {
199 | return (feature.ref.length === 5);
200 | } else {
201 | return (feature.name.length === 5);
202 | }
203 | }
204 | draw:
205 | sdk-shield-overlay:
206 | size: [[6,[37px,16px]],[13,[41px,18px]],[16,[48px,21px]]]
207 | # this is kinda a hack
208 | width_longggggg:
209 | filter: |
210 | function() {
211 | if( feature.ref ) {
212 | return (feature.ref.length > 5);
213 | } else {
214 | return (feature.name.length > 5);
215 | }
216 | }
217 | draw:
218 | sdk-shield-overlay:
219 | visible: false
220 | mz_default_line:
221 | data: { source: mz_default_line }
222 | draw:
223 | sdk-line-overlay:
224 | color: [1.000,0.000,1.000]
225 | order: 503
226 | width: 3px
227 | mz_default_polygon:
228 | data: { source: mz_default_polygon }
229 | draw:
230 | sdk-polygon-overlay:
231 | color: [1.000,0.000,1.000,0.5] #'#06b1e2'
232 | order: 501
233 | sdk-line-overlay:
234 | color: '#06a6d4'
235 | order: 502
236 | width: 0px
237 |
238 | styles:
239 | ux-route-line-overlay:
240 | base: lines
241 | mix: [lines-glow]
242 | blend: overlay
243 | blend_order: 0
244 | shaders:
245 | defines:
246 | GLOW_WIDTH: 0.45
247 | GLOW_BRIGHTNESS: .5
248 | ux-route-line-dash-overlay:
249 | base: lines
250 | blend: overlay
251 | blend_order: 0
252 | dash: [2, 1]
253 | ux-transit-line-overlay:
254 | base: lines
255 | mix: [lines-glow]
256 | blend: overlay
257 | blend_order: 0
258 | shaders:
259 | defines:
260 | GLOW_WIDTH: 0.45
261 | GLOW_BRIGHTNESS: .5
262 | ux-location-gem-overlay:
263 | base: points
264 | mix: icons
265 | interactive: global.sdk_interactive
266 | blend: overlay
267 | blend_order: 2
268 | ux-icons-overlay:
269 | base: points
270 | mix: icons
271 | interactive: global.sdk_interactive
272 | blend: overlay
273 | blend_order: 3
274 | sdk-point-overlay:
275 | base: points
276 | mix: icons
277 | interactive: global.sdk_interactive
278 | blend: overlay
279 | blend_order: 3
280 | sdk-shield-overlay:
281 | base: points
282 | mix: icons
283 | interactive: global.sdk_interactive
284 | blend: overlay
285 | blend_order: 3
286 | sdk-line-overlay:
287 | base: lines
288 | blend: overlay
289 | blend_order: 0
290 | sdk-polygon-overlay:
291 | base: polygons
292 | blend: overlay
293 | blend_order: 0
294 |
--------------------------------------------------------------------------------