├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTORS.md ├── LICENSE ├── README.md ├── demo-angular ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── menu.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── menu.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── menu.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── menu.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── menu.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── menu.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-1125h.png │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-667h@2x.png │ │ │ ├── Default-736h@3x.png │ │ │ ├── Default-Landscape-X.png │ │ │ ├── Default-Landscape-XR.png │ │ │ ├── Default-Landscape-XS-Max.png │ │ │ ├── Default-Landscape.png │ │ │ ├── Default-Landscape@2x.png │ │ │ ├── Default-Landscape@3x.png │ │ │ ├── Default-Portrait-XR.png │ │ │ ├── Default-Portrait-XS-Max.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Default-Portrait@2x.png │ │ │ ├── Default.png │ │ │ └── Default@2x.png │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ ├── LaunchScreen-AspectFill@3x.png │ │ │ └── LaunchScreen.AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ ├── LaunchScreen-Center@3x.png │ │ │ └── LaunchScreen.Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ ├── build.xcconfig │ │ └── navigation │ │ ├── menu.png │ │ ├── menu@2x.png │ │ └── menu@3x.png ├── LICENSE ├── README.md ├── angular.json ├── e2e │ ├── config │ │ ├── appium.capabilities.json │ │ └── mocha.opts │ ├── on-raddrawer-navigate-crash.e2e-spec.ts │ ├── setup.ts │ └── tsconfig.json ├── nsconfig.json ├── package-lock.json ├── package.json ├── references.d.ts ├── src │ ├── _app-common.scss │ ├── _app-variables.scss │ ├── app.android.scss │ ├── app.ios.scss │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── components │ │ │ └── map │ │ │ │ ├── map.component.css │ │ │ │ └── map.component.ts │ │ ├── pages │ │ │ ├── home │ │ │ │ ├── home-page.component.html │ │ │ │ └── home-page.component.ts │ │ │ ├── plain │ │ │ │ ├── plain-page.component.html │ │ │ │ └── plain-page.component.ts │ │ │ ├── test-no-destroy │ │ │ │ ├── .test-page.component.html.swp │ │ │ │ ├── .test-page.component.ts.swp │ │ │ │ ├── test-no-destroy-page.component.html │ │ │ │ └── test-no-destroy-page.component.ts │ │ │ ├── test │ │ │ │ ├── test-page.component.html │ │ │ │ └── test-page.component.ts │ │ │ └── toggle-map-test │ │ │ │ ├── .home-page.component.ts.swp │ │ │ │ ├── toggle-map-test-page.component.html │ │ │ │ └── toggle-map-test-page.component.ts │ │ └── services │ │ │ ├── debug.service.ts │ │ │ ├── events.service.ts │ │ │ ├── platform.service.ts │ │ │ └── settings.service.ts │ ├── fonts │ │ └── FontAwesome.ttf │ ├── main.ts │ └── package.json ├── tsconfig.json ├── tsconfig.tns.json ├── tsfmt.json ├── tslint.json └── webpack.config.js ├── demo ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── app.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-ldpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-nodpi │ │ │ │ └── splash_screen.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── values-v21 │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-29.png │ │ │ │ ├── icon-29@2x.png │ │ │ │ ├── icon-29@3x.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-40@3x.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-57.png │ │ │ │ ├── icon-57@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-60@3x.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ └── icon-83.5@2x.png │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.launchimage │ │ │ │ ├── Contents.json │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Default-667h@2x.png │ │ │ │ ├── Default-736h@3x.png │ │ │ │ ├── Default-Landscape.png │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ ├── Default-Portrait.png │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ ├── Default.png │ │ │ │ └── Default@2x.png │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ ├── build.xcconfig │ │ │ └── icon-40.png │ ├── OSM-map-style.json │ ├── app.css │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ ├── package.json │ ├── res │ │ ├── markers │ │ │ ├── green_pin_marker.png │ │ │ └── home_marker.png │ │ └── telerik-logo.png │ ├── tests │ │ └── tests.js │ ├── tsconfig.json │ ├── vendor-platform.android.ts │ ├── vendor-platform.ios.ts │ └── vendor.ts ├── karma.conf.js ├── package-lock.json ├── package.json ├── tsconfig.json └── tsconfig.tns.json ├── mapbox_config.ts ├── publish ├── pack.sh ├── package-lock.json ├── package.json ├── publish.sh └── unpack.sh ├── screenshots ├── ios-demoapp-slice.png ├── ios-xml-declared.png └── mapbox_logo.png ├── src ├── .npmignore ├── README.md ├── geo.utils.ts ├── index.d.ts ├── mapbox.android.ts ├── mapbox.common.ts ├── mapbox.ios.ts ├── package-lock.json ├── package.json ├── platforms │ ├── android │ │ ├── AndroidManifest.xml │ │ └── include.gradle │ └── ios │ │ ├── Info.plist │ │ ├── Mapbox.d.ts │ │ └── Podfile ├── references.d.ts └── tsconfig.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .history 3 | .vscode 4 | .DS_Store 5 | *.js 6 | *.log 7 | *.map 8 | *.tgz 9 | *.aar 10 | !src/angular/*.js 11 | !demo/karma.conf.js 12 | !demo/app/tests/*.js 13 | demo/*.d.ts 14 | src/*.d.ts 15 | !src/index.d.ts 16 | !src/references.d.ts 17 | demo/lib 18 | demo/platforms 19 | node_modules 20 | demo/hooks/ 21 | publish/package/ 22 | ngdemo/lib 23 | ngdemo/platoforms 24 | ngdemo/node_modules 25 | ngdemo/hooks 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | matrix: 2 | include: 3 | - stage: "Lint" 4 | language: node_js 5 | os: linux 6 | node_js: "8" 7 | script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint 8 | - stage: "WebPack, Build and Test" 9 | os: osx 10 | env: 11 | - WebPack="iOS" 12 | osx_image: xcode9.4 13 | language: node_js 14 | node_js: "8" 15 | jdk: oraclejdk8 16 | before_install: 17 | - gem install cocoapods 18 | - pod setup 19 | - pod repo update 20 | - pip install six 21 | script: cd demo && npm run build.plugin && npm i && tns build ios --bundle --env.uglify 22 | - language: android 23 | os: linux 24 | env: 25 | - WebPack="Android" 26 | jdk: oraclejdk8 27 | before_install: nvm install 8 28 | script: cd demo && npm run build.plugin && npm i && tns build android --bundle --env.uglify --env.snapshot 29 | - language: android 30 | env: 31 | - BuildAndroid="28" 32 | os: linux 33 | jdk: oraclejdk8 34 | before_install: nvm install stable 35 | script: 36 | - cd src && npm run build && cd ../demo && tns build android 37 | - os: osx 38 | env: 39 | - BuildiOS="11" 40 | - Xcode="9.4" 41 | osx_image: xcode9.4 42 | language: node_js 43 | node_js: "8" 44 | jdk: oraclejdk8 45 | before_install: 46 | - gem install cocoapods 47 | - pod setup 48 | - pod repo update 49 | - pip install six 50 | script: 51 | - cd src && npm run build && cd ../demo && tns build ios 52 | - os: linux 53 | language: android 54 | dist: precise 55 | sudo: required 56 | jdk: oraclejdk8 57 | before_script: 58 | - echo no | android create avd --force -n test -t android-24 -b armeabi-v7a 59 | - emulator -avd test -no-audio -no-window & 60 | - android-wait-for-emulator 61 | before_install: 62 | - nvm install 8 63 | script: cd src && npm run build && npm run test.android 64 | - os: osx 65 | language: node_js 66 | node_js: "8" 67 | jdk: oraclejdk8 68 | osx_image: xcode9.4 69 | before_install: 70 | - gem install cocoapods 71 | - pod setup 72 | - pod repo update 73 | - pip install six 74 | script: cd src && npm run build && npm run test.ios 75 | 76 | android: 77 | components: 78 | - tools 79 | - build-tools-28.0.3 80 | - android-28 81 | - android-24 82 | - extra-android-m2repository 83 | - sys-img-armeabi-v7a-android-24 84 | 85 | install: 86 | - echo no | npm install -g nativescript 87 | - tns usage-reporting disable 88 | - tns error-reporting disable 89 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | # Maintainers 2 | 3 | Eddy Verbruggen https://github.com/EddyVerbruggen 4 | Yermo Lamers https://github.com/Yermo 5 | 6 | # Contributors 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2018 Eddy Verbruggen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, 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, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /demo-angular/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.ts] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /demo-angular/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !webpack.config.js 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # General 19 | .DS_Store 20 | .AppleDouble 21 | .LSOverride 22 | .idea 23 | .cloud 24 | .project 25 | tmp/ 26 | typings/ 27 | 28 | # Visual Studio Code 29 | .vscode/* 30 | !.vscode/settings.json 31 | !.vscode/tasks.json 32 | !.vscode/launch.json 33 | !.vscode/extensions.json 34 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/menu.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/menu.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/menu.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/menu.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/menu.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/menu.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 15 | 16 | 17 | 20 | 21 | 25 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 | 20 | 21 | 22 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 42 | 43 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "2688h", 7 | "filename" : "Default-Portrait-XS-Max.png", 8 | "minimum-system-version" : "12.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "2688h", 16 | "filename" : "Default-Landscape-XS-Max.png", 17 | "minimum-system-version" : "12.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "1792h", 25 | "filename" : "Default-Portrait-XR.png", 26 | "minimum-system-version" : "12.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "extent" : "full-screen", 32 | "idiom" : "iphone", 33 | "subtype" : "1792h", 34 | "filename" : "Default-Landscape-XR.png", 35 | "minimum-system-version" : "12.0", 36 | "orientation" : "landscape", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "extent" : "full-screen", 41 | "idiom" : "iphone", 42 | "subtype" : "2436h", 43 | "filename" : "Default-1125h.png", 44 | "minimum-system-version" : "11.0", 45 | "orientation" : "portrait", 46 | "scale" : "3x" 47 | }, 48 | { 49 | "extent" : "full-screen", 50 | "idiom" : "iphone", 51 | "subtype" : "2436h", 52 | "filename" : "Default-Landscape-X.png", 53 | "minimum-system-version" : "11.0", 54 | "orientation" : "landscape", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "extent" : "full-screen", 59 | "idiom" : "iphone", 60 | "subtype" : "736h", 61 | "filename" : "Default-736h@3x.png", 62 | "minimum-system-version" : "8.0", 63 | "orientation" : "portrait", 64 | "scale" : "3x" 65 | }, 66 | { 67 | "extent" : "full-screen", 68 | "idiom" : "iphone", 69 | "subtype" : "736h", 70 | "filename" : "Default-Landscape@3x.png", 71 | "minimum-system-version" : "8.0", 72 | "orientation" : "landscape", 73 | "scale" : "3x" 74 | }, 75 | { 76 | "extent" : "full-screen", 77 | "idiom" : "iphone", 78 | "subtype" : "667h", 79 | "filename" : "Default-667h@2x.png", 80 | "minimum-system-version" : "8.0", 81 | "orientation" : "portrait", 82 | "scale" : "2x" 83 | }, 84 | { 85 | "orientation" : "portrait", 86 | "idiom" : "iphone", 87 | "filename" : "Default@2x.png", 88 | "extent" : "full-screen", 89 | "minimum-system-version" : "7.0", 90 | "scale" : "2x" 91 | }, 92 | { 93 | "extent" : "full-screen", 94 | "idiom" : "iphone", 95 | "subtype" : "retina4", 96 | "filename" : "Default-568h@2x.png", 97 | "minimum-system-version" : "7.0", 98 | "orientation" : "portrait", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "filename" : "Default-Portrait.png", 105 | "extent" : "full-screen", 106 | "minimum-system-version" : "7.0", 107 | "scale" : "1x" 108 | }, 109 | { 110 | "orientation" : "landscape", 111 | "idiom" : "ipad", 112 | "filename" : "Default-Landscape.png", 113 | "extent" : "full-screen", 114 | "minimum-system-version" : "7.0", 115 | "scale" : "1x" 116 | }, 117 | { 118 | "orientation" : "portrait", 119 | "idiom" : "ipad", 120 | "filename" : "Default-Portrait@2x.png", 121 | "extent" : "full-screen", 122 | "minimum-system-version" : "7.0", 123 | "scale" : "2x" 124 | }, 125 | { 126 | "orientation" : "landscape", 127 | "idiom" : "ipad", 128 | "filename" : "Default-Landscape@2x.png", 129 | "extent" : "full-screen", 130 | "minimum-system-version" : "7.0", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "iphone", 136 | "filename" : "Default.png", 137 | "extent" : "full-screen", 138 | "scale" : "1x" 139 | }, 140 | { 141 | "orientation" : "portrait", 142 | "idiom" : "iphone", 143 | "filename" : "Default@2x.png", 144 | "extent" : "full-screen", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "orientation" : "portrait", 149 | "idiom" : "iphone", 150 | "filename" : "Default-568h@2x.png", 151 | "extent" : "full-screen", 152 | "subtype" : "retina4", 153 | "scale" : "2x" 154 | }, 155 | { 156 | "orientation" : "portrait", 157 | "idiom" : "ipad", 158 | "extent" : "to-status-bar", 159 | "scale" : "1x" 160 | }, 161 | { 162 | "orientation" : "portrait", 163 | "idiom" : "ipad", 164 | "filename" : "Default-Portrait.png", 165 | "extent" : "full-screen", 166 | "scale" : "1x" 167 | }, 168 | { 169 | "orientation" : "landscape", 170 | "idiom" : "ipad", 171 | "extent" : "to-status-bar", 172 | "scale" : "1x" 173 | }, 174 | { 175 | "orientation" : "landscape", 176 | "idiom" : "ipad", 177 | "filename" : "Default-Landscape.png", 178 | "extent" : "full-screen", 179 | "scale" : "1x" 180 | }, 181 | { 182 | "orientation" : "portrait", 183 | "idiom" : "ipad", 184 | "extent" : "to-status-bar", 185 | "scale" : "2x" 186 | }, 187 | { 188 | "orientation" : "portrait", 189 | "idiom" : "ipad", 190 | "filename" : "Default-Portrait@2x.png", 191 | "extent" : "full-screen", 192 | "scale" : "2x" 193 | }, 194 | { 195 | "orientation" : "landscape", 196 | "idiom" : "ipad", 197 | "extent" : "to-status-bar", 198 | "scale" : "2x" 199 | }, 200 | { 201 | "orientation" : "landscape", 202 | "idiom" : "ipad", 203 | "filename" : "Default-Landscape@2x.png", 204 | "extent" : "full-screen", 205 | "scale" : "2x" 206 | } 207 | ], 208 | "info" : { 209 | "version" : 1, 210 | "author" : "xcode" 211 | } 212 | } -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIStatusBarStyle 47 | UIStatusBarStyleLightContent 48 | UIViewControllerBasedStatusBarAppearance 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode 8 you need to specify your development team. 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/navigation/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/navigation/menu.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/navigation/menu@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/navigation/menu@2x.png -------------------------------------------------------------------------------- /demo-angular/App_Resources/iOS/navigation/menu@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/App_Resources/iOS/navigation/menu@3x.png -------------------------------------------------------------------------------- /demo-angular/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2015-2019 Progress Software Corporation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /demo-angular/README.md: -------------------------------------------------------------------------------- 1 | # Angular Mapbox Demo 2 | 3 | This is loosely based on the drawer-navigation-ng NativeScript Angular template. 4 | 5 | To run this demo you must first build the plugin. 6 | 7 | ``` 8 | cd ../src 9 | npm run build.dist 10 | ``` 11 | 12 | then you can run the demo on a connected device or emulator 13 | 14 | ``` 15 | tns run android 16 | ``` 17 | -or- 18 | ``` 19 | tns run ios 20 | ``` 21 | 22 | # Tests 23 | 24 | ``` 25 | npm run e2e -- --runType android28 26 | ``` 27 | 28 | where android28 is one of the images listed in the e2e config. 29 | 30 | # The Long Standing Android Navigation Crash : TEMPORARY workaround for tns-core-modules 6.1.12 31 | 32 | There is a nasty intermittent crash when navigating away from pages that house maps when using 33 | markingMode:none. 34 | 35 | https://github.com/NativeScript/NativeScript/issues/7954 36 | https://github.com/NativeScript/NativeScript/issues/7867 37 | 38 | This /seems/ to resolve the issue but probably with some serious downsides: 39 | 40 | tns-core-modules/ui/styling/background.android.js 41 | 42 | change line 76 from: 43 | 44 | ``` 45 | defaultDrawable = cachedDrawable.newDrawable(nativeView.getResources()); 46 | ``` 47 | to 48 | ``` 49 | defaultDrawable = null; 50 | ``` 51 | 52 | -------------------------------------------------------------------------------- /demo-angular/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "cli": { 6 | "defaultCollection": "@nativescript/schematics" 7 | }, 8 | "projects": { 9 | "demo-angular": { 10 | "root": "", 11 | "sourceRoot": "src", 12 | "projectType": "application", 13 | "prefix": "ns" 14 | } 15 | }, 16 | "defaultProject": "demo-angular" 17 | } 18 | -------------------------------------------------------------------------------- /demo-angular/e2e/config/appium.capabilities.json: -------------------------------------------------------------------------------- 1 | { 2 | "android19": { 3 | "platformName": "Android", 4 | "platformVersion": "4.4", 5 | "deviceName": "Emulator-Api19-Default", 6 | "avd": "Emulator-Api19-Default", 7 | "lt": 60000, 8 | "newCommandTimeout": 720, 9 | "noReset": false, 10 | "fullReset": false, 11 | "app": "" 12 | }, 13 | "android21": { 14 | "platformName": "Android", 15 | "platformVersion": "5.0", 16 | "deviceName": "Emulator-Api21-Default", 17 | "avd": "Emulator-Api21-Default", 18 | "lt": 60000, 19 | "newCommandTimeout": 720, 20 | "noReset": false, 21 | "fullReset": false, 22 | "app": "" 23 | }, 24 | "android23": { 25 | "platformName": "Android", 26 | "platformVersion": "6.0", 27 | "deviceName": "Emulator-Api23-Default", 28 | "avd": "Emulator-Api23-Default", 29 | "lt": 60000, 30 | "newCommandTimeout": 720, 31 | "noReset": false, 32 | "fullReset": false, 33 | "app": "" 34 | }, 35 | "android24": { 36 | "platformName": "Android", 37 | "platformVersion": "7.0", 38 | "deviceName": "Emulator-Api24-Default", 39 | "avd": "Emulator-Api24-Default", 40 | "lt": 60000, 41 | "newCommandTimeout": 720, 42 | "noReset": false, 43 | "fullReset": false, 44 | "app": "" 45 | }, 46 | "android25": { 47 | "platformName": "Android", 48 | "platformVersion": "7.1", 49 | "deviceName": "Emulator-Api25-Google", 50 | "avd": "Emulator-Api25-Google", 51 | "lt": 60000, 52 | "newCommandTimeout": 720, 53 | "noReset": false, 54 | "fullReset": false, 55 | "app": "" 56 | }, 57 | "android26": { 58 | "platformName": "Android", 59 | "platformVersion": "8.0", 60 | "deviceName": "Emulator-Api26-Google", 61 | "avd": "Emulator-Api26-Google", 62 | "lt": 60000, 63 | "newCommandTimeout": 720, 64 | "noReset": false, 65 | "fullReset": false, 66 | "app": "" 67 | }, 68 | "android27": { 69 | "platformName": "Android", 70 | "platformVersion": "27", 71 | "deviceName": "Emulator-Api27-Google", 72 | "avd": "Emulator-Api27-Google", 73 | "lt": 60000, 74 | "newCommandTimeout": 720, 75 | "noReset": false, 76 | "fullReset": false, 77 | "app": "" 78 | }, 79 | "android28": { 80 | "platformName": "Android", 81 | "platformVersion": "28", 82 | "deviceName": "Emulator-Api28-Google", 83 | "avd": "Emulator-Api28-Google", 84 | "lt": 60000, 85 | "newCommandTimeout": 720, 86 | "noReset": false, 87 | "fullReset": false, 88 | "app": "" 89 | }, 90 | "sim.iPhone7": { 91 | "platformName": "iOS", 92 | "platformVersion": "/12.*/", 93 | "deviceName": "iPhone 7", 94 | "noReset": false, 95 | "fullReset": false, 96 | "app": "" 97 | }, 98 | "sim.iPhone8": { 99 | "platformName": "iOS", 100 | "platformVersion": "/12*/", 101 | "deviceName": "iPhone 8", 102 | "noReset": false, 103 | "fullReset": false, 104 | "app": "" 105 | }, 106 | "sim.iPhoneX": { 107 | "platformName": "iOS", 108 | "platformVersion": "/12*/", 109 | "deviceName": "iPhone X", 110 | "noReset": false, 111 | "fullReset": false, 112 | "app": "" 113 | }, 114 | "sim.iPhoneXS": { 115 | "platformName": "ios", 116 | "platformVersion": "/12*/", 117 | "deviceName": "iPhone XS", 118 | "noReset": false, 119 | "fullReset": false, 120 | "app": "" 121 | } 122 | } -------------------------------------------------------------------------------- /demo-angular/e2e/config/mocha.opts: -------------------------------------------------------------------------------- 1 | --timeout 999999 2 | --recursive e2e 3 | --reporter mochawesome 4 | --reporter-options quiet=true,html=true,inline=true,autoOpen=true 5 | --exit -------------------------------------------------------------------------------- /demo-angular/e2e/on-raddrawer-navigate-crash.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | 2 | import { AppiumDriver, createDriver, SearchOptions, nsCapabilities } from "nativescript-dev-appium"; 3 | import { assert } from "chai"; 4 | const addContext = require('mochawesome/addContext'); 5 | 6 | /** 7 | * Iterate navigation between the home and test crash pages 8 | */ 9 | 10 | async function HomeToTestCrashNavigation( driver : any, group : number, iterations : number ) { 11 | 12 | let timestamp : number = 0; 13 | 14 | for ( let i = 0; i < iterations; i++ ) { 15 | 16 | timestamp = Date.now(); 17 | 18 | let btn = await driver.findElementByClassName('android.widget.ImageButton'); 19 | await btn.click(); 20 | 21 | console.log( "Page Navigation " + group + ' ' + i + " RadDrawerButton Click From Home " + ( Date.now() - timestamp ) ); 22 | 23 | timestamp = Date.now(); 24 | 25 | btn = await driver.findElementByAutomationText("Test Crash"); 26 | await btn.click(); 27 | console.log( "Page Navigation " + group + ' ' + i + " Test Crash Navigation " + ( Date.now() - timestamp ) ); 28 | 29 | timestamp = Date.now(); 30 | 31 | btn = await driver.findElementByClassName('android.widget.ImageButton'); 32 | await btn.click(); 33 | 34 | console.log( "Page Navigation " + group + ' ' + i + " RadDrawerButton Click From Test Crash " + ( Date.now() - timestamp ) ); 35 | 36 | timestamp = Date.now(); 37 | 38 | btn = await driver.findElementByAutomationText( "Home" ); 39 | await btn.click(); 40 | 41 | console.log( "Page Navigation " + group + ' ' + i + " Home Navigation " + ( Date.now() - timestamp ) ); 42 | 43 | } 44 | } 45 | 46 | // ------------------------------------------------------------------------------------------- 47 | /** 48 | * Test Rad Drawer Crash 49 | */ 50 | 51 | describe( "Rad Drawer View Navigation Crash", async () => { 52 | const defaultWaitTime = 60 * 60 * 1000; 53 | let driver: AppiumDriver; 54 | 55 | before(async function(){ 56 | nsCapabilities.testReporter.context = this; 57 | driver = await createDriver(); 58 | }); 59 | 60 | after(async function () { 61 | await driver.quit(); 62 | console.log("Quit driver!"); 63 | }); 64 | 65 | afterEach(async function () { 66 | if (this.currentTest.state === "failed") { 67 | await driver.logTestArtifacts(this.currentTest.title); 68 | } 69 | }); 70 | 71 | // FIXME: How to specify that this test should run indefinitely? 72 | 73 | it( "should repeatedly navigate between Home and Test Crash 50 times", async function () { 74 | await HomeToTestCrashNavigation( driver, 1, 50 ); 75 | }); 76 | 77 | it( "should repeatedly navigate between Home and Test Crash 50 times", async function () { 78 | await HomeToTestCrashNavigation( driver, 2, 50 ); 79 | }); 80 | 81 | it( "should repeatedly navigate between Home and Test Crash 50 times", async function () { 82 | await HomeToTestCrashNavigation( driver, 3, 50 ); 83 | }); 84 | 85 | it( "should repeatedly navigate between Home and Test Crash 50 times", async function () { 86 | await HomeToTestCrashNavigation( driver, 4, 50 ); 87 | }); 88 | 89 | }); 90 | -------------------------------------------------------------------------------- /demo-angular/e2e/setup.ts: -------------------------------------------------------------------------------- 1 | import { startServer, stopServer, ITestReporter, nsCapabilities, LogImageType } from "nativescript-dev-appium"; 2 | const addContext = require('mochawesome/addContext'); 3 | 4 | const testReporterContext = {}; 5 | testReporterContext.name = "mochawesome"; 6 | 7 | /** 8 | * This folder should be the one provided in mocha.opts. 9 | * If omitted the default one is "mochawesome-report". 10 | * This is necessary because we need the logged images to be relatively 11 | * positioned according to mochawesome.html in the same folder 12 | */ 13 | 14 | testReporterContext.reportDir = "mochawesome-report"; 15 | testReporterContext.log = addContext; 16 | testReporterContext.logImageTypes = [LogImageType.screenshots]; 17 | nsCapabilities.testReporter = testReporterContext; 18 | 19 | before("start server", async function () { 20 | nsCapabilities.testReporter.context = this; 21 | await startServer(); 22 | }); 23 | 24 | after("stop server", async function () { 25 | await stopServer(); 26 | }); 27 | -------------------------------------------------------------------------------- /demo-angular/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "importHelpers": false, 8 | "types": [ 9 | "mocha", 10 | "chai", 11 | "node" 12 | ], 13 | "lib": [ 14 | "es2015", 15 | "dom" 16 | ], 17 | "baseUrl": "." 18 | } 19 | } -------------------------------------------------------------------------------- /demo-angular/nsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "appResourcesPath": "App_Resources", 3 | "appPath": "src" 4 | } -------------------------------------------------------------------------------- /demo-angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "nativescript": { 3 | "id": "com.flyingbricksoftware.MapboxAngularDemo", 4 | "tns-ios": { 5 | "version": "6.1.0" 6 | }, 7 | "tns-android": { 8 | "version": "6.5.0" 9 | } 10 | }, 11 | "description": "NativeScript Mapbox Plugin Angular Demo", 12 | "license": "SEE LICENSE IN LICENSE", 13 | "repository": "", 14 | "scripts": { 15 | "lint": "tslint \"src/**/*.ts\"", 16 | "e2e": "node ./node_modules/nativescript-dev-appium/check-dev-deps.js && tsc -p e2e && mocha --opts ./e2e/config/mocha.opts ", 17 | "e2e-watch": "tsc -p e2e --watch" 18 | }, 19 | "dependencies": { 20 | "@angular/animations": "~8.2.0", 21 | "@angular/common": "~8.2.0", 22 | "@angular/compiler": "~8.2.0", 23 | "@angular/core": "~8.2.0", 24 | "@angular/forms": "~8.2.0", 25 | "@angular/platform-browser": "~8.2.0", 26 | "@angular/platform-browser-dynamic": "~8.2.0", 27 | "@angular/router": "~8.2.0", 28 | "nativescript-advanced-permissions": "^1.2.0", 29 | "nativescript-angular": "~8.2.0", 30 | "nativescript-mapbox": "file:../publish/dist/package", 31 | "nativescript-theme-core": "~1.0.6", 32 | "nativescript-ui-sidedrawer": "~7.0.0", 33 | "reflect-metadata": "~0.1.12", 34 | "rxjs": "^6.4.0", 35 | "rxjs-compat": "^6.5.3", 36 | "tns-core-modules": "^6.5.1", 37 | "zone.js": "~0.9.1" 38 | }, 39 | "devDependencies": { 40 | "@angular/compiler-cli": "~8.2.0", 41 | "@ngtools/webpack": "~8.2.0", 42 | "@types/chai": "~4.1.7", 43 | "@types/mocha": "~5.2.5", 44 | "@types/node": "~10.12.18", 45 | "chai": "~4.1.2", 46 | "codelyzer": "~4.5.0", 47 | "mocha": "~5.2.0", 48 | "mocha-junit-reporter": "~1.18.0", 49 | "mocha-multi": "~1.0.1", 50 | "mochawesome": "~3.1.2", 51 | "nativescript-dev-appium": "^6.1.2", 52 | "nativescript-dev-webpack": "^1.5.1", 53 | "node-sass": "^4.7.1", 54 | "tslint": "~5.19.0", 55 | "typescript": "~3.5.3" 56 | }, 57 | "gitHead": "12284faf57b80a564bca5377e12c149c89d282c3", 58 | "readme": "NativeScript Application" 59 | } 60 | -------------------------------------------------------------------------------- /demo-angular/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | /** 5 | * FIXME: this is here to resolve a weird "Cannot find name MGLUserLocationAnnotationView" error 6 | * which occurs without it. 7 | */ 8 | 9 | /// 10 | -------------------------------------------------------------------------------- /demo-angular/src/_app-common.scss: -------------------------------------------------------------------------------- 1 | // Place any CSS rules you want to apply on both iOS and Android here. 2 | // This is where the vast majority of your CSS code goes. 3 | // Font icon class 4 | .fa { 5 | font-family: "FontAwesome"; 6 | } 7 | // Common page class 8 | .page-content { 9 | .page-placeholder { 10 | color: $page-icon-color; 11 | font-size: $page-content-placeholder-font-size; 12 | vertical-align: center; 13 | horizontal-align: center; 14 | } 15 | 16 | .page-icon { 17 | font-size: 72; 18 | vertical-align: top; 19 | horizontal-align: center; 20 | color: $page-icon-color; 21 | margin-top: 20%; 22 | } 23 | } 24 | 25 | //Action bar 26 | ActionBar .action-bar-title { 27 | horizontal-align: center; 28 | } 29 | 30 | // Drawer navigation custom styles 31 | $sidedrawer-header-image-size: 60; 32 | $sidedrawer-header-image-offset-top: 20; 33 | $sidedrawer-header-image-offset-bottom: 5; 34 | $sidedrawer-list-item-offset-left: 15; 35 | $sidedrawer-list-icon-offset: 10; 36 | $sidedrawer-list-icon-size: 20; 37 | 38 | .sidedrawer { 39 | &.sidedrawer-left { 40 | background-color: $ab-background; 41 | 42 | .sidedrawer-header-image { 43 | color: $background-dark; 44 | height: $sidedrawer-header-image-size; 45 | width: $sidedrawer-header-image-size; 46 | font-size: $sidedrawer-header-image-size; 47 | padding: 0; 48 | margin-bottom: $sidedrawer-header-image-offset-bottom; 49 | margin-top: $sidedrawer-header-image-offset-top; 50 | } 51 | 52 | .footnote { 53 | color: rgba($ab-color, 0.5); 54 | } 55 | } 56 | 57 | .sidedrawer-header { 58 | background-color: $ab-background; 59 | 60 | .sidedrawer-header-brand { 61 | color: $ab-color; 62 | } 63 | } 64 | 65 | .sidedrawer-content { 66 | background-color: $side-drawer-background; 67 | 68 | $sidedrawer-list-item-offset-left: 15; 69 | $sidedrawer-list-icon-offset: 10; 70 | $sidedrawer-list-icon-size: 20; 71 | 72 | .sidedrawer-list-item { 73 | padding-left: $sidedrawer-list-item-offset-left; 74 | Label { 75 | vertical-align: center; 76 | color: $blue-dark; 77 | } 78 | .fa { 79 | width: $sidedrawer-list-icon-size; 80 | margin-right: $sidedrawer-list-icon-offset; 81 | } 82 | &.selected { 83 | background-color: $item-active-background; 84 | Label { 85 | color: $item-active-color; 86 | } 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /demo-angular/src/_app-variables.scss: -------------------------------------------------------------------------------- 1 | // Import the theme’s variables. If you’re using a color scheme 2 | // other than “light”, switch the path to the alternative scheme, 3 | // for example '~nativescript-theme-core/scss/dark'. 4 | @import '~nativescript-theme-core/scss/light'; 5 | 6 | // Custom colors 7 | $background-dark: #F8F8F8 !default; 8 | $background-light: #FFFFFF !default; 9 | 10 | $blue-dark: #022734 !default; 11 | $blue-light: #02556E !default; 12 | $blue-50: rgba($blue-dark, 0.5) !default; 13 | $blue-20: rgba($blue-dark, 0.2) !default; 14 | $blue-10: rgba($blue-dark, 0.1) !default; 15 | 16 | $accent-dark: #3A53FF !default; 17 | $accent-light: #4781FE !default; 18 | 19 | $success-dark: #06CE6A !default; 20 | $success-light: #00E676 !default; 21 | 22 | $warning-dark: #f39c11 !default; 23 | $warning-light: #F2C112 !default; 24 | 25 | $error-dark: #D84039 !default; 26 | $error-light: #ED473F !default; 27 | 28 | $midnight-dark: #0F336D !default; 29 | $midnight-light: #14418B !default; 30 | 31 | $night-dark: #023141 !default; 32 | $night-light: #01526C !default; 33 | 34 | $page-icon-color: #D7D7D7 !default; 35 | 36 | // Sizes 37 | $page-content-placeholder-font-size: 20; 38 | 39 | /** 40 | * Theme variables overrides 41 | **/ 42 | 43 | // Colors 44 | $background: #fff; 45 | $primary: lighten(#000, 13%); 46 | $secondary: lighten(#000, 46%); 47 | $disabled: lighten(#000, 62%); 48 | $accent: $accent-dark; 49 | $error: $error-light; 50 | 51 | // SideDrawer 52 | $item-color-android : #737373; 53 | $item-active-background: #F8F8F8; 54 | $item-active-color: $accent; 55 | $item-active-icon-color: $item-active-color; 56 | $item-color-ios: $blue-dark; 57 | $item-color-android: $blue-dark; 58 | 59 | $side-drawer-header-background: #fafafa; 60 | $side-drawer-header-brand: #737373; 61 | $side-drawer-background: #FFFFFF; 62 | 63 | // ActionBar 64 | $ab-background: $accent; 65 | $ab-color: $white; 66 | 67 | // Buttons 68 | $btn-color-inverse: $white; 69 | $btn-color: $accent; 70 | $btn-color-secondary: darken($btn-color, 10%); 71 | $btn-color-outline-highlighted: lighten($btn-color, 10%); 72 | 73 | //Text colors 74 | $headings-color: $blue-dark; 75 | $secondary: $blue-dark; 76 | $text-color: $blue-dark; -------------------------------------------------------------------------------- /demo-angular/src/app.android.scss: -------------------------------------------------------------------------------- 1 | // Import app variables 2 | @import 'app-variables'; 3 | 4 | // Import the theme’s main ruleset - both index and platform specific. 5 | @import '~nativescript-theme-core/scss/index'; 6 | @import '~nativescript-theme-core/scss/platforms/index.android'; 7 | 8 | // Import common styles 9 | @import 'app-common'; 10 | 11 | // Place any CSS rules you want to apply only on Android here 12 | ActionBar .fa { 13 | padding: 40px; 14 | } -------------------------------------------------------------------------------- /demo-angular/src/app.ios.scss: -------------------------------------------------------------------------------- 1 | // Import app variables 2 | @import 'app-variables'; 3 | 4 | // Import the theme’s main ruleset - both index and platform specific. 5 | @import '~nativescript-theme-core/scss/index'; 6 | @import '~nativescript-theme-core/scss/platforms/index.ios'; 7 | 8 | // Import common styles 9 | @import 'app-common'; 10 | 11 | // Place any CSS rules you want to apply only on iOS here 12 | ActionBar .fa { 13 | padding: 40px 40px 40px 0; 14 | } -------------------------------------------------------------------------------- /demo-angular/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { NativeScriptRouterModule } from "nativescript-angular/router"; 3 | import { Routes } from "@angular/router"; 4 | 5 | import { HomePageComponent } from "./pages/home/home-page.component"; 6 | import { TestPageComponent } from "./pages/test/test-page.component"; 7 | import { PlainPageComponent } from "./pages/plain/plain-page.component"; 8 | import { TestNoDestroyPageComponent } from "./pages/test-no-destroy/test-no-destroy-page.component"; 9 | import { ToggleMapTestPageComponent } from "./pages/toggle-map-test/toggle-map-test-page.component"; 10 | 11 | const routes: Routes = [ 12 | { path: "", redirectTo: "/home", pathMatch: "full" }, 13 | { path: "home", component: HomePageComponent }, 14 | { path: "test-crash", component: TestPageComponent }, 15 | { path: "plain", component: PlainPageComponent }, 16 | { path: "test-no-destroy", component: TestNoDestroyPageComponent }, 17 | { path: "toggle-map-test", component: ToggleMapTestPageComponent } 18 | ]; 19 | 20 | @NgModule({ 21 | imports: [NativeScriptRouterModule.forRoot(routes)], 22 | exports: [NativeScriptRouterModule] 23 | }) 24 | export class AppRoutingModule { } 25 | -------------------------------------------------------------------------------- /demo-angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 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 | -------------------------------------------------------------------------------- /demo-angular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Drawer Support 3 | * 4 | * The angular demo of the mapbox API is based on the side drawer sample app. 5 | */ 6 | 7 | import { Component, OnInit, ViewChild } from "@angular/core"; 8 | import { NavigationEnd, Router } from "@angular/router"; 9 | import { RouterExtensions } from "nativescript-angular/router"; 10 | import { DrawerTransitionBase, RadSideDrawer, SlideInOnTopTransition } from "nativescript-ui-sidedrawer"; 11 | import { filter } from "rxjs/operators"; 12 | 13 | import * as app from "tns-core-modules/application"; 14 | 15 | import { isAndroid, isIOS } from "tns-core-modules/platform"; 16 | 17 | import { EventsService } from './services/events.service'; 18 | import { DebugService } from './services/debug.service'; 19 | 20 | // --------------------------------------------------------------------------- 21 | 22 | @Component({ 23 | moduleId: module.id, 24 | selector: "ns-app", 25 | templateUrl: "app.component.html" 26 | }) 27 | export class AppComponent implements OnInit { 28 | private _activatedUrl: string; 29 | private _sideDrawerTransition: DrawerTransitionBase; 30 | 31 | constructor( 32 | private router: Router, 33 | private routerExtensions: RouterExtensions, 34 | private eventsService: EventsService, 35 | private debugService: DebugService 36 | ) { 37 | } 38 | 39 | // --------------------------------------------------------------------------- 40 | 41 | async ngOnInit() { 42 | 43 | this._activatedUrl = "/home"; 44 | this._sideDrawerTransition = new SlideInOnTopTransition(); 45 | 46 | this.router.events 47 | .pipe(filter((event: any) => event instanceof NavigationEnd)) 48 | .subscribe((event: NavigationEnd) => this._activatedUrl = event.urlAfterRedirects); 49 | 50 | } 51 | 52 | // ---------------------------------------------------------------------------------------- 53 | 54 | get sideDrawerTransition(): DrawerTransitionBase { 55 | return this._sideDrawerTransition; 56 | } 57 | 58 | // ---------------------------------------------------------------------------------------- 59 | 60 | isComponentSelected(url: string): boolean { 61 | return this._activatedUrl === url; 62 | } 63 | 64 | // ---------------------------------------------------------------------------------------- 65 | 66 | /** 67 | * Navigate to the named route. 68 | * 69 | * @see MapComponent 70 | * 71 | * @link https://github.com/NativeScript/android-runtime/issues/1487 72 | * @link https://github.com/NativeScript/NativeScript/issues/7954 73 | * @link https://github.com/NativeScript/NativeScript/issues/7867 74 | * 75 | * @todo I could not get the Page events to work the way I expected in map.component so I'm using my own events here. 76 | */ 77 | 78 | onNavItemTap(navItemRoute: string): void { 79 | 80 | console.log( "AppComponent::onNavItemTap(): '" + navItemRoute + "' ---- '" + this.debugService.incrementCounter( navItemRoute ) ); 81 | 82 | this.routerExtensions.navigate([navItemRoute], { 83 | transition: { 84 | name: "fade" 85 | } 86 | }); 87 | 88 | const sideDrawer = app.getRootView(); 89 | sideDrawer.closeDrawer(); 90 | } 91 | 92 | } // END 93 | 94 | 95 | -------------------------------------------------------------------------------- /demo-angular/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module"; 3 | 4 | // So the RadSideDrawer will work 5 | 6 | import { NativeScriptUISideDrawerModule } from "nativescript-ui-sidedrawer/angular"; 7 | 8 | import { AppRoutingModule } from "./app-routing.module"; 9 | import { AppComponent } from "./app.component"; 10 | import { MapComponent } from "./components/map/map.component"; 11 | import { HomePageComponent } from "./pages/home/home-page.component"; 12 | import { TestPageComponent } from "./pages/test/test-page.component"; 13 | import { PlainPageComponent } from "./pages/plain/plain-page.component"; 14 | import { TestNoDestroyPageComponent } from "./pages/test-no-destroy/test-no-destroy-page.component"; 15 | import { ToggleMapTestPageComponent } from "./pages/toggle-map-test/toggle-map-test-page.component"; 16 | 17 | import { EventsService } from "./services/events.service"; 18 | import { PlatformService } from "./services/platform.service"; 19 | import { SettingsService } from "./services/settings.service"; 20 | import { DebugService } from "./services/debug.service"; 21 | 22 | // Uncomment and add to NgModule imports if you need to use two-way binding 23 | // import { NativeScriptFormsModule } from "nativescript-angular/forms"; 24 | 25 | // Uncomment and add to NgModule imports if you need to use the HttpClient wrapper 26 | // import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; 27 | 28 | @NgModule({ 29 | bootstrap: [ 30 | AppComponent 31 | ], 32 | imports: [ 33 | NativeScriptModule, 34 | AppRoutingModule, 35 | NativeScriptUISideDrawerModule 36 | ], 37 | declarations: [ 38 | AppComponent, 39 | MapComponent, 40 | HomePageComponent, 41 | TestPageComponent, 42 | PlainPageComponent, 43 | TestNoDestroyPageComponent, 44 | ToggleMapTestPageComponent 45 | ], 46 | providers: [ 47 | EventsService, 48 | PlatformService, 49 | SettingsService, 50 | DebugService 51 | ], 52 | schemas: [ 53 | NO_ERRORS_SCHEMA 54 | ] 55 | }) 56 | /* 57 | Pass your application module to the bootstrapModule function located in main.ts to start your app 58 | */ 59 | export class AppModule { } 60 | -------------------------------------------------------------------------------- /demo-angular/src/app/components/map/map.component.css: -------------------------------------------------------------------------------- 1 | .map-wrapper { 2 | border-radius: 20; 3 | border-color: white; 4 | border-width: 1; 5 | } 6 | 7 | .bottom-right { 8 | horizontal-align: right; 9 | vertical-align: bottom; 10 | border-radius: 2; 11 | margin: 2 0 0 2; 12 | padding: 2 2; 13 | } 14 | 15 | .bottom-left { 16 | horizontal-align: left; 17 | vertical-align: bottom; 18 | border-radius: 2; 19 | margin: 2 0 0 2; 20 | padding: 2 2; 21 | } 22 | 23 | .location { 24 | font-size: 50; 25 | font-weight: 800; 26 | width: 70; 27 | height: 70; 28 | text-align: center; 29 | } 30 | 31 | .circle .mdi { 32 | margin-top: 5; 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/home/home-page.component.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/home/home-page.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Mapbox NativeScript Angular Demo Home Page 3 | * 4 | * @author Yermo Lamers, Flying Brick Software, LLC 5 | */ 6 | 7 | import { 8 | Component, 9 | OnInit, 10 | OnDestroy 11 | } from "@angular/core"; 12 | 13 | // for the side drawer 14 | 15 | import { RadSideDrawer } from "nativescript-ui-sidedrawer"; 16 | import * as app from "tns-core-modules/application"; 17 | 18 | // for the alerts 19 | 20 | import * as dialogs from "tns-core-modules/ui/dialogs"; 21 | 22 | import { RouterExtensions } from "nativescript-angular/router"; 23 | 24 | import { openAppSettings } from 'nativescript-advanced-permissions/core'; 25 | 26 | import { 27 | hasLocationPermissions, 28 | requestLocationPermissions, 29 | isLocationEnabled 30 | } from 'nativescript-advanced-permissions/location'; 31 | 32 | // the Mapbox access token and the Mapbox map style to use are set 33 | // in the config.ts file. 34 | 35 | import { SETTINGS } from '../../../../../mapbox_config'; 36 | 37 | // ------------------------------------------------------------------------------ 38 | 39 | /** 40 | * Home Page - The Live Map 41 | * 42 | * This is the main page of the app that, when tracking, displays the current live ride. 43 | */ 44 | 45 | @Component({ 46 | selector: "home-page", 47 | moduleId: module.id, 48 | templateUrl: "./home-page.component.html" 49 | }) 50 | export class HomePageComponent implements OnInit, OnDestroy { 51 | 52 | settings : any = SETTINGS; 53 | 54 | locationPermission : boolean = false; 55 | 56 | eventHandlersRegistered : boolean = false; 57 | 58 | distanceSubscription: any; 59 | 60 | // ----------------------------------------------------- 61 | 62 | constructor( 63 | private routerExtensions: RouterExtensions 64 | ) { 65 | console.log( "HomePageComponent:constructor()") 66 | } // end of constructor 67 | 68 | // ----------------------------------------------------- 69 | 70 | ngOnInit(): void { 71 | 72 | console.log( "HomePageComponent:ngOnInit(): checking for location services." ); 73 | 74 | /** ---------------------------------------------------------------- 75 | * temporarily disabled 76 | 77 | if ( ! isLocationEnabled ) { 78 | 79 | dialogs.alert({ 80 | title: "Location Error", 81 | message: "Location services are turned off on this device. Please go to settings and turn them on.", 82 | okButtonText: "OK", 83 | }); 84 | 85 | return; 86 | } 87 | 88 | if ( hasLocationPermissions() ) { 89 | 90 | console.log( "HomePageComponent:ngOnInit(): we have location permissions." ); 91 | 92 | this.locationPermission = true; 93 | 94 | return; 95 | 96 | } 97 | 98 | // it seems the hasPermission return value here is always true under Android. 99 | 100 | requestLocationPermissions( true, "We use this permission to show you your current location and to give you the ability to track your rides." ).then( ( hasPermission ) => { 101 | 102 | console.log( "HomePageComponent:ngOnInit(): hasPermission is:", hasPermission ); 103 | 104 | if ( hasLocationPermissions() ) { 105 | 106 | console.log( "HomePageComponent:ngOnInit(): we have been granted location permissions." ); 107 | 108 | this.locationPermission = true; 109 | 110 | } else { 111 | 112 | dialogs.alert({ 113 | title: "Location Error", 114 | message: "This app will not be very useful without access to the current location", 115 | okButtonText: "OK", 116 | }); 117 | 118 | } 119 | }); 120 | 121 | ---------------------------------------------- */ 122 | } 123 | 124 | // ------------------------------------------------- 125 | 126 | /** 127 | * destroy 128 | * 129 | * @link https://docs.nativescript.org/angular/core-concepts/angular-navigation#custom-route-reuse-strategy 130 | */ 131 | 132 | ngOnDestroy() { 133 | } 134 | 135 | 136 | // ----------------------------------------------------- 137 | 138 | onDrawerButtonTap(): void { 139 | const sideDrawer = app.getRootView(); 140 | sideDrawer.showDrawer(); 141 | } 142 | } 143 | 144 | // END 145 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/plain/plain-page.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/plain/plain-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnChanges, OnDestroy } from "@angular/core"; 2 | import { RadSideDrawer } from "nativescript-ui-sidedrawer"; 3 | import { RouterExtensions } from "nativescript-angular/router"; 4 | 5 | import * as app from "tns-core-modules/application"; 6 | 7 | @Component({ 8 | selector: "plain-page", 9 | templateUrl: "./plain-page.component.html" 10 | }) 11 | export class PlainPageComponent implements OnInit, OnChanges, OnDestroy { 12 | 13 | constructor( 14 | private routerExtensions: RouterExtensions, 15 | ) { 16 | // Use the component constructor to inject providers. 17 | } 18 | 19 | ngOnInit(): void { 20 | console.log( "PlainPageComponent::ngOnInit()" ); 21 | } 22 | 23 | ngOnChanges(): void { 24 | console.log( "PlainPageComponent::ngOnChanges()" ); 25 | } 26 | 27 | ngOnDestroy(): void { 28 | console.log( "PlainPageComponent::ngOnDestroy()" ); 29 | } 30 | 31 | onDrawerButtonTap(): void { 32 | const sideDrawer = app.getRootView(); 33 | sideDrawer.showDrawer(); 34 | } 35 | 36 | // ----------------------------------------------------- 37 | 38 | public goBack() { 39 | this.routerExtensions.backToPreviousPage(); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/test-no-destroy/.test-page.component.html.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/src/app/pages/test-no-destroy/.test-page.component.html.swp -------------------------------------------------------------------------------- /demo-angular/src/app/pages/test-no-destroy/.test-page.component.ts.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/src/app/pages/test-no-destroy/.test-page.component.ts.swp -------------------------------------------------------------------------------- /demo-angular/src/app/pages/test-no-destroy/test-no-destroy-page.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/test-no-destroy/test-no-destroy-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy } from "@angular/core"; 2 | import { RadSideDrawer } from "nativescript-ui-sidedrawer"; 3 | import { RouterExtensions } from "nativescript-angular/router"; 4 | 5 | import * as app from "tns-core-modules/application"; 6 | 7 | @Component({ 8 | selector: "test-no-destroy-page", 9 | templateUrl: "./test-no-destroy-page.component.html" 10 | }) 11 | export class TestNoDestroyPageComponent implements OnInit, OnDestroy { 12 | 13 | constructor( 14 | private routerExtensions: RouterExtensions, 15 | ) { 16 | // Use the component constructor to inject providers. 17 | } 18 | 19 | ngOnInit(): void { 20 | console.log( "TestNoDestroyPageComponent::ngOnInit()" ); 21 | } 22 | 23 | ngOnDestroy(): void { 24 | console.log( "TestNoDestroyPageComponent::ngOnDestroy()" ); 25 | } 26 | 27 | onDrawerButtonTap(): void { 28 | const sideDrawer = app.getRootView(); 29 | sideDrawer.showDrawer(); 30 | } 31 | 32 | // ----------------------------------------------------- 33 | 34 | public goBack() { 35 | this.routerExtensions.backToPreviousPage(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/test/test-page.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/test/test-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy } from "@angular/core"; 2 | import { RadSideDrawer } from "nativescript-ui-sidedrawer"; 3 | import { RouterExtensions } from "nativescript-angular/router"; 4 | 5 | import * as app from "tns-core-modules/application"; 6 | 7 | @Component({ 8 | selector: "test-page", 9 | templateUrl: "./test-page.component.html" 10 | }) 11 | export class TestPageComponent implements OnInit, OnDestroy { 12 | 13 | constructor( 14 | private routerExtensions: RouterExtensions, 15 | ) { 16 | // Use the component constructor to inject providers. 17 | } 18 | 19 | ngOnInit(): void { 20 | console.log( "TestPageComponent::ngOnInit()" ); 21 | } 22 | 23 | ngOnDestroy(): void { 24 | console.log( "TestPageComponent::ngOnDestroy()" ); 25 | } 26 | 27 | onDrawerButtonTap(): void { 28 | const sideDrawer = app.getRootView(); 29 | sideDrawer.showDrawer(); 30 | } 31 | 32 | // ----------------------------------------------------- 33 | 34 | public goBack() { 35 | this.routerExtensions.backToPreviousPage(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/toggle-map-test/.home-page.component.ts.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/src/app/pages/toggle-map-test/.home-page.component.ts.swp -------------------------------------------------------------------------------- /demo-angular/src/app/pages/toggle-map-test/toggle-map-test-page.component.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demo-angular/src/app/pages/toggle-map-test/toggle-map-test-page.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Toggle Destroy/Recreate Map test 3 | * 4 | * @author Yermo Lamers, Flying Brick Software, LLC 5 | */ 6 | 7 | import { 8 | Component, 9 | OnInit, 10 | OnDestroy 11 | } from "@angular/core"; 12 | 13 | // for the side drawer 14 | 15 | import { RadSideDrawer } from "nativescript-ui-sidedrawer"; 16 | import * as app from "tns-core-modules/application"; 17 | 18 | import { RouterExtensions } from "nativescript-angular/router"; 19 | 20 | import { EventsService } from '../../services/events.service'; 21 | import { DebugService } from '../../services/debug.service'; 22 | 23 | // the Mapbox access token and the Mapbox map style to use are set 24 | // in the mapbox_config.ts file. 25 | 26 | import { SETTINGS } from '../../../../../mapbox_config'; 27 | 28 | // ------------------------------------------------------------------------------ 29 | 30 | /** 31 | * Toggle Map test. 32 | * 33 | * This toggles creating/destroying the map. 34 | */ 35 | 36 | @Component({ 37 | selector: "toggle-map-test-page", 38 | moduleId: module.id, 39 | templateUrl: "./toggle-map-test-page.component.html" 40 | }) 41 | export class ToggleMapTestPageComponent implements OnInit, OnDestroy { 42 | 43 | settings : any = SETTINGS; 44 | 45 | shown : boolean = true; 46 | 47 | // ----------------------------------------------------- 48 | 49 | constructor( 50 | private routerExtensions: RouterExtensions, 51 | private eventsService: EventsService, 52 | private debugService: DebugService 53 | ) { 54 | console.log( "ToggleMapTestPageComponent:constructor()") 55 | } // end of constructor 56 | 57 | // ----------------------------------------------------- 58 | 59 | ngOnInit(): void { 60 | } 61 | 62 | // ------------------------------------------------- 63 | 64 | toggleMapDestroy() { 65 | 66 | if ( ! this.shown ) { 67 | console.log( "ToggleMapTestPageComponent::toggleMap(): ------ toggle map '" + this.debugService.incrementCounter( 'mapToggleDestroy' ) ); 68 | 69 | this.eventsService.publish( "destroyMap", { mapId : 'toggleTest' } ); 70 | 71 | } 72 | 73 | this.shown = ! this.shown; 74 | 75 | } 76 | 77 | // ------------------------------------------------- 78 | 79 | toggleMap() { 80 | 81 | if ( ! this.shown ) { 82 | console.log( "ToggleMapTestPageComponent::toggleMap(): ------ toggle map '" + this.debugService.incrementCounter( 'mapToggle' ) ); 83 | } 84 | 85 | this.shown = ! this.shown; 86 | 87 | } 88 | 89 | 90 | // ------------------------------------------------- 91 | 92 | /** 93 | * destroy 94 | * 95 | * @link https://docs.nativescript.org/angular/core-concepts/angular-navigation#custom-route-reuse-strategy 96 | */ 97 | 98 | ngOnDestroy() { 99 | 100 | console.log( "ToggleMapTestPageComponent::ngOnDestroy()" ); 101 | 102 | } 103 | 104 | 105 | // ----------------------------------------------------- 106 | 107 | onDrawerButtonTap(): void { 108 | const sideDrawer = app.getRootView(); 109 | sideDrawer.showDrawer(); 110 | } 111 | } 112 | 113 | // END 114 | -------------------------------------------------------------------------------- /demo-angular/src/app/services/debug.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Debug Service 3 | * 4 | * This services is a placeholder for some debugging facilities to help track down crashes and other issues. 5 | */ 6 | 7 | import { Injectable } from "@angular/core"; 8 | 9 | // --------------------------------------------------------------- 10 | 11 | /** 12 | * Debug Service 13 | */ 14 | 15 | @Injectable() 16 | export class DebugService { 17 | 18 | counters : any = {}; 19 | 20 | /** 21 | * constructor 22 | */ 23 | 24 | constructor( 25 | ) { 26 | } 27 | 28 | // -------------------------------------------- 29 | 30 | getCounter( key ) { 31 | return this.counters[ key ]; 32 | } 33 | 34 | // -------------------------------------------- 35 | 36 | incrementCounter( key ) { 37 | 38 | if ( typeof this.counters[ key ] == 'undefined' ) { 39 | this.counters[ key ] = 1; 40 | } else { 41 | this.counters[ key ]++ 42 | } 43 | 44 | return this.counters[ key ]; 45 | 46 | } 47 | 48 | } // END 49 | -------------------------------------------------------------------------------- /demo-angular/src/app/services/events.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Ionic Event API Implementation 3 | * 4 | * This is an implementation of the Ionic Angular Event publish/subscribe API. 5 | * 6 | * @link https://github.com/ionic-team/ionic/blob/master/angular/src/providers/events.ts 7 | */ 8 | 9 | import { Injectable } from '@angular/core'; 10 | 11 | export type EventHandler = (...args: any[]) => any; 12 | 13 | @Injectable({ 14 | providedIn: 'root', 15 | }) 16 | export class EventsService { 17 | 18 | private c = new Map(); 19 | 20 | // ----------------------------------------------------------------------------------- 21 | 22 | /** 23 | * Subscribe to an event topic. Events that get posted to that topic will trigger the provided handler. 24 | * 25 | * @param topic the topic to subscribe to 26 | * @param handler the event handler 27 | */ 28 | 29 | subscribe( topic: string, ...handlers: EventHandler[] ) { 30 | 31 | console.log( "EventsService:subscribe(): subscribing to topic '" + topic + "'" ); 32 | 33 | let topics = this.c.get(topic); 34 | if (!topics) { 35 | this.c.set(topic, topics = []); 36 | } 37 | topics.push(...handlers); 38 | 39 | console.log( "EventsService:subscribe(): there are now '" + topics.length + "' subscriptions to '" + topic + "'" ); 40 | 41 | } 42 | 43 | // --------------------------------------------------------------------------------------- 44 | 45 | /** 46 | * Unsubscribe from the given topic. Your handler will no longer receive events published to this topic. 47 | * 48 | * @param topic the topic to unsubscribe from 49 | * @param handler the event handler 50 | * 51 | * @return true if a handler was removed 52 | */ 53 | 54 | unsubscribe(topic: string, handler?: EventHandler): boolean { 55 | if (!handler) { 56 | return this.c.delete(topic); 57 | } 58 | 59 | const topics = this.c.get(topic); 60 | if (!topics) { 61 | return false; 62 | } 63 | 64 | // We need to find and remove a specific handler 65 | const index = topics.indexOf(handler); 66 | 67 | if (index < 0) { 68 | // Wasn't found, wasn't removed 69 | return false; 70 | } 71 | topics.splice(index, 1); 72 | if (topics.length === 0) { 73 | this.c.delete(topic); 74 | } 75 | return true; 76 | } 77 | 78 | // ------------------------------------------------------------------------- 79 | /** 80 | * Publish an event to the given topic. 81 | * 82 | * @param topic the topic to publish to 83 | * @param eventData the data to send as the event 84 | */ 85 | 86 | publish(topic: string, ...args: any[]): any[] | null { 87 | 88 | const topics = this.c.get(topic); 89 | if (!topics) { 90 | 91 | console.log( "EventsService:publish(): no subscribers for topic '" + topic + "'" ); 92 | 93 | return null; 94 | } 95 | 96 | console.log( "EventsService:publish(): publishing topic '" + topic + "' to '" + topics.length + "' subscribers." ); 97 | 98 | return topics.map(handler => { 99 | try { 100 | return handler(...args); 101 | } catch (e) { 102 | console.error(e); 103 | return null; 104 | } 105 | }); 106 | } 107 | 108 | } 109 | 110 | // END 111 | 112 | -------------------------------------------------------------------------------- /demo-angular/src/app/services/platform.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * a convenience NativeScript shim to approximate the Ionic Platform Service 3 | */ 4 | 5 | import { Injectable } from "@angular/core"; 6 | 7 | import { 8 | ios, 9 | android, 10 | displayedEvent, 11 | exitEvent, 12 | launchEvent, 13 | lowMemoryEvent, 14 | orientationChangedEvent, 15 | resumeEvent, 16 | suspendEvent, 17 | uncaughtErrorEvent, 18 | ApplicationEventData, 19 | LaunchEventData, 20 | OrientationChangedEventData, 21 | UnhandledErrorEventData, 22 | on as applicationOn, 23 | run as applicationRun 24 | } from "tns-core-modules/application"; 25 | 26 | import { EventsService } from './events.service'; 27 | 28 | import { Subject } from 'rxjs/Subject'; 29 | 30 | // ---------------------------------------------------------------------------------------------- 31 | 32 | /** 33 | * Platform shim. 34 | * 35 | * This service is primarily used to avoid trying to update the UI when the app is paused. 36 | * 37 | * @event platform:pause 38 | * @event platform:resume 39 | */ 40 | 41 | @Injectable() 42 | export class PlatformService { 43 | 44 | public paused: boolean; 45 | 46 | /** 47 | * platform service ready promise 48 | */ 49 | 50 | public readyPromise:Promise; 51 | 52 | public readyPromiseResolver:any; 53 | 54 | // ---------------------------------------------------------------------- 55 | 56 | /** 57 | * constructor 58 | * 59 | * @link https://docs.nativescript.org/core-concepts/application-lifecycle 60 | */ 61 | 62 | constructor( 63 | private events: EventsService 64 | ) { 65 | 66 | this.readyPromise = new Promise( ( resolve, reject ) => { 67 | this.readyPromiseResolver = resolve; 68 | }); 69 | 70 | // on application launch. 71 | 72 | applicationOn( launchEvent, (args: LaunchEventData ) => { 73 | if (args.android) { 74 | 75 | // For Android applications, args.android is an android.content.Intent class. 76 | 77 | console.log("PlatformService:constructor(): Launched Android application with the following intent: " + args.android + "."); 78 | 79 | } else if (args.ios !== undefined) { 80 | 81 | // For iOS applications, args.ios is NSDictionary (launchOptions). 82 | 83 | console.log( "PlatformService:constructor(): Launched iOS application with options: " + args.ios); 84 | 85 | } 86 | 87 | this.events.publish( 'platform:launched', {} ); 88 | 89 | }); 90 | 91 | // on application suspend. 92 | 93 | applicationOn( suspendEvent, (args: ApplicationEventData ) => { 94 | 95 | if (args.android) { 96 | 97 | // For Android applications, args.android is an android activity class. 98 | 99 | console.log("PlatformService:constructor(): Activity suspend: " + args.android); 100 | 101 | } else if (args.ios) { 102 | 103 | // For iOS applications, args.ios is UIApplication. 104 | console.log("PlatformService:constructor(): UIApplication suspend: " + args.ios); 105 | 106 | } 107 | 108 | this.paused = true; 109 | 110 | this.events.publish( 'platform:pause', {} ); 111 | 112 | }); 113 | 114 | // on application resume 115 | 116 | applicationOn(resumeEvent, (args: ApplicationEventData) => { 117 | 118 | if (args.android) { 119 | 120 | // For Android applications, args.android is an android activity class. 121 | console.log( "PlatformService:constructor(): Activity resume: " + args.android ); 122 | 123 | } else if (args.ios) { 124 | 125 | // For iOS applications, args.ios is UIApplication. 126 | console.log( "PlatformService:constructor(): UIApplication resume: " + args.ios); 127 | 128 | } 129 | 130 | this.paused = false; 131 | 132 | this.events.publish( 'platform:resume', {} ); 133 | 134 | }); 135 | 136 | applicationOn(displayedEvent, (args: ApplicationEventData) => { 137 | console.log( "PlatformService:constructor(): displayedEvent" ); 138 | this.events.publish( 'platform:displayed', {} ); 139 | }); 140 | 141 | applicationOn(orientationChangedEvent, (args: OrientationChangedEventData) => { 142 | // "portrait", "landscape", "unknown" 143 | console.log(args.newValue) 144 | }); 145 | 146 | applicationOn(exitEvent, (args: ApplicationEventData) => { 147 | if (args.android) { 148 | // For Android applications, args.android is an android activity class. 149 | console.log("PlatformService:constructor(): Activity exit: " + args.android); 150 | } else if (args.ios) { 151 | // For iOS applications, args.ios is UIApplication. 152 | console.log("PlatformService:constructor(): UIApplication exit: " + args.ios); 153 | } 154 | 155 | this.events.publish( 'platform:exit', {} ); 156 | 157 | }); 158 | 159 | applicationOn(lowMemoryEvent, (args: ApplicationEventData) => { 160 | if (args.android) { 161 | // For Android applications, args.android is an android activity class. 162 | console.log("PlatformService:constructor(): Activity low memory: " + args.android); 163 | } else if (args.ios) { 164 | // For iOS applications, args.ios is UIApplication. 165 | console.log("PlatformService:constructor(): UIApplication low memory: " + args.ios); 166 | } 167 | 168 | this.events.publish( 'platform:lowmemory', {} ); 169 | 170 | }); 171 | 172 | applicationOn(uncaughtErrorEvent, function (args: UnhandledErrorEventData) { 173 | console.log("PlatformService:constructor(): Error: " + args.error); 174 | }); 175 | 176 | } // end of constructor 177 | 178 | // ------------------------------------------------------------------ 179 | 180 | /** 181 | * declare the platform ready 182 | * 183 | * FIXME: We're simulating an Ionic style platform here. This method needs 184 | * to be called from the angular app component. 185 | */ 186 | 187 | declareReady() { 188 | 189 | this.readyPromiseResolver( true ); 190 | 191 | this.events.publish( 'platform:ready', {} ); 192 | 193 | } 194 | 195 | // ------------------------------------------------------------------ 196 | 197 | /** 198 | * return the platform ready promise 199 | */ 200 | 201 | ready() { 202 | return this.readyPromise; 203 | } 204 | 205 | // ------------------------------------------------------------------ 206 | 207 | /** 208 | * whether we are android or ios 209 | */ 210 | 211 | is( platformName : string ) { 212 | 213 | switch ( platformName ) { 214 | 215 | case 'ios' : 216 | return ios; 217 | break; 218 | 219 | case 'android': 220 | return android; 221 | break; 222 | 223 | default: 224 | throw new Error( 'unsupported platform' ); 225 | break; 226 | } 227 | } 228 | // ------------------------------------------------------------------ 229 | 230 | isPaused() { 231 | return this.paused; 232 | } 233 | 234 | } // END 235 | -------------------------------------------------------------------------------- /demo-angular/src/app/services/settings.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Ionic Style settings service shim 3 | * 4 | * This service emulates ionic's get/set storage settings service. 5 | */ 6 | 7 | import { Injectable } from '@angular/core'; 8 | 9 | import { 10 | getBoolean, 11 | setBoolean, 12 | getNumber, 13 | setNumber, 14 | getString, 15 | setString, 16 | hasKey, 17 | remove, 18 | clear 19 | } from "tns-core-modules/application-settings"; 20 | 21 | /** 22 | * get/set JSON objects in storage 23 | * 24 | * This saves and restores applications settings and state in a fashion 25 | * compatible with Ionic's Storage service. 26 | * 27 | * This saves key/value pairs into application settings and should be reserved 28 | * for small bits of data. 29 | */ 30 | 31 | @Injectable() 32 | export class SettingsService { 33 | 34 | constructor () {} 35 | 36 | // ----------------------------------------------------------------- 37 | 38 | /** 39 | * given a key, return an object from storage 40 | */ 41 | 42 | async get( key ) { 43 | 44 | let reply; 45 | 46 | // console.log( "SettingsService:get(): attempting to get key '" + key + "' from storage" ); 47 | 48 | let stringResult = getString( key ); 49 | 50 | console.log( "SettingsService:get(): got string result: '" + stringResult + "'" ); 51 | 52 | // we may have a JSON document or a bare value or nothing 53 | 54 | if (( typeof stringResult === 'string' ) && ( stringResult.charAt(0) == '{' )) { 55 | reply = JSON.parse( stringResult ); 56 | } else if ( typeof stringResult == 'undefined' ) { 57 | reply = null; 58 | } else { 59 | reply = stringResult; 60 | } 61 | 62 | // console.log( "SettingsService:get(): returning reply:", reply ); 63 | 64 | return reply; 65 | 66 | } // end of get() 67 | 68 | // ------------------------------------------------------------------- 69 | 70 | /** 71 | * set an object into the store. 72 | * 73 | * Sets an object into the store. 74 | * 75 | * Supports setting simple types and objects. Objects are JSON encoded. 76 | */ 77 | 78 | async set( key, value ) { 79 | 80 | let valueToSave; 81 | 82 | // console.log( "SettingsService:set(): attempting to save key '" + key + "' with value :", value ); 83 | 84 | switch( typeof value ) { 85 | 86 | case 'string': 87 | 88 | valueToSave = value; 89 | 90 | break; 91 | 92 | case 'boolean': 93 | case 'number': 94 | 95 | valueToSave = String( value ); 96 | 97 | break; 98 | 99 | case 'object': 100 | 101 | valueToSave = JSON.stringify( value ); 102 | 103 | break; 104 | 105 | default: 106 | 107 | throw new Error( "Don't know how to save type of '" + typeof value + "' for key '" + key + "'" ); 108 | 109 | break; 110 | 111 | } 112 | 113 | setString( key, valueToSave ); 114 | 115 | return true; 116 | } 117 | 118 | // ------------------------------------------------------------------- 119 | 120 | /** 121 | * clear an entry in the data store 122 | */ 123 | 124 | async remove( key ) { 125 | remove( key ); 126 | return true; 127 | } 128 | 129 | } // END 130 | -------------------------------------------------------------------------------- /demo-angular/src/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo-angular/src/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /demo-angular/src/main.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform"; 3 | 4 | import { AppModule } from "./app/app.module"; 5 | 6 | platformNativeScriptDynamic().bootstrapModule(AppModule); 7 | -------------------------------------------------------------------------------- /demo-angular/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "main.js", 3 | "android": { 4 | "v8Flags": "--expose_gc", 5 | "markingMode": "none" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /demo-angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "noEmitHelpers": true, 8 | "noEmitOnError": true, 9 | "skipLibCheck": true, 10 | "lib": [ 11 | "es6", 12 | "dom", 13 | "es2015.iterable" 14 | ], 15 | "baseUrl": ".", 16 | "paths": { 17 | "~/*": [ 18 | "src/*" 19 | ], 20 | "*": [ 21 | "./node_modules/*" 22 | ] 23 | } 24 | }, 25 | "exclude": [ 26 | "node_modules", 27 | "platforms" 28 | ] 29 | } -------------------------------------------------------------------------------- /demo-angular/tsconfig.tns.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "module": "esNext", 5 | "moduleResolution": "node" 6 | } 7 | } -------------------------------------------------------------------------------- /demo-angular/tsfmt.json: -------------------------------------------------------------------------------- 1 | { 2 | "indentSize": 4, 3 | "tabSize": 4 4 | } 5 | -------------------------------------------------------------------------------- /demo-angular/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:latest", 3 | "linterOptions": { 4 | "exclude": [ 5 | "app/*.d.ts" 6 | ] 7 | }, 8 | "rulesDirectory": [ 9 | "node_modules/codelyzer" 10 | ], 11 | "rules": { 12 | "array-type": [true, "generic"], 13 | "arrow-return-shorthand": true, 14 | "component-class-suffix": true, 15 | "deprecation": true, 16 | "directive-class-suffix": true, 17 | "member-access": [true, "no-public"], 18 | "newline-before-return": true, 19 | "no-angle-bracket-type-assertion": false, 20 | "no-attribute-parameter-decorator": true, 21 | "no-consecutive-blank-lines": [true, 1], 22 | "no-console": [false], 23 | "no-forward-ref": true, 24 | "no-implicit-dependencies": false, 25 | "no-input-rename": true, 26 | "no-irregular-whitespace": true, 27 | "no-output-on-prefix": true, 28 | "no-output-rename": true, 29 | "no-submodule-imports": false, 30 | "no-trailing-whitespace": [true, "ignore-blank-lines"], 31 | "no-unnecessary-initializer": true, 32 | "no-var-requires": false, 33 | "object-literal-key-quotes": [true, "as-needed"], 34 | "object-literal-sort-keys": false, 35 | "one-variable-per-declaration": [true, "ignore-for-loop"], 36 | "ordered-imports": false, 37 | "prefer-conditional-expression": false, 38 | "use-host-property-decorator": true, 39 | "use-input-property-decorator": true, 40 | "use-life-cycle-interface": true, 41 | "use-output-property-decorator": true, 42 | "use-pipe-transform-interface": true, 43 | "trailing-comma": [true, { 44 | "multiline": "never", 45 | "singleline": "never" 46 | }], 47 | "variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"], 48 | "whitespace": [true, 49 | "check-branch", 50 | "check-decl", 51 | "check-operator", 52 | "check-module", 53 | "check-separator", 54 | "check-type", 55 | "check-preblock" 56 | ] 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // compile 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | android { 9 | defaultConfig { 10 | generatedDensities = [] 11 | applicationId = "org.nativescript.mapbox" 12 | } 13 | aaptOptions { 14 | additionalParameters "--no-version-vectors" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "icon-29.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "icon-29@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "icon-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "icon-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "icon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "icon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "icon-76@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "83.5x83.5", 119 | "idiom" : "ipad", 120 | "filename" : "icon-83.5@2x.png", 121 | "scale" : "2x" 122 | } 123 | ], 124 | "info" : { 125 | "version" : 1, 126 | "author" : "xcode" 127 | } 128 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default-Landscape@3x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-667h@2x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "filename" : "Default-Portrait.png", 51 | "extent" : "full-screen", 52 | "minimum-system-version" : "7.0", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "filename" : "Default-Landscape.png", 59 | "extent" : "full-screen", 60 | "minimum-system-version" : "7.0", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "filename" : "Default-Portrait@2x.png", 67 | "extent" : "full-screen", 68 | "minimum-system-version" : "7.0", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "filename" : "Default-Landscape@2x.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "filename" : "Default.png", 83 | "extent" : "full-screen", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "filename" : "Default@2x.png", 90 | "extent" : "full-screen", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "iphone", 96 | "filename" : "Default-568h@2x.png", 97 | "extent" : "full-screen", 98 | "subtype" : "retina4", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "to-status-bar", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "portrait", 109 | "idiom" : "ipad", 110 | "filename" : "Default-Portrait.png", 111 | "extent" : "full-screen", 112 | "scale" : "1x" 113 | }, 114 | { 115 | "orientation" : "landscape", 116 | "idiom" : "ipad", 117 | "extent" : "to-status-bar", 118 | "scale" : "1x" 119 | }, 120 | { 121 | "orientation" : "landscape", 122 | "idiom" : "ipad", 123 | "filename" : "Default-Landscape.png", 124 | "extent" : "full-screen", 125 | "scale" : "1x" 126 | }, 127 | { 128 | "orientation" : "portrait", 129 | "idiom" : "ipad", 130 | "extent" : "to-status-bar", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "ipad", 136 | "filename" : "Default-Portrait@2x.png", 137 | "extent" : "full-screen", 138 | "scale" : "2x" 139 | }, 140 | { 141 | "orientation" : "landscape", 142 | "idiom" : "ipad", 143 | "extent" : "to-status-bar", 144 | "scale" : "2x" 145 | }, 146 | { 147 | "orientation" : "landscape", 148 | "idiom" : "ipad", 149 | "filename" : "Default-Landscape@2x.png", 150 | "extent" : "full-screen", 151 | "scale" : "2x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 6 | 7 | DEVELOPMENT_TEAM = 8Q5F6M3TNS 8 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yermo/nativescript-mapbox/e27631b9e14fc138f06c139c63a07fb9f1b8c569/demo/app/App_Resources/iOS/icon-40.png -------------------------------------------------------------------------------- /demo/app/OSM-map-style.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 8, 3 | "name": "OpenStreetMap Tiles", 4 | "sources": { 5 | "OSMTileLayer": { 6 | "type": "raster", 7 | "attribution": "(c) OpenStreetMap contributors, CC-BY-SA", 8 | "scheme": "xyz", 9 | "tiles": [ 10 | "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", 11 | "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png", 12 | "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png" 13 | ], 14 | "minzoom": 0, 15 | "maxzoom": 18, 16 | "tileSize": 256, 17 | "bounds": [ -180, -85, 180, 85 ] 18 | } 19 | }, 20 | "layers": [ 21 | { 22 | "id": "OSMTileLayer", 23 | "type": "raster", 24 | "source": "OSMTileLayer", 25 | "paint": { 26 | "raster-fade-duration": 100 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | page { 2 | background-color: #F4F4F4; 3 | } 4 | 5 | .tab-content { 6 | color: #808080; 7 | padding: 14; 8 | } 9 | 10 | .title { 11 | font-size: 20; 12 | margin: 0 0 10 0; 13 | color: #3c3c3c; 14 | } 15 | 16 | label { 17 | font-size: 16; 18 | } 19 | 20 | button { 21 | background-color: #3598db; 22 | padding: 2; 23 | margin: 3 6; 24 | font-size: 13; 25 | border-radius: 3; 26 | height: 30; 27 | } 28 | 29 | .button { 30 | color: #FFFFFF; 31 | } 32 | 33 | .button-offline { 34 | background-color: #A0A0A0; 35 | } 36 | 37 | .button-permissions { 38 | background-color: #808080; 39 | } 40 | -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | import * as application from 'tns-core-modules/application'; 2 | 3 | application.run({ moduleName: "main-page" }); 4 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import * as observable from "tns-core-modules/data/observable"; 2 | import * as pages from "tns-core-modules/ui/page"; 3 | import { Color } from "tns-core-modules/color"; 4 | import { HelloWorldModel } from "./main-view-model"; 5 | import { MapboxViewApi, LatLng } from "nativescript-mapbox"; 6 | 7 | import { SETTINGS } from '../../mapbox_config'; 8 | 9 | // ---------------------------------------------------------------- 10 | 11 | /** 12 | * Event handler for Page 'loaded' event attached in main-page.xml 13 | */ 14 | 15 | export function pageLoaded(args: observable.EventData) { 16 | 17 | let page = args.object; 18 | 19 | console.log( "main-page::pageLoaded(): callback" ); 20 | 21 | // avoid creating duplicates of the model onPause/onResume. 22 | 23 | if ( ! page.bindingContext ) { 24 | page.bindingContext = new HelloWorldModel(); 25 | 26 | // propagate the ACCESS_TOKEN to the XML. 27 | 28 | page.bindingContext.set( 'ACCESS_TOKEN', SETTINGS.mapbox_access_token ); 29 | } 30 | } 31 | 32 | // ----------------------------------------------------------- 33 | 34 | export function onLocationPermissionGranted(args) { 35 | 36 | console.log( "main-page::locationPermissionGranted(): callback" ); 37 | 38 | let map: MapboxViewApi = args.map; 39 | console.log("onLocationPermissionGranted, map: " + map); 40 | } 41 | 42 | // ----------------------------------------------------------- 43 | 44 | export function onLocationPermissionDenied(args) { 45 | 46 | console.log( "main-page::locationPermissionDenied(): callback" ); 47 | 48 | let map: MapboxViewApi = args.map; 49 | console.log( "main-page::onLocationPermissionDenied, map: " + map ); 50 | 51 | } 52 | 53 | // ----------------------------------------------------------- 54 | 55 | /** 56 | * callback when map is ready 57 | * 58 | * This is called once the map is ready to use. 59 | * 60 | * NOTE: if this function is not exported, the component-builder will 61 | * not pick it up and it will never get called. Something changed 62 | * as this used to work without the export. This took basically forever to figure 63 | * out. 64 | */ 65 | 66 | export function onMapReady(args) { 67 | 68 | console.log( "main-page::mapReady(): callback" ); 69 | 70 | let map: MapboxViewApi = args.map; 71 | 72 | // you can tap into the native MapView objects (MGLMapView for iOS and com.mapbox.mapboxsdk.maps.MapView for Android) 73 | 74 | const nativeMapView = args.ios ? args.ios : args.android; 75 | 76 | console.log( `main-page::Mapbox onMapReady for ${args.ios ? "iOS" : "Android"}, native object received: ${nativeMapView}` ); 77 | 78 | map.setOnMapClickListener( (point: LatLng) => { 79 | console.log(`Map tapped: ${JSON.stringify(point)}`); 80 | return true; 81 | }); 82 | 83 | map.setOnMapLongClickListener( (point: LatLng) => { 84 | console.log(`Map longpressed: ${JSON.stringify(point)}`); 85 | return true; 86 | }); 87 | 88 | // this works perfectly fine, but generates a lot of noise 89 | // map.setOnScrollListener((point?: LatLng) => console.log(`Map scrolled: ${JSON.stringify(point)}`)); 90 | 91 | // this allows json style loading for XYZ or TMS tiles source 92 | // map.setMapStyle("~/OSM-map-style.json"); 93 | 94 | // .. or use the convenience methods exposed on args.map, for instance: 95 | 96 | console.log( "main-page: before adding marker" ); 97 | 98 | map.addMarkers([ 99 | { 100 | id: 2, 101 | lat: 52.3602160, 102 | lng: 4.8891680, 103 | title: 'One-line title here', // no popup unless set 104 | subtitle: 'Really really nice location', 105 | iconPath: 'res/markers/green_pin_marker.png', 106 | onTap: () => { 107 | console.log("main-page 'Nice location' marker tapped"); 108 | }, 109 | onCalloutTap: () => { 110 | console.log("main-page 'Nice location' marker callout tapped"); 111 | } 112 | }] 113 | ).then(() => { 114 | console.log("main-page Markers added"); 115 | setTimeout(() => { 116 | map.queryRenderedFeatures({ 117 | point: { 118 | lat: 52.3602160, 119 | lng: 4.8891680 120 | } 121 | }).then(result => console.log(JSON.stringify(result))); 122 | }, 1000); 123 | }).catch( ( error ) => { 124 | console.error( "main-page: error adding markers:", error ); 125 | }); 126 | 127 | setTimeout(() => { 128 | map.setViewport( 129 | { 130 | bounds: { 131 | north: 52.4820, 132 | east: 5.1087, 133 | south: 52.2581, 134 | west: 4.6816 135 | }, 136 | animated: true 137 | } 138 | ); 139 | }, 3000); 140 | 141 | // note that this makes the app crash with/since Android SDK 6.1.2 and 6.1.3 (not sure about more recent versions) 142 | // setTimeout(() => { 143 | // map.setMapStyle(MapStyle.DARK); 144 | // }, 6000); 145 | 146 | setTimeout(() => { 147 | map.addPolyline({ 148 | id: 10, 149 | color: new Color("yellow"), 150 | points: [ 151 | { 152 | lat: 52.4, 153 | lng: 5 154 | }, 155 | { 156 | lat: 51.9, 157 | lng: 5.1 158 | }, 159 | { 160 | lat: 51.8, 161 | lng: 4.95 162 | } 163 | ] 164 | }); 165 | }, 10000); 166 | 167 | setTimeout(() => { 168 | map.setCenter({ 169 | lat: 52.4820, 170 | lng: 5.1087, 171 | animated: true 172 | }); 173 | }, 11000); 174 | 175 | setTimeout(() => { 176 | map.setZoomLevel({ 177 | level: 7, 178 | animated: true 179 | }); 180 | }, 16000); 181 | 182 | // setTimeout(() => { 183 | // map.removeMarkers([2]); 184 | // }, 10000); 185 | 186 | setTimeout(() => { 187 | map.setTilt({ 188 | tilt: 25, 189 | duration: 2500 190 | }); 191 | }, 21000); 192 | 193 | // setTimeout(() => { 194 | // map.animateCamera({ 195 | // target: { 196 | // lat: 51.8, 197 | // lng: 5 198 | // }, 199 | // tilt: 20, 200 | // zoomLevel: 8, 201 | // duration: 6000 202 | // }); 203 | // }, 14000); 204 | 205 | setTimeout(() => { 206 | map.removePolylines([10]); 207 | }, 24000); 208 | 209 | // this works just fine, but it interferes with the programmatic map so not doing this in the demo 210 | // setTimeout(() => { 211 | // map.trackUser({ 212 | // mode: "FOLLOW_WITH_HEADING", 213 | // animated: true 214 | // }); 215 | // }, 25000); 216 | } 217 | 218 | // END 219 | -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 41 | 42 | 43 | 44 | 54 | 55 | 56 | 57 | 71 | 72 | 73 | 74 | 82 | 83 | 84 | 85 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |