├── Mapbox ├── .vscode │ └── settings.json ├── .gitignore ├── app │ ├── res │ │ ├── telerik-logo.png │ │ └── markers │ │ │ ├── home_marker.png │ │ │ └── green_pin_marker.png │ ├── App_Resources │ │ ├── iOS │ │ │ ├── icon.png │ │ │ ├── Default.png │ │ │ ├── icon-40.png │ │ │ ├── icon-60.png │ │ │ ├── icon-72.png │ │ │ ├── icon-76.png │ │ │ ├── icon@2x.png │ │ │ ├── Default@2x.png │ │ │ ├── Icon-Small.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-72@2x.png │ │ │ ├── icon-76@2x.png │ │ │ ├── Icon-Small-50.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Icon-Small-50@2x.png │ │ │ ├── Default-Landscape.png │ │ │ ├── Default-Landscape@2x.png │ │ │ ├── Default-Portrait@2x.png │ │ │ └── Info.plist │ │ └── Android │ │ │ ├── drawable-hdpi │ │ │ └── icon.png │ │ │ ├── drawable-ldpi │ │ │ └── icon.png │ │ │ ├── drawable-mdpi │ │ │ └── icon.png │ │ │ ├── drawable-nodpi │ │ │ └── splashscreen.9.png │ │ │ └── AndroidManifest.xml │ ├── app.js │ ├── references.d.ts │ ├── app.css │ ├── package.json │ ├── LICENSE │ ├── main-page.js │ ├── main-page.xml │ └── main-view-model.js ├── .yo-rc.json ├── references.d.ts ├── tsconfig.json ├── .app.json ├── package.json ├── .abproject └── .abignore ├── screenshots ├── ios │ └── ios-1.png └── android │ └── android-1.png ├── .gitignore └── README.md /Mapbox/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.check.workspaceVersion": false 3 | } -------------------------------------------------------------------------------- /Mapbox/.gitignore: -------------------------------------------------------------------------------- 1 | metadata-i386 2 | metadata-x86_64 3 | typings-i386 4 | typings-x86_64 5 | -------------------------------------------------------------------------------- /screenshots/ios/ios-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/screenshots/ios/ios-1.png -------------------------------------------------------------------------------- /Mapbox/app/res/telerik-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/res/telerik-logo.png -------------------------------------------------------------------------------- /Mapbox/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-NativeScript": { 3 | "dependsOn": [ 4 | "generator-NativeScript@0.0.15" 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /Mapbox/references.d.ts: -------------------------------------------------------------------------------- 1 | /// Needed for autocompletion and compilation. -------------------------------------------------------------------------------- /screenshots/android/android-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/screenshots/android/android-1.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon.png -------------------------------------------------------------------------------- /Mapbox/app/res/markers/home_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/res/markers/home_marker.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Default.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-40.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-60.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-72.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-76.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Default@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Icon-Small.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-40@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-60@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-72@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/icon-76@2x.png -------------------------------------------------------------------------------- /Mapbox/app/res/markers/green_pin_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/res/markers/green_pin_marker.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | */bin 3 | */obj 4 | *.user-settings.xml 5 | Mapbox/node_modules 6 | Mapbox/platforms 7 | Mapbox/lib 8 | Mapbox/bin 9 | Mapbox/hooks 10 | -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Icon-Small-50.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Icon-Small@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Default-568h@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Default-Portrait.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /Mapbox/app/app.js: -------------------------------------------------------------------------------- 1 | var application = require("application"); 2 | application.mainModule = "main-page"; 3 | application.cssFile = "./app.css"; 4 | application.start(); 5 | -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Default-Landscape.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Default-Landscape@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/iOS/Default-Portrait@2x.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/Android/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/Android/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/Android/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/Android/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/Android/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/Android/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /Mapbox/app/references.d.ts: -------------------------------------------------------------------------------- 1 | /// Enable smart suggestions and completions in Visual Studio Code JavaScript projects. -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EddyVerbruggen/nativescript-mapbox-demo/HEAD/Mapbox/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png -------------------------------------------------------------------------------- /Mapbox/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "noEmitHelpers": true 7 | }, 8 | "exclude": [ 9 | "node_modules", 10 | "platforms" 11 | ] 12 | } -------------------------------------------------------------------------------- /Mapbox/.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "NativeScript", 3 | "views": [ 4 | { 5 | "type": "NativeScript:view", 6 | "name": "homeView", 7 | "components": [], 8 | "title": "Home View", 9 | "addToNavigation": true, 10 | "icon": "home" 11 | } 12 | ], 13 | "dataProviders": [], 14 | "name": "nativeScriptApp", 15 | "navigation": "listmenu", 16 | "transition": "none", 17 | "skin": "native" 18 | } -------------------------------------------------------------------------------- /Mapbox/app/app.css: -------------------------------------------------------------------------------- 1 | page { 2 | background-color: #F4F4F4; 3 | } 4 | 5 | .tab-content { 6 | color: #808080; 7 | padding: 10; 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 0; 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 | -------------------------------------------------------------------------------- /Mapbox/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "nativescript": { 3 | "id": "org.nativescript.mapboxdemo", 4 | "tns-android": { 5 | "version": "2.5.0" 6 | }, 7 | "tns-ios": { 8 | "version": "2.5.0" 9 | } 10 | }, 11 | "dependencies": { 12 | "nativescript-mapbox": "^2.6.0", 13 | "tns-core-modules": "^2.5.1" 14 | }, 15 | "scripts": { 16 | "iphone": "tns emulate ios --device 'iPhone SE'", 17 | "ipad": "tns emulate ios --device 'iPad Air 2'", 18 | "ios.device": "tns run ios", 19 | "android": "tns run android" 20 | }, 21 | "devDependencies": { 22 | "babel-traverse": "6.10.4", 23 | "babel-types": "6.11.1", 24 | "babylon": "6.8.4", 25 | "lazy": "1.0.11", 26 | "nativescript-dev-typescript": "^0.3.0", 27 | "typescript": "^2.1.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Mapbox/.abproject: -------------------------------------------------------------------------------- 1 | { 2 | "ProjectName": "Mapbox", 3 | "ProjectGuid": "f03f6a6d-914b-48be-862c-04f88787c3d7", 4 | "projectVersion": 1, 5 | "AppIdentifier": "com.telerik.plugindemo.nativescript.mapbox", 6 | "DisplayName": "Mapbox", 7 | "Author": "Telerik", 8 | "Description": "Mapbox", 9 | "BundleVersion": "1.0.2", 10 | "AndroidVersionCode": "1", 11 | "iOSDeviceFamily": [ 12 | "1", 13 | "2" 14 | ], 15 | "iOSBackgroundMode": [], 16 | "ProjectTypeGuids": "{F0A65104-D4F4-4012-B799-F612D75820F6}", 17 | "AndroidPermissions": [ 18 | "android.permission.INTERNET" 19 | ], 20 | "DeviceOrientations": [ 21 | "Portrait", 22 | "Landscape" 23 | ], 24 | "AndroidHardwareAcceleration": "false", 25 | "iOSStatusBarStyle": "Default", 26 | "FrameworkVersion": "2.2.0", 27 | "Framework": "NativeScript" 28 | } -------------------------------------------------------------------------------- /Mapbox/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tns-template-hello-world", 3 | "main": "app.js", 4 | "jsoptions": "--expose_gc", 5 | "version": "1.4.0", 6 | "author": { 7 | "name": "Telerik", 8 | "email": "support@telerik.com" 9 | }, 10 | "description": "Nativescript hello-world project template", 11 | "license": "BSD", 12 | "keywords": [ 13 | "telerik", 14 | "mobile", 15 | "nativescript", 16 | "{N}", 17 | "tns", 18 | "appbuilder", 19 | "template" 20 | ], 21 | "repository": { 22 | "type": "git", 23 | "url": "git://github.com/NativeScript/template-hello-world.git" 24 | }, 25 | "bugs": { 26 | "url": "https://github.com/NativeScript/template-hello-world/issues" 27 | }, 28 | "homepage": "https://github.com/NativeScript/template-hello-world", 29 | "readme": "ERROR: No README data found!", 30 | "_id": "tns-template-hello-world@1.4.0", 31 | "_from": "tns-template-hello-world@1.4.0" 32 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nativescript-mapbox demo app 2 | 3 | Demo app for the {N} [mapbox plugin](https://www.npmjs.com/package/nativescript-mapbox) 4 | 5 | ## Installation 6 | 7 | This app is built with the [NativeScript CLI](https://github.com/NativeScript/nativescript-cli). 8 | Once you have the [CLI installed](https://github.com/NativeScript/nativescript-cli#installation), start by cloning the repo: 9 | 10 | ``` 11 | $ git clone https://github.com/EddyVerbruggen/nativescript-mapbox-demo 12 | $ cd nativescript-mapbox-demo 13 | $ cd Mapbox 14 | ``` 15 | 16 | Next, install the app's iOS and Android runtimes, as well as the app's npm dependencies: 17 | 18 | ``` 19 | $ tns install 20 | ``` 21 | 22 | From there you can use the `run` command to run the demo app on iOS: 23 | 24 | ``` 25 | $ tns run ios --emulator 26 | ``` 27 | 28 | .. or on Android 29 | 30 | ``` 31 | $ tns run android --emulator 32 | ``` 33 | 34 | ## Screenshots 35 | 36 | ![](screenshots/ios/ios-1.png) 37 | 38 | ![](screenshots/android/android-1.png) 39 | -------------------------------------------------------------------------------- /Mapbox/app/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Telerik AD 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /Mapbox/.abignore: -------------------------------------------------------------------------------- 1 | # .abignore lets you configure which of your files and folders should be excluded from your application package during the build process. 2 | # Each project created with AppBuilder 2.6 or later contains a default .abignore which lists a number of system files and folders that might affect the size of your app or might prevent build operations from completing successfully. 3 | # 4 | # For more information about .abignore and how to write exclude and include rules for your projects, see http://docs.telerik.com/platform/appbuilder/testing-your-app/abignore 5 | 6 | # Windows files 7 | **/Thumbs.db 8 | 9 | # Mac OS files 10 | **/.DS_Store 11 | **/__MACOSX/**/* 12 | 13 | # Visual Studio files 14 | bin/**/* 15 | obj/**/* 16 | **/.vs/**/* 17 | **/.vscode/**/* 18 | **/*.obj 19 | **/*.pdb 20 | **/*.user 21 | **/*.aps 22 | **/*.pch 23 | **/*.vspscc 24 | **/*_i.c 25 | **/*_p.c 26 | **/*.ncb 27 | **/*.suo 28 | **/*.tlb 29 | **/*.tlh 30 | **/*.ilk 31 | **/*.lib 32 | **/*.sbr 33 | 34 | # Source control files 35 | .gitignore 36 | **/.git/**/* 37 | 38 | # AppBuilder files 39 | .abignore 40 | .*.abignore 41 | .*.*.abignore 42 | .ab/**/* 43 | .app.json 44 | .yo-rc.json 45 | 46 | # TypeScript files 47 | **/*.ts 48 | **/*.map 49 | tsconfig.json 50 | 51 | # Other 52 | **/*.bak 53 | **/*.cache 54 | **/*.log 55 | 56 | # NativeScript files 57 | platforms/**/* 58 | node_modules/**/* 59 | typings/**/* -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 20 | 21 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Mapbox/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.telerik.plugindemo.mapbox 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleDisplayName 10 | ${PRODUCT_NAME} 11 | CFBundleExecutable 12 | ${EXECUTABLE_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 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 | NSAppTransportSecurity 48 | 49 | NSAllowsArbitraryLoads 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Mapbox/app/main-page.js: -------------------------------------------------------------------------------- 1 | var vmModule = require("./main-view-model"); 2 | function pageLoaded(args) { 3 | var page = args.object; 4 | page.bindingContext = vmModule.mainViewModel; 5 | } 6 | exports.pageLoaded = pageLoaded; 7 | 8 | var mapbox = require("nativescript-mapbox"); 9 | 10 | function onMapReady(args) { 11 | args.map.addMarkers([ 12 | { 13 | id: 2, 14 | lat: 52.3602160, 15 | lng: 4.8891680, 16 | title: 'One-line title here', // no popup unless set 17 | subtitle: 'Really really nice location', 18 | iconPath: 'res/markers/green_pin_marker.png', 19 | onTap: function(){console.log("'Nice location' marker tapped");}, 20 | onCalloutTap: function(){console.log("'Nice location' marker callout tapped");} 21 | }] 22 | ); 23 | 24 | setTimeout(function() { 25 | args.map.setOnMapClickListener(function(point) { 26 | console.log("Map clicked: " + JSON.stringify(point)); 27 | }); 28 | args.map.setViewport( 29 | { 30 | bounds: { 31 | north: 52.4820, 32 | east: 5.1087, 33 | south: 52.2581, 34 | west: 4.6816 35 | }, 36 | animated: true 37 | } 38 | ); 39 | }, 3000); 40 | 41 | setTimeout(function() { 42 | args.map.setMapStyle(mapbox.MapStyle.DARK); 43 | }, 5000); 44 | 45 | /* 46 | setTimeout(function() { 47 | args.map.addPolyline({ 48 | id: 10, 49 | color: 0xffff0000, 50 | points: [ 51 | { 52 | lat: 52.4, 53 | lng: 5 54 | }, 55 | { 56 | lat: 51.9, 57 | lng: 5.1 58 | }, 59 | { 60 | lat: 51.8, 61 | lng: 4.95 62 | } 63 | ] 64 | }); 65 | }, 6000); 66 | */ 67 | 68 | setTimeout(function() { 69 | args.map.setCenter({ 70 | lat: 52.4820, 71 | lng: 5.1087, 72 | animated: true 73 | }); 74 | }, 6100); 75 | 76 | setTimeout(function() { 77 | args.map.setZoomLevel({ 78 | level: 8, 79 | animated: true 80 | }); 81 | }, 8000); 82 | 83 | // setTimeout(function() { 84 | // args.map.removeMarkers([2]); 85 | // }, 10000); 86 | 87 | setTimeout(function() { 88 | args.map.setTilt({ 89 | tilt: 85, 90 | duration: 2500 91 | }); 92 | }, 10000); 93 | 94 | /* 95 | setTimeout(function() { 96 | args.map.animateCamera({ 97 | target: { 98 | lat: 51.8, 99 | lng: 5 100 | }, 101 | tilt: 80, 102 | zoomLevel: 9, 103 | duration: 4000 104 | }); 105 | }, 13000); 106 | */ 107 | 108 | // setTimeout(function() { 109 | // args.map.removePolylines([10]); 110 | // }, 15000); 111 | } 112 | 113 | exports.onMapReady = onMapReady; -------------------------------------------------------------------------------- /Mapbox/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 28 | 29 | 30 | 31 | 41 | 42 | 43 | 44 | 54 | 55 | 56 | 57 | 65 | 66 | 67 | 68 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |