├── .gitignore ├── LICENSE ├── README.md ├── demo-vue ├── .gitignore ├── README.md ├── 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 │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── nativescript_google_maps_api.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-1024.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.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 │ ├── app.scss │ ├── assets │ │ └── images │ │ │ └── NativeScript-Vue.png │ ├── components │ │ └── App.vue │ ├── fonts │ │ └── .gitkeep │ ├── main.ts │ └── package.json ├── package-lock.json ├── package.json ├── tsconfig.json └── types │ ├── env.d.ts │ ├── references.d.ts │ └── shims.vue.d.ts ├── demo ├── .gitignore ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── app.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── assets │ │ │ │ └── nativescript_google_maps_api.xml │ │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ └── icon.png │ │ │ │ ├── drawable-nodpi │ │ │ │ └── splashscreen.9.png │ │ │ │ └── values │ │ │ │ └── nativescript_google_maps_api.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.png │ ├── app.css │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ ├── map-style.json │ ├── package.json │ └── references.d.ts ├── nativescript.config.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── tsconfig.json └── webpack.config.js ├── ng-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 │ │ │ │ ├── nativescript_google_maps_api.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 │ ├── README.md │ ├── app.component.ts │ ├── app.css │ ├── app.module.ts │ ├── app.routing.ts │ ├── main.aot.ts │ ├── main.ts │ ├── map │ │ ├── map.component.ts │ │ ├── map.css │ │ └── map.html │ └── package.json ├── package-lock.json ├── package.json ├── references.d.ts └── tsconfig.json ├── publish ├── pack.sh ├── package.json └── publish.sh └── src ├── .github-release.json ├── .npmignore ├── map-view-common.ts ├── map-view.android.ts ├── map-view.d.ts ├── map-view.ios.ts ├── package-lock.json ├── package.json ├── platforms ├── android │ ├── AndroidManifest.xml │ ├── include.gradle │ ├── nativescript_google_maps_sdk.aar │ └── res │ │ └── values │ │ └── nativescript_google_maps_api.xml └── ios │ ├── Podfile │ └── typings │ ├── objc!GoogleMaps.d.ts │ └── objc!GoogleMapsBase.d.ts ├── references.d.ts ├── scripts └── prepare.js └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Node template 3 | # Logs 4 | logs 5 | *.log 6 | **/*.js 7 | !/demo/**/*.js 8 | 9 | # Runtime data 10 | pids 11 | *.pid 12 | /demo/node_modules 13 | /demo/platforms 14 | /ng-demo/node_modules 15 | /ng-demo/platforms 16 | tns_modules 17 | .nsbuildinfo 18 | .nslivesyncinfo 19 | *.seed 20 | /package 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | 28 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (http://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directory 38 | # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git 39 | node_modules 40 | **/node_modules 41 | 42 | ### JetBrains template 43 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion 44 | 45 | *.iml 46 | 47 | ## Directory-based project format: 48 | .idea/ 49 | .vscode/ 50 | # if you remove the above rule, at least ignore the following: 51 | 52 | # User-specific stuff: 53 | # .idea/workspace.xml 54 | # .idea/tasks.xml 55 | # .idea/dictionaries 56 | 57 | # Sensitive or high-churn files: 58 | # .idea/dataSources.ids 59 | # .idea/dataSources.xml 60 | # .idea/sqlDataSources.xml 61 | # .idea/dynamic.xml 62 | # .idea/uiDesigner.xml 63 | 64 | # Gradle: 65 | # .idea/gradle.xml 66 | # .idea/libraries 67 | 68 | # Mongo Explorer plugin: 69 | # .idea/mongoSettings.xml 70 | 71 | ## File-based project format: 72 | *.ipr 73 | *.iws 74 | 75 | ## Plugin-specific files: 76 | 77 | # IntelliJ 78 | /out/ 79 | 80 | # mpeltonen/sbt-idea plugin 81 | .idea_modules/ 82 | 83 | # JIRA plugin 84 | atlassian-ide-plugin.xml 85 | 86 | # Crashlytics plugin (for Android Studio and IntelliJ) 87 | com_crashlytics_export_strings.xml 88 | crashlytics.properties 89 | crashlytics-build.properties 90 | /demo/lib/ 91 | 92 | # Plugin Scripts 93 | !src/scripts/*.js 94 | 95 | # Publish Scripts 96 | publish/package-lock.json 97 | publish/package -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2015 Dan Prietti 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NativeScript plugin for the Google Maps SDK 2 | ================ 3 | 4 | This is a cross-platform (iOS & Android) Nativescript plugin for the [Google Maps API](https://developers.google.com/maps/). 5 | 6 | [![NPM version][npm-image]][npm-url] 7 | [![Dependency status][david-dm-image]][david-dm-url] 8 | 9 | [npm-url]: https://npmjs.org/package/nativescript-google-maps-sdk 10 | [npm-image]: http://img.shields.io/npm/v/nativescript-google-maps-sdk.svg 11 | [david-dm-url]:https://david-dm.org/dapriett/nativescript-google-maps-sdk 12 | [david-dm-image]:https://david-dm.org/dapriett/nativescript-google-maps-sdk.svg 13 | 14 | [![NPM](https://nodei.co/npm/nativescript-google-maps-sdk.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/package/nativescript-google-maps-sdk) 15 | 16 | Prerequisites 17 | === 18 | **iOS** - [Cocoapods](https://guides.cocoapods.org/using/getting-started.html#getting-started) must be installed. 19 | 20 | **Android** - The latest version of the [Google Play Services SDK](https://developer.android.com/sdk/installing/adding-packages.html) must be installed. 21 | 22 | **Google Maps API Key** - Visit the [Google Developers Console](https://console.developers.google.com), create a project, and enable the `Google Maps Android API` and `Google Maps SDK for iOS` APIs. Then, under credentials, create an API key. 23 | 24 | Installation 25 | === 26 | 27 | Install the plugin using the NativeScript CLI tooling: 28 | 29 | ### Nativescript 7+ 30 | 31 | ``` 32 | tns plugin add nativescript-google-maps-sdk 33 | ``` 34 | 35 | ### Nativescript < 7 36 | 37 | ``` 38 | tns plugin add nativescript-google-maps-sdk@2.9.1 39 | ``` 40 | 41 | Setup 42 | === 43 | 44 | See demo code included [here](https://github.com/dapriett/nativescript-google-maps-sdk/tree/master/demo) 45 | 46 | See a live demo [here](https://tinyurl.com/m7ndp7u) 47 | 48 | ## Configure API Key for Android 49 | 50 | ### Nativescript < 4 51 | 52 | Start by copying the necessary template resource files in to the Android app resources folder: 53 | 54 | ``` 55 | cp -r node_modules/nativescript-google-maps-sdk/platforms/android/res/values app/App_Resources/Android/ 56 | ``` 57 | Next, modify your `app/App_Resources/Android/values/nativescript_google_maps_api.xml` file by uncommenting the `nativescript_google_maps_api_key` string, and replace `PUT_API_KEY_HERE` with the API key you created earlier. 58 | 59 | Finally, modify your `app/App_Resources/Android/AndroidManifest.xml` file by inserting the following in between the `` tags: 60 | 61 | ```(xml) 62 | 65 | ``` 66 | 67 | ### Nativescript 4+ 68 | 69 | Start by copying the necessary template resource files in to the Android app resources folder: 70 | 71 | ``` 72 | cp -r node_modules/nativescript-google-maps-sdk/platforms/android/res/values app/App_Resources/Android/src/main/res 73 | ``` 74 | 75 | Next, modify your `app/App_Resources/Android/src/main/res/values/nativescript_google_maps_api.xml` file by uncommenting the `nativescript_google_maps_api_key` string, and replace `PUT_API_KEY_HERE` with the API key you created earlier. 76 | 77 | Finally, modify your `app/App_Resources/Android/src/main/AndroidManifest.xml` file by inserting the following in between your `` tags: 78 | 79 | ```(xml) 80 | 83 | ``` 84 | 85 | The plugin will default to the latest available version of the Google Play Services SDK for Android. If you need to change the version, you can add a `project.ext` property, `googlePlayServicesVersion`, like so: 86 | 87 | ``` 88 | // /app/App_Resources/Android/app.gradle 89 | 90 | project.ext { 91 | googlePlayServicesVersion = "+" 92 | } 93 | ``` 94 | 95 | ## Configure API Key for iOS 96 | 97 | In your `app.js`, use the following code to add your API key (replace `PUT_API_KEY_HERE` with the API key you created earlier): 98 | 99 | ``` 100 | if (application.ios) { 101 | GMSServices.provideAPIKey("PUT_API_KEY_HERE"); 102 | } 103 | ``` 104 | If you are using Angular, modify your `app.module.ts` as follows: 105 | ``` 106 | import * as platform from "platform"; 107 | declare var GMSServices: any; 108 | 109 | .... 110 | 111 | if (platform.isIOS) { 112 | GMSServices.provideAPIKey("PUT_API_KEY_HERE"); 113 | } 114 | ``` 115 | 116 | ## Adding the MapView 117 | 118 | Modify your view by adding the `xmlns:maps="nativescript-google-maps-sdk"` namespace to your `` tag, then use the `` tag to create the MapView: 119 | 120 | ``` 121 | 122 | 123 | 127 | 128 | 144 | 145 | 146 | ``` 147 | 148 | ## Properties 149 | 150 | The following properties are available for adjusting the camera view: 151 | 152 | | Property | Description and Data Type 153 | :------------- | :--------------------------------- 154 | `latitude` | Latitude, in degrees: `number` 155 | `longitude` | Longitude, in degrees: `number` 156 | `zoom` | Zoom level (described [here](https://developers.google.com/maps/documentation/javascript/tutorial#zoom-levels)): `number` 157 | `bearing` | Bearing, in degrees: `number` 158 | `tilt` | Tilt, in degrees: `number` 159 | `padding` | Top, bottom, left and right padding amounts, in Device Independent Pixels: `number[]` (array) 160 | `mapAnimationsEnabled` | Whether or not to animate camera changes: `Boolean` 161 | 162 | ## Events 163 | 164 | The following events are available: 165 | 166 | | Event | Description 167 | :------------- | :--------------------------------- 168 | `mapReady` | Fires when the MapView is ready for use 169 | `myLocationTapped` | Fires when the 'My Location' button is tapped 170 | `coordinateTapped` | Fires when a coordinate is tapped on the map 171 | `coordinateLongPress` | Fires when a coordinate is long-pressed on the map 172 | `markerSelect` | Fires when a marker is selected 173 | `markerBeginDragging` | Fires when a marker begins dragging 174 | `markerEndDragging` | Fires when a marker ends dragging 175 | `markerDrag` | Fires repeatedly while a marker is being dragged 176 | `markerInfoWindowTapped` | Fires when a marker's info window is tapped 177 | `markerInfoWindowClosed` | Fires when a marker's info window is closed 178 | `shapeSelect` | Fires when a shape (e.g., `Circle`, `Polygon`, `Polyline`) is selected *(Note: you must explicity configure `shape.clickable = true;` for this event to fire)* 179 | `cameraChanged` | Fires after the camera has changed 180 | `cameraMove` | Fires repeatedly while the camera is moving 181 | `indoorBuildingFocused` | Fires when a building is focused on (the building currently centered, selected by the user or by the location provider) 182 | `indoorLevelActivated` | Fires when the level of the focused building changes 183 | 184 | ## Native Map Object 185 | 186 | The MapView's `gMap` property gives you access to the platform's native map object–––consult the appropriate SDK reference on how to use it: [iOS](https://developers.google.com/maps/documentation/ios-sdk/reference/interface_g_m_s_map_view) | [Android](https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap) 187 | 188 | ## UI Settings 189 | 190 | You can adjust the map's UI settings after the `mapReady` event has fired by configuring the following properties on `mapView.settings`: 191 | 192 | | Property | Description and Data Type 193 | :--------------- |:--------------------------------- 194 | `compassEnabled` | Whether the compass is enabled or not: `Boolean` 195 | `indoorLevelPickerEnabled` | Whether the indoor level picker is enabled or not: `Boolean` 196 | `mapToolbarEnabled` | ** **Android only** ** Whether the map toolbar is enabled or not: `Boolean` 197 | `myLocationButtonEnabled` | Whether the 'My Location' button is enabled or not: `Boolean` 198 | `rotateGesturesEnabled` | Whether the compass is enabled or not: `Boolean` 199 | `scrollGesturesEnabled` | Whether map scroll gestures are enabled or not: `Boolean` 200 | `tiltGesturesEnabled` | Whether map tilt gestures are enabled or not: `Boolean` 201 | `zoomGesturesEnabled` | Whether map zoom gestures are enabled or not: `Boolean` 202 | `zoomControlsEnabled` | ** **Android only** ** Whether map zoom controls are enabled or not: `Boolean` 203 | 204 | ## Styling 205 | 206 | Use `gMap.setStyle(style);` to set the map's styling ([Google Maps Style Reference](https://developers.google.com/maps/documentation/android-api/style-reference) | [Styling Wizard](https://mapstyle.withgoogle.com/)). 207 | 208 | ### Angular 209 | 210 | Use `this.mapView.setStyle( 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #53ba82 5 | #33B5E5 6 | #272734 7 | 8 | -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/Android/src/main/res/values/nativescript_google_maps_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs 4 | -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/Android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Google Maps 4 | Google Maps 5 | 6 | -------------------------------------------------------------------------------- /demo-vue/app/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-vue/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" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "icon-60@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon-60@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "29x29", 47 | "idiom" : "ipad", 48 | "filename" : "icon-29.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "29x29", 53 | "idiom" : "ipad", 54 | "filename" : "icon-29@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "40x40", 59 | "idiom" : "ipad", 60 | "filename" : "icon-40.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "40x40", 65 | "idiom" : "ipad", 66 | "filename" : "icon-40@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "76x76", 71 | "idiom" : "ipad", 72 | "filename" : "icon-76.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "76x76", 77 | "idiom" : "ipad", 78 | "filename" : "icon-76@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "83.5x83.5", 83 | "idiom" : "ipad", 84 | "filename" : "icon-83.5@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "1024x1024", 89 | "idiom" : "ios-marketing", 90 | "filename" : "icon-1024.png", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "2436h", 7 | "filename" : "Default-1125h.png", 8 | "minimum-system-version" : "11.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "orientation" : "landscape", 14 | "idiom" : "iphone", 15 | "extent" : "full-screen", 16 | "filename" : "Default-Landscape-X.png", 17 | "minimum-system-version" : "11.0", 18 | "subtype" : "2436h", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "736h", 25 | "filename" : "Default-736h@3x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "3x" 29 | }, 30 | { 31 | "extent" : "full-screen", 32 | "idiom" : "iphone", 33 | "subtype" : "736h", 34 | "filename" : "Default-Landscape@3x.png", 35 | "minimum-system-version" : "8.0", 36 | "orientation" : "landscape", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "extent" : "full-screen", 41 | "idiom" : "iphone", 42 | "subtype" : "667h", 43 | "filename" : "Default-667h@2x.png", 44 | "minimum-system-version" : "8.0", 45 | "orientation" : "portrait", 46 | "scale" : "2x" 47 | }, 48 | { 49 | "orientation" : "portrait", 50 | "idiom" : "iphone", 51 | "filename" : "Default@2x.png", 52 | "extent" : "full-screen", 53 | "minimum-system-version" : "7.0", 54 | "scale" : "2x" 55 | }, 56 | { 57 | "extent" : "full-screen", 58 | "idiom" : "iphone", 59 | "subtype" : "retina4", 60 | "filename" : "Default-568h@2x.png", 61 | "minimum-system-version" : "7.0", 62 | "orientation" : "portrait", 63 | "scale" : "2x" 64 | }, 65 | { 66 | "orientation" : "portrait", 67 | "idiom" : "ipad", 68 | "filename" : "Default-Portrait.png", 69 | "extent" : "full-screen", 70 | "minimum-system-version" : "7.0", 71 | "scale" : "1x" 72 | }, 73 | { 74 | "orientation" : "landscape", 75 | "idiom" : "ipad", 76 | "filename" : "Default-Landscape.png", 77 | "extent" : "full-screen", 78 | "minimum-system-version" : "7.0", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "orientation" : "portrait", 83 | "idiom" : "ipad", 84 | "filename" : "Default-Portrait@2x.png", 85 | "extent" : "full-screen", 86 | "minimum-system-version" : "7.0", 87 | "scale" : "2x" 88 | }, 89 | { 90 | "orientation" : "landscape", 91 | "idiom" : "ipad", 92 | "filename" : "Default-Landscape@2x.png", 93 | "extent" : "full-screen", 94 | "minimum-system-version" : "7.0", 95 | "scale" : "2x" 96 | }, 97 | { 98 | "orientation" : "portrait", 99 | "idiom" : "iphone", 100 | "filename" : "Default.png", 101 | "extent" : "full-screen", 102 | "scale" : "1x" 103 | }, 104 | { 105 | "orientation" : "portrait", 106 | "idiom" : "iphone", 107 | "filename" : "Default@2x.png", 108 | "extent" : "full-screen", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "orientation" : "portrait", 113 | "idiom" : "iphone", 114 | "filename" : "Default-568h@2x.png", 115 | "extent" : "full-screen", 116 | "subtype" : "retina4", 117 | "scale" : "2x" 118 | }, 119 | { 120 | "orientation" : "portrait", 121 | "idiom" : "ipad", 122 | "extent" : "to-status-bar", 123 | "scale" : "1x" 124 | }, 125 | { 126 | "orientation" : "portrait", 127 | "idiom" : "ipad", 128 | "filename" : "Default-Portrait.png", 129 | "extent" : "full-screen", 130 | "scale" : "1x" 131 | }, 132 | { 133 | "orientation" : "landscape", 134 | "idiom" : "ipad", 135 | "extent" : "to-status-bar", 136 | "scale" : "1x" 137 | }, 138 | { 139 | "orientation" : "landscape", 140 | "idiom" : "ipad", 141 | "filename" : "Default-Landscape.png", 142 | "extent" : "full-screen", 143 | "scale" : "1x" 144 | }, 145 | { 146 | "orientation" : "portrait", 147 | "idiom" : "ipad", 148 | "extent" : "to-status-bar", 149 | "scale" : "2x" 150 | }, 151 | { 152 | "orientation" : "portrait", 153 | "idiom" : "ipad", 154 | "filename" : "Default-Portrait@2x.png", 155 | "extent" : "full-screen", 156 | "scale" : "2x" 157 | }, 158 | { 159 | "orientation" : "landscape", 160 | "idiom" : "ipad", 161 | "extent" : "to-status-bar", 162 | "scale" : "2x" 163 | }, 164 | { 165 | "orientation" : "landscape", 166 | "idiom" : "ipad", 167 | "filename" : "Default-Landscape@2x.png", 168 | "extent" : "full-screen", 169 | "scale" : "2x" 170 | } 171 | ], 172 | "info" : { 173 | "version" : 1, 174 | "author" : "xcode" 175 | } 176 | } -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo-vue/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-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo-vue/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-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo-vue/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Google Maps 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0.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 | NSLocationWhenInUseUsageDescription 47 | Need location when in use. 48 | NSLocationAlwaysUsageDescription 49 | Need location always. 50 | 51 | 52 | -------------------------------------------------------------------------------- /demo-vue/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-vue/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 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /demo-vue/app/app.scss: -------------------------------------------------------------------------------- 1 | // NativeScript core theme 2 | // @see https://docs.nativescript.org/ui/theme 3 | @import '~nativescript-theme-core/scss/dark'; 4 | 5 | // Override variables here 6 | 7 | @import '~nativescript-theme-core/scss/index'; 8 | 9 | // Global SCSS styling 10 | // @see https://docs.nativescript.org/ui/styling 11 | -------------------------------------------------------------------------------- /demo-vue/app/assets/images/NativeScript-Vue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/assets/images/NativeScript-Vue.png -------------------------------------------------------------------------------- /demo-vue/app/components/App.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 51 | 52 | 65 | -------------------------------------------------------------------------------- /demo-vue/app/fonts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo-vue/app/fonts/.gitkeep -------------------------------------------------------------------------------- /demo-vue/app/main.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'nativescript-vue'; 2 | import App from './components/App.vue'; 3 | import { isIOS } from "tns-core-modules/platform"; 4 | import { MapView } from "nativescript-google-maps-sdk"; 5 | 6 | (Vue).registerElement('MapView', () => MapView); 7 | 8 | // Prints Vue logs when --env.production is *NOT* set while building 9 | Vue.config.silent = (TNS_ENV === 'production'); 10 | 11 | declare const GMSServices: any; 12 | 13 | if (isIOS) { 14 | GMSServices.provideAPIKey("AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs"); 15 | } 16 | 17 | new Vue({ 18 | render: h => h('frame', [h(App)]) 19 | }).$start(); 20 | -------------------------------------------------------------------------------- /demo-vue/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": { 3 | "v8Flags": "--expose_gc" 4 | }, 5 | "main": "main", 6 | "name": "demo-vue", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /demo-vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-vue", 3 | "version": "1.0.0", 4 | "description": "Vue demo for the Google Maps NativeScript plugin", 5 | "author": "EddyVerbruggen ", 6 | "license": "MIT", 7 | "nativescript": { 8 | "id": "org.nativescript.plugindemo.googlemaps.vue", 9 | "tns-ios": { 10 | "version": "5.0.0" 11 | }, 12 | "tns-android": { 13 | "version": "5.0.0" 14 | } 15 | }, 16 | "dependencies": { 17 | "nativescript-google-maps-sdk": "file:../src", 18 | "nativescript-theme-core": "^1.0.4", 19 | "nativescript-vue": "^2.0.0", 20 | "tns-core-modules": "^5.0.2" 21 | }, 22 | "devDependencies": { 23 | "@babel/core": "^7.0.0", 24 | "@babel/preset-env": "^7.0.0", 25 | "babel-loader": "^8.0.2", 26 | "babel-traverse": "6.26.0", 27 | "babel-types": "6.26.0", 28 | "babylon": "6.18.0", 29 | "clean-webpack-plugin": "^0.1.19", 30 | "copy-webpack-plugin": "^4.5.2", 31 | "css-loader": "^1.0.0", 32 | "lazy": "1.0.11", 33 | "nativescript-dev-webpack": "next", 34 | "nativescript-vue-template-compiler": "^2.0.0", 35 | "nativescript-worker-loader": "~0.9.0", 36 | "node-sass": "^4.9.2", 37 | "sass-loader": "^7.1.0", 38 | "terser-webpack-plugin": "^1.1.0", 39 | "tns-platform-declarations": "^5.1.2", 40 | "typescript": "^3.2.4", 41 | "vue": "^2.5.22", 42 | "vue-loader": "^15.2.6", 43 | "webpack": "^4.16.4", 44 | "webpack-bundle-analyzer": "~2.13.1", 45 | "webpack-cli": "^3.1.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /demo-vue/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ 4 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 5 | "lib": [ 6 | "dom", "es2015" 7 | ], /* Specify library files to be included in the compilation. */ 8 | "sourceMap": true, /* Generates corresponding '.map' file. */ 9 | "noEmitHelpers": true, 10 | "importHelpers": true, /* Import emit helpers from 'tslib'. */ 11 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 12 | "baseUrl": ".", /* Base directory to resolve non-absolute module names. */ 13 | "paths": { 14 | "@/*": [ 15 | "app/*" 16 | ] 17 | }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 18 | "typeRoots": [ 19 | "types" 20 | ], /* List of folders to include type definitions from. */ 21 | "types": [ 22 | "node" 23 | ], /* Type declaration files to be included in compilation. */ 24 | "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 25 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 26 | "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 27 | "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 28 | 29 | "skipLibCheck": true 30 | }, 31 | "include": [ 32 | "app", 33 | "types" 34 | ], 35 | "exclude": [ 36 | "node_modules", 37 | "platforms" 38 | ] 39 | } -------------------------------------------------------------------------------- /demo-vue/types/env.d.ts: -------------------------------------------------------------------------------- 1 | declare var TNS_ENV: string; -------------------------------------------------------------------------------- /demo-vue/types/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// -------------------------------------------------------------------------------- /demo-vue/types/shims.vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | # JetBrains project files 2 | .idea 3 | 4 | # NPM 5 | node_modules 6 | 7 | # NativeScript application 8 | hooks 9 | platforms 10 | .migration_backup 11 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | project.ext { 2 | // Uncomment below to change Google Play Services Version 3 | //googlePlayServicesVersion = "+" 4 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/assets/nativescript_google_maps_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs 4 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splashscreen.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splashscreen.9.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/src/main/res/values/nativescript_google_maps_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs 4 | -------------------------------------------------------------------------------- /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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/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 | NSLocationWhenInUseUsageDescription 47 | Need location when in use. 48 | NSLocationAlwaysUsageDescription 49 | Need location always. 50 | 51 | -------------------------------------------------------------------------------- /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 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/demo/app/App_Resources/iOS/icon.png -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | .title { 2 | font-size: 30; 3 | horizontal-align: center; 4 | margin: 0; 5 | color: #009688; 6 | } 7 | 8 | .snippet { 9 | font-size: 18; 10 | horizontal-align: center; 11 | margin: 0; 12 | margin-bottom: 20; 13 | color: #999; 14 | } 15 | 16 | button { 17 | font-size: 42; 18 | horizontal-align: center; 19 | } 20 | 21 | .message { 22 | font-size: 20; 23 | color: #284848; 24 | horizontal-align: center; 25 | } 26 | 27 | .infoWindowImage { 28 | horizontal-align: center; 29 | margin: 0; 30 | } 31 | 32 | .infoWindowCoordinates { 33 | horizontal-align: left; 34 | margin: 0; 35 | color: #999999; 36 | font-size: 16; 37 | font-weight: bold; 38 | text-decoration: none; 39 | } 40 | -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | import {Application} from "@nativescript/core"; 2 | 3 | declare var GMSServices: any; 4 | if(Application.ios) { 5 | GMSServices.provideAPIKey("AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs"); 6 | } 7 | 8 | Application.run({ moduleName: "main-page" }); 9 | 10 | /* 11 | Do not place any code after the application has been started as it will not 12 | be executed on iOS. 13 | */ 14 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import { HelloWorldModel } from "./main-view-model"; 2 | import * as mapsModule from "nativescript-google-maps-sdk"; 3 | import * as permissions from "nativescript-permissions"; 4 | import {Application, Color} from "@nativescript/core"; 5 | var style = require('./map-style.json'); 6 | 7 | declare var android: any; 8 | let vmModule: HelloWorldModel = null; 9 | const delay = 1000; 10 | 11 | export function pageLoaded(args) { 12 | var page = args.object; 13 | vmModule = new HelloWorldModel(); 14 | page.bindingContext = vmModule; 15 | } 16 | 17 | function wait(milliSeconds) { 18 | return new Promise(function(resolve, reject) { 19 | setTimeout(function(){ 20 | resolve(milliSeconds); 21 | }, milliSeconds); 22 | }); 23 | } 24 | 25 | function requestPermissions() { 26 | return new Promise(function(resolve, reject) { 27 | if (!Application.android) return resolve(true); 28 | permissions.requestPermission([ 29 | android.Manifest.permission.ACCESS_FINE_LOCATION, 30 | android.Manifest.permission.ACCESS_COARSE_LOCATION], 31 | "This demo will stink without these...") 32 | .then(function (result) { 33 | console.log("Permissions granted!"); 34 | resolve(true); 35 | }) 36 | .catch(function (result) { 37 | console.log("Permissions failed :(", result); 38 | resolve(false); 39 | }); 40 | 41 | }); 42 | } 43 | 44 | function printUISettings(settings) { 45 | console.log("Current UI setting:\n" + JSON.stringify({ 46 | compassEnabled: settings.compassEnabled, 47 | indoorLevelPickerEnabled: settings.indoorLevelPickerEnabled, 48 | mapToolbarEnabled: settings.mapToolbarEnabled, 49 | myLocationButtonEnabled: settings.myLocationButtonEnabled, 50 | rotateGesturesEnabled: settings.rotateGesturesEnabled, 51 | scrollGesturesEnabled: settings.scrollGesturesEnabled, 52 | tiltGesturesEnabled: settings.tiltGesturesEnabled, 53 | zoomControlsEnabled: settings.zoomControlsEnabled, 54 | zoomGesturesEnabled: settings.zoomGesturesEnabled 55 | }, undefined, 2)); 56 | } 57 | 58 | var mapView = null; 59 | 60 | export function onMapReady(args) { 61 | mapView = args.object; 62 | 63 | console.log("onMapReady"); 64 | mapView.settings.compassEnabled = true; 65 | printUISettings(mapView.settings); 66 | 67 | 68 | console.log("Setting a marker..."); 69 | var marker = new mapsModule.Marker(); 70 | marker.position = mapsModule.Position.positionFromLatLng(-33.86, 151.20); 71 | marker.title = "Sydney"; 72 | marker.snippet = "Australia"; 73 | marker.color = "green"; 74 | marker.userData = {index: 1}; 75 | mapView.addMarker(marker); 76 | 77 | var circle = new mapsModule.Circle(); 78 | circle.center = mapsModule.Position.positionFromLatLng(-33.42, 151.32); 79 | circle.visible = true; 80 | circle.radius = 5000; 81 | circle.fillColor = new Color('#99ff8800'); 82 | circle.strokeColor = new Color('#99ff0000'); 83 | circle.strokeWidth = 2; 84 | mapView.addCircle(circle); 85 | 86 | var polyline = new mapsModule.Polyline(); 87 | var point = mapsModule.Position.positionFromLatLng(-32.89, 151.44); 88 | polyline.addPoints([ 89 | mapsModule.Position.positionFromLatLng(-33.86, 151.20), 90 | point, 91 | mapsModule.Position.positionFromLatLng(-33.42, 151.32) 92 | ]); 93 | polyline.visible = true; 94 | polyline.width = 8; 95 | polyline.color = new Color('#DD00b3fd'); 96 | polyline.geodesic = true; 97 | mapView.addPolyline(polyline); 98 | 99 | var polygon = new mapsModule.Polygon(); 100 | polygon.addPoints([ 101 | mapsModule.Position.positionFromLatLng(-33.86, 151.20), 102 | mapsModule.Position.positionFromLatLng(-33.89, 151.40), 103 | mapsModule.Position.positionFromLatLng(-34.22, 151.32) 104 | ]); 105 | polygon.visible = true; 106 | polygon.fillColor = new Color('#9970d0a0'); 107 | polygon.strokeColor = new Color('#9900d0a0'); 108 | polygon.strokeWidth = 5; 109 | mapView.addPolygon(polygon); 110 | 111 | marker = new mapsModule.Marker(); 112 | marker.position = mapsModule.Position.positionFromLatLng(-33.42, 151.32); 113 | marker.title = "Gosford"; 114 | marker.snippet = "Australia"; 115 | // var icon = new Image(); 116 | // icon.imageSource = imageSource.fromResource('icon'); 117 | // marker.icon = icon; 118 | marker.icon = 'icon'; 119 | marker.alpha = 0.6; 120 | marker.flat = true; 121 | marker.anchor = [0.5, 0.5]; 122 | marker.draggable = true; 123 | marker.visible = false; 124 | marker.userData = {index: 2}; 125 | mapView.addMarker(marker); 126 | 127 | // Custom Info Window Marker 128 | /*marker = new mapsModule.Marker(); 129 | marker.position = mapsModule.Position.positionFromLatLng(-33.22, 151.20); 130 | marker.infoWindowTemplate = 'testWindow'; 131 | mapView.addMarker(marker); 132 | marker.showInfoWindow();*/ 133 | 134 | requestPermissions().then(function(granted) { 135 | if(granted) { 136 | console.log("Enabling My Location.."); 137 | mapView.myLocationEnabled = true; 138 | mapView.settings.myLocationButtonEnabled = true; 139 | } 140 | return wait(6000); 141 | }).then(function () { 142 | marker.hideInfoWindow(); 143 | marker = mapView.findMarker(function (marker) { 144 | return marker.userData.index === 2; 145 | }); 146 | console.log("Moving marker...", marker.userData); 147 | marker.position = mapsModule.Position.positionFromLatLng(-33.33, 151.08); 148 | marker.rotation = 45; 149 | console.log("Removing Point from polyline...", polyline, point); 150 | polyline.removePoint(point); 151 | return wait(delay); 152 | }).then(function () { 153 | vmModule.set("mapAnimationsEnabled", false); 154 | vmModule.set("zoom", 9); 155 | console.log("Zooming in (no animation)...", vmModule); 156 | return wait(delay); 157 | }).then(function () { 158 | polyline.addPoint(mapsModule.Position.positionFromLatLng(-33.33, 151.08)); 159 | console.log("Adding point to Polyline...", polyline); 160 | vmModule.set("padding", [30, 60, 40, 40]); 161 | return wait(delay); 162 | }).then(function () { 163 | polygon.addPoint(mapsModule.Position.positionFromLatLng(-34.22, 151.20)); 164 | console.log("Adding point to Polygon...", polygon); 165 | return wait(delay); 166 | }).then(function () { 167 | var marker = mapView.findMarker(function (marker) { 168 | return marker.userData.index === 2; 169 | }); 170 | marker.visible = true; 171 | return wait(delay); 172 | }).then(function () { 173 | var marker = mapView.findMarker(function (marker) { 174 | return marker.userData.index === 2; 175 | }); 176 | // marker.position = mapsModule.Position.positionFromLatLng(-32.89,151.44); 177 | marker.anchor = [1, 1]; 178 | marker.alpha = 0.8; 179 | return wait(delay); 180 | }).then(function () { 181 | console.log("Changing to dark mode..."); 182 | mapView.setStyle(style); 183 | return wait(delay); 184 | }) 185 | /*.then(function () { 186 | var marker = mapView.findMarker(function (marker) { 187 | console.log("marker.userData") 188 | console.log(marker) 189 | return marker.userData.index === 1; 190 | }); 191 | console.log("Removing marker...", marker.userData); 192 | mapView.removeMarker(marker); 193 | return wait(delay); 194 | })*/ 195 | .then(function () { 196 | console.log("Removing all circles..."); 197 | mapView.removeAllCircles(); 198 | console.log("Removing all polylines..."); 199 | mapView.removeAllPolylines(); 200 | console.log("Removing all polygons..."); 201 | mapView.removeAllPolygons(); 202 | return wait(delay); 203 | }).then(function () { 204 | console.log("Hiding compass..."); 205 | mapView.settings.compassEnabled = false; 206 | printUISettings(mapView.settings); 207 | return wait(delay); 208 | }).then(function () { 209 | console.log("Changing bounds..."); 210 | var bounds = mapsModule.Bounds.fromCoordinates( 211 | mapsModule.Position.positionFromLatLng(-33.88, 151.16), 212 | mapsModule.Position.positionFromLatLng(-33.78, 151.24) 213 | ); 214 | mapView.setViewport(bounds); 215 | return wait(delay); 216 | }).then(function () { 217 | var marker = new mapsModule.Marker(); 218 | marker.position = mapsModule.Position.positionFromLatLng(mapView.latitude, mapView.longitude); 219 | marker.title = "All Done"; 220 | marker.snippet = "Enjoy!"; 221 | marker.color = 240; 222 | mapView.addMarker(marker); 223 | marker.showInfoWindow(); 224 | }).catch(function (error) { 225 | console.log(error); 226 | }); 227 | } 228 | 229 | export function onCoordinateTapped(args) { 230 | console.log("Coordinate Tapped, Lat: " + args.position.latitude + ", Lon: " + args.position.longitude, args); 231 | } 232 | 233 | export function onMarkerEvent(args) { 234 | console.log("Marker Event: '" + args.eventName 235 | + "' triggered on: " + args.marker.title 236 | + ", Lat: " + args.marker.position.latitude + ", Lon: " + args.marker.position.longitude, args); 237 | } 238 | 239 | var lastCamera = null; 240 | export function onCameraChanged(args) { 241 | console.log("Camera changed: "+JSON.stringify(args.camera), JSON.stringify(args.camera) === lastCamera); 242 | lastCamera = JSON.stringify(args.camera); 243 | var bounds = mapView.projection.visibleRegion.bounds; 244 | console.log("Current bounds: " + JSON.stringify({ 245 | southwest: [bounds.southwest.latitude, bounds.southwest.longitude], 246 | northeast: [bounds.northeast.latitude, bounds.northeast.longitude] 247 | })); 248 | } 249 | 250 | export function onCameraMove(args) { 251 | console.log("Camera moving: "+JSON.stringify(args.camera)); 252 | } 253 | 254 | export function onIndoorBuildingFocused(args) { 255 | console.log("Building focus changed: " + JSON.stringify(args.indoorBuilding)); 256 | } 257 | 258 | export function onIndoorLevelActivated(args) { 259 | console.log("Indoor level changed: " + JSON.stringify(args.activateLevel)); 260 | } -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 26 | 27 | 28 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /demo/app/main-view-model.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from "@nativescript/core"; 2 | 3 | 4 | export class HelloWorldModel extends Observable { 5 | constructor() { 6 | super(); 7 | this.set("latitude", -33.86); 8 | this.set("longitude", 151.20); 9 | this.set("zoom", 8); 10 | this.set("minZoom", 0); 11 | this.set("maxZoom", 22); 12 | this.set("bearing", 180); 13 | this.set("tilt", 35); 14 | this.set("padding", [80, 40, 40, 40]); 15 | this.set("mapAnimationsEnabled", true); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo/app/map-style.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "elementType": "geometry", 4 | "stylers": [ 5 | { 6 | "color": "#212121" 7 | } 8 | ] 9 | }, 10 | { 11 | "elementType": "labels.icon", 12 | "stylers": [ 13 | { 14 | "visibility": "off" 15 | } 16 | ] 17 | }, 18 | { 19 | "elementType": "labels.text.fill", 20 | "stylers": [ 21 | { 22 | "color": "#757575" 23 | } 24 | ] 25 | }, 26 | { 27 | "elementType": "labels.text.stroke", 28 | "stylers": [ 29 | { 30 | "color": "#212121" 31 | } 32 | ] 33 | }, 34 | { 35 | "featureType": "administrative", 36 | "elementType": "geometry", 37 | "stylers": [ 38 | { 39 | "color": "#757575" 40 | } 41 | ] 42 | }, 43 | { 44 | "featureType": "administrative.country", 45 | "elementType": "labels.text.fill", 46 | "stylers": [ 47 | { 48 | "color": "#9e9e9e" 49 | } 50 | ] 51 | }, 52 | { 53 | "featureType": "administrative.land_parcel", 54 | "stylers": [ 55 | { 56 | "visibility": "off" 57 | } 58 | ] 59 | }, 60 | { 61 | "featureType": "administrative.locality", 62 | "elementType": "labels.text.fill", 63 | "stylers": [ 64 | { 65 | "color": "#bdbdbd" 66 | } 67 | ] 68 | }, 69 | { 70 | "featureType": "poi", 71 | "elementType": "labels.text.fill", 72 | "stylers": [ 73 | { 74 | "color": "#757575" 75 | } 76 | ] 77 | }, 78 | { 79 | "featureType": "poi.park", 80 | "elementType": "geometry", 81 | "stylers": [ 82 | { 83 | "color": "#181818" 84 | } 85 | ] 86 | }, 87 | { 88 | "featureType": "poi.park", 89 | "elementType": "labels.text.fill", 90 | "stylers": [ 91 | { 92 | "color": "#616161" 93 | } 94 | ] 95 | }, 96 | { 97 | "featureType": "poi.park", 98 | "elementType": "labels.text.stroke", 99 | "stylers": [ 100 | { 101 | "color": "#1b1b1b" 102 | } 103 | ] 104 | }, 105 | { 106 | "featureType": "road", 107 | "elementType": "geometry.fill", 108 | "stylers": [ 109 | { 110 | "color": "#2c2c2c" 111 | } 112 | ] 113 | }, 114 | { 115 | "featureType": "road", 116 | "elementType": "labels.text.fill", 117 | "stylers": [ 118 | { 119 | "color": "#8a8a8a" 120 | } 121 | ] 122 | }, 123 | { 124 | "featureType": "road.arterial", 125 | "elementType": "geometry", 126 | "stylers": [ 127 | { 128 | "color": "#373737" 129 | } 130 | ] 131 | }, 132 | { 133 | "featureType": "road.highway", 134 | "elementType": "geometry", 135 | "stylers": [ 136 | { 137 | "color": "#3c3c3c" 138 | } 139 | ] 140 | }, 141 | { 142 | "featureType": "road.highway.controlled_access", 143 | "elementType": "geometry", 144 | "stylers": [ 145 | { 146 | "color": "#4e4e4e" 147 | } 148 | ] 149 | }, 150 | { 151 | "featureType": "road.local", 152 | "elementType": "labels.text.fill", 153 | "stylers": [ 154 | { 155 | "color": "#616161" 156 | } 157 | ] 158 | }, 159 | { 160 | "featureType": "transit", 161 | "elementType": "labels.text.fill", 162 | "stylers": [ 163 | { 164 | "color": "#757575" 165 | } 166 | ] 167 | }, 168 | { 169 | "featureType": "water", 170 | "elementType": "geometry", 171 | "stylers": [ 172 | { 173 | "color": "#000000" 174 | } 175 | ] 176 | }, 177 | { 178 | "featureType": "water", 179 | "elementType": "labels.text.fill", 180 | "stylers": [ 181 | { 182 | "color": "#3d3d3d" 183 | } 184 | ] 185 | } 186 | ] -------------------------------------------------------------------------------- /demo/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tns-template-hello-world", 3 | "main": "app.js", 4 | "version": "1.5.1", 5 | "author": "Telerik ", 6 | "description": "Nativescript hello-world project template", 7 | "license": "Apache-2.0", 8 | "keywords": [ 9 | "telerik", 10 | "mobile", 11 | "nativescript", 12 | "{N}", 13 | "tns", 14 | "appbuilder", 15 | "template" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/NativeScript/template-hello-world.git" 20 | }, 21 | "bugs": { 22 | "url": "https://github.com/NativeScript/template-hello-world/issues" 23 | }, 24 | "homepage": "https://github.com/NativeScript/template-hello-world", 25 | "android": { 26 | "v8Flags": "--expose_gc", 27 | "markingMode": "none" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/app/references.d.ts: -------------------------------------------------------------------------------- 1 | /// Enable smart suggestions and completions in Visual Studio Code JavaScript projects. 2 | -------------------------------------------------------------------------------- /demo/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core' 2 | 3 | export default { 4 | id: 'org.nativescript.demo', 5 | appResourcesPath: 'app/App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none', 9 | }, 10 | appPath: 'app', 11 | } as NativeScriptConfig 12 | -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "nativescript-google-maps-sdk": "file:../src", 4 | "nativescript-permissions": "^1.2.3", 5 | "@nativescript/core": "~7.0.12" 6 | }, 7 | "devDependencies": { 8 | "@nativescript/android": "7.0.1", 9 | "@nativescript/ios": "7.0.4", 10 | "@nativescript/types": "^7.0.4", 11 | "@nativescript/webpack": "~3.0.0", 12 | "babel-traverse": "^6.26.0", 13 | "babel-types": "^6.26.0", 14 | "babylon": "6.7.0", 15 | "eslint": "^7.5.0", 16 | "filewalker": "0.1.2", 17 | "lazy": "1.0.11", 18 | "ts-node": "^9.0.0", 19 | "typescript": "~3.9.0" 20 | }, 21 | "main": "app.js" 22 | } 23 | -------------------------------------------------------------------------------- /demo/references.d.ts: -------------------------------------------------------------------------------- 1 | /// -------------------------------------------------------------------------------- /demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": false, 4 | "skipLibCheck": true, 5 | "module": "esnext", 6 | "target": "es2017", 7 | "experimentalDecorators": true, 8 | "emitDecoratorMetadata": true, 9 | "noEmitHelpers": true, 10 | "noEmitOnError": false, 11 | "lib": [ 12 | "es2017", 13 | "dom", 14 | "es6" 15 | ], 16 | "baseUrl": ".", 17 | "paths": { 18 | "~/*": [ 19 | "app/*" 20 | ], 21 | "*": [ 22 | "./node_modules/tns-core-modules/*", 23 | "./node_modules/*" 24 | ] 25 | }, 26 | "moduleResolution": "node", 27 | "removeComments": false 28 | }, 29 | "exclude": [ 30 | "node_modules", 31 | "platforms" 32 | ] 33 | } -------------------------------------------------------------------------------- /demo/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep } = require("path"); 2 | const fs = require('fs'); 3 | 4 | const webpack = require("webpack"); 5 | const nsWebpack = require("@nativescript/webpack"); 6 | const nativescriptTarget = require("@nativescript/webpack/nativescript-target"); 7 | const { getNoEmitOnErrorFromTSConfig } = require("@nativescript/webpack/utils/tsconfig-utils"); 8 | const { CleanWebpackPlugin } = require("clean-webpack-plugin"); 9 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 10 | const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); 11 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 12 | const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); 13 | const TerserPlugin = require("terser-webpack-plugin"); 14 | const hashSalt = Date.now().toString(); 15 | 16 | module.exports = env => { 17 | // Add your custom Activities, Services and other Android app components here. 18 | const appComponents = env.appComponents || []; 19 | appComponents.push(...[ 20 | "@nativescript/core/ui/frame", 21 | "@nativescript/core/ui/frame/activity", 22 | ]); 23 | 24 | const platform = env && (env.android && "android" || env.ios && "ios" || env.platform); 25 | if (!platform) { 26 | throw new Error("You need to provide a target platform!"); 27 | } 28 | 29 | const platforms = ["ios", "android"]; 30 | const projectRoot = __dirname; 31 | 32 | if (env.platform) { 33 | platforms.push(env.platform); 34 | } 35 | 36 | // Default destination inside platforms//... 37 | const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); 38 | 39 | const { 40 | // The 'appPath' and 'appResourcesPath' values are fetched from 41 | // the nsconfig.json configuration file. 42 | appPath = "src", 43 | appResourcesPath = "App_Resources", 44 | 45 | // You can provide the following flags when running 'tns run android|ios' 46 | snapshot, // --env.snapshot 47 | production, // --env.production 48 | uglify, // --env.uglify 49 | report, // --env.report 50 | sourceMap, // --env.sourceMap 51 | hiddenSourceMap, // --env.hiddenSourceMap 52 | hmr, // --env.hmr, 53 | unitTesting, // --env.unitTesting, 54 | testing, // --env.testing 55 | verbose, // --env.verbose 56 | snapshotInDocker, // --env.snapshotInDocker 57 | skipSnapshotTools, // --env.skipSnapshotTools 58 | compileSnapshot // --env.compileSnapshot 59 | } = env; 60 | 61 | const useLibs = compileSnapshot; 62 | const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; 63 | const externals = nsWebpack.getConvertedExternals(env.externals); 64 | 65 | let appFullPath = resolve(projectRoot, appPath); 66 | if (!fs.existsSync(appFullPath)) { 67 | // some apps use 'app' directory 68 | appFullPath = resolve(projectRoot, 'app'); 69 | } 70 | const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ projectDir: projectRoot }); 71 | let coreModulesPackageName = "tns-core-modules"; 72 | const alias = env.alias || {}; 73 | alias['~/package.json'] = resolve(projectRoot, 'package.json'); 74 | alias['~'] = appFullPath; 75 | 76 | if (hasRootLevelScopedModules) { 77 | coreModulesPackageName = "@nativescript/core"; 78 | alias["tns-core-modules"] = coreModulesPackageName; 79 | } 80 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 81 | 82 | const copyIgnore = { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }; 83 | 84 | const entryModule = nsWebpack.getEntryModule(appFullPath, platform); 85 | const entryPath = `.${sep}${entryModule}.ts`; 86 | const entries = env.entries || {}; 87 | entries.bundle = entryPath; 88 | 89 | const tsConfigPath = resolve(projectRoot, "tsconfig.json"); 90 | 91 | const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("@nativescript") > -1); 92 | if (platform === "ios" && !areCoreModulesExternal && !testing) { 93 | entries["tns_modules/@nativescript/core/inspector_modules"] = "inspector_modules"; 94 | }; 95 | 96 | let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist); 97 | 98 | const itemsToClean = [`${dist}/**/*`]; 99 | if (platform === "android") { 100 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); 101 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); 102 | } 103 | 104 | const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(tsConfigPath); 105 | 106 | nsWebpack.processAppComponents(appComponents, platform); 107 | const config = { 108 | mode: production ? "production" : "development", 109 | context: appFullPath, 110 | externals, 111 | watchOptions: { 112 | ignored: [ 113 | appResourcesFullPath, 114 | // Don't watch hidden files 115 | "**/.*", 116 | ] 117 | }, 118 | target: nativescriptTarget, 119 | entry: entries, 120 | output: { 121 | pathinfo: false, 122 | path: dist, 123 | sourceMapFilename, 124 | libraryTarget: "commonjs2", 125 | filename: "[name].js", 126 | globalObject: "global", 127 | hashSalt 128 | }, 129 | resolve: { 130 | extensions: [".ts", ".js", ".scss", ".css"], 131 | // Resolve {N} system modules from @nativescript/core 132 | modules: [ 133 | resolve(__dirname, `node_modules/${coreModulesPackageName}`), 134 | resolve(__dirname, "node_modules"), 135 | `node_modules/${coreModulesPackageName}`, 136 | "node_modules", 137 | ], 138 | alias, 139 | // resolve symlinks to symlinked modules 140 | symlinks: true 141 | }, 142 | resolveLoader: { 143 | // don't resolve symlinks to symlinked loaders 144 | symlinks: false 145 | }, 146 | node: { 147 | // Disable node shims that conflict with NativeScript 148 | "http": false, 149 | "timers": false, 150 | "setImmediate": false, 151 | "fs": "empty", 152 | "__dirname": false, 153 | }, 154 | devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"), 155 | optimization: { 156 | runtimeChunk: "single", 157 | noEmitOnErrors: noEmitOnErrorFromTSConfig, 158 | splitChunks: { 159 | cacheGroups: { 160 | vendor: { 161 | name: "vendor", 162 | chunks: "all", 163 | test: (module, chunks) => { 164 | const moduleName = module.nameForCondition ? module.nameForCondition() : ''; 165 | return /[\\/]node_modules[\\/]/.test(moduleName) || 166 | appComponents.some(comp => comp === moduleName); 167 | 168 | }, 169 | enforce: true, 170 | }, 171 | } 172 | }, 173 | minimize: !!uglify, 174 | minimizer: [ 175 | new TerserPlugin({ 176 | parallel: true, 177 | cache: true, 178 | sourceMap: isAnySourceMapEnabled, 179 | terserOptions: { 180 | output: { 181 | comments: false, 182 | semicolons: !isAnySourceMapEnabled 183 | }, 184 | compress: { 185 | // The Android SBG has problems parsing the output 186 | // when these options are enabled 187 | 'collapse_vars': platform !== "android", 188 | sequences: platform !== "android", 189 | } 190 | } 191 | }) 192 | ], 193 | }, 194 | module: { 195 | rules: [ 196 | { 197 | include: join(appFullPath, entryPath), 198 | use: [ 199 | // Require all Android app components 200 | platform === "android" && { 201 | loader: "@nativescript/webpack/helpers/android-app-components-loader", 202 | options: { modules: appComponents } 203 | }, 204 | 205 | { 206 | loader: "@nativescript/webpack/bundle-config-loader", 207 | options: { 208 | loadCss: !snapshot, // load the application css if in debug mode 209 | unitTesting, 210 | appFullPath, 211 | projectRoot, 212 | ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) 213 | } 214 | }, 215 | ].filter(loader => !!loader) 216 | }, 217 | 218 | { 219 | test: /\.(ts|css|scss|html|xml)$/, 220 | use: "@nativescript/webpack/hmr/hot-loader" 221 | }, 222 | 223 | { test: /\.(html|xml)$/, use: "@nativescript/webpack/helpers/xml-namespace-loader" }, 224 | 225 | { 226 | test: /\.css$/, 227 | use: "@nativescript/webpack/helpers/css2json-loader" 228 | }, 229 | 230 | { 231 | test: /\.scss$/, 232 | use: [ 233 | "@nativescript/webpack/helpers/css2json-loader", 234 | "sass-loader" 235 | ] 236 | }, 237 | 238 | { 239 | test: /\.ts$/, 240 | use: { 241 | loader: "ts-loader", 242 | options: { 243 | configFile: tsConfigPath, 244 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds 245 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement 246 | transpileOnly: true, 247 | allowTsInNodeModules: true, 248 | compilerOptions: { 249 | sourceMap: isAnySourceMapEnabled, 250 | declaration: false 251 | }, 252 | getCustomTransformers: (program) => ({ 253 | before: [ 254 | require("@nativescript/webpack/transformers/ns-transform-native-classes").default 255 | ] 256 | }) 257 | }, 258 | } 259 | }, 260 | ] 261 | }, 262 | plugins: [ 263 | // Define useful constants like TNS_WEBPACK 264 | new webpack.DefinePlugin({ 265 | "global.TNS_WEBPACK": "true", 266 | "global.isAndroid": platform === 'android', 267 | "global.isIOS": platform === 'ios', 268 | "process": "global.process", 269 | }), 270 | // Remove all files from the out dir. 271 | new CleanWebpackPlugin({ 272 | cleanOnceBeforeBuildPatterns: itemsToClean, 273 | verbose: !!verbose 274 | }), 275 | // Copy assets 276 | new CopyWebpackPlugin({ 277 | patterns: [ 278 | { from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 279 | { from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 280 | { from: '**/*.jpg', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 281 | { from: '**/*.png', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 282 | ], 283 | }), 284 | new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), 285 | // For instructions on how to set up workers with webpack 286 | // check out https://github.com/nativescript/worker-loader 287 | new NativeScriptWorkerPlugin(), 288 | new nsWebpack.PlatformFSPlugin({ 289 | platform, 290 | platforms, 291 | }), 292 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 293 | new nsWebpack.WatchStateLoggerPlugin(), 294 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds 295 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement 296 | new ForkTsCheckerWebpackPlugin({ 297 | async: false, 298 | typescript: { 299 | configFile: tsConfigPath, 300 | memoryLimit: 4096, 301 | diagnosticOptions: { 302 | syntactic: true, 303 | semantic: true 304 | } 305 | } 306 | }) 307 | ], 308 | }; 309 | 310 | if (report) { 311 | // Generate report files for bundles content 312 | config.plugins.push(new BundleAnalyzerPlugin({ 313 | analyzerMode: "static", 314 | openAnalyzer: false, 315 | generateStatsFile: true, 316 | reportFilename: resolve(projectRoot, "report", `report.html`), 317 | statsFilename: resolve(projectRoot, "report", `stats.json`), 318 | })); 319 | } 320 | 321 | if (snapshot) { 322 | config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ 323 | chunk: "vendor", 324 | requireModules: [ 325 | "@nativescript/core/bundle-entry-points", 326 | ], 327 | projectRoot, 328 | webpackConfig: config, 329 | snapshotInDocker, 330 | skipSnapshotTools, 331 | useLibs 332 | })); 333 | } 334 | 335 | if (hmr) { 336 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 337 | } 338 | 339 | return config; 340 | }; 341 | -------------------------------------------------------------------------------- /ng-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.ngdemo" 12 | } 13 | aaptOptions { 14 | additionalParameters "--no-version-vectors" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /ng-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 | -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/Android/src/main/res/values/nativescript_google_maps_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs 4 | -------------------------------------------------------------------------------- /ng-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 | -------------------------------------------------------------------------------- /ng-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 | } -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ng-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 | } -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /ng-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 | } -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /ng-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 | } -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /ng-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 | -------------------------------------------------------------------------------- /ng-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 | -------------------------------------------------------------------------------- /ng-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 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /ng-demo/app/README.md: -------------------------------------------------------------------------------- 1 | # NativeScript Angular Template 2 | 3 | This template creates a "Hello, world" NativeScript app using TypeScript and Angular. 4 | 5 | You can create a new app that uses this template with either the `--template` option. 6 | 7 | ``` 8 | tns create my-app-name --template tns-template-hello-world-ng 9 | ``` 10 | 11 | Or the `--ng` shorthand. 12 | 13 | ``` 14 | tns create my-app-name --ng 15 | ``` 16 | 17 | > Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ng). 18 | 19 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following: 20 | 21 | ``` 22 | tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng.git#master 23 | ``` 24 | 25 | **NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet! 26 | -------------------------------------------------------------------------------- /ng-demo/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | @Component({ 3 | selector: "app", 4 | template: "" 5 | }) 6 | export class AppComponent { 7 | 8 | } -------------------------------------------------------------------------------- /ng-demo/app/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. For a full list of class names in the theme 10 | refer to http://docs.nativescript.org/ui/theme. 11 | */ 12 | @import 'nativescript-theme-core/css/core.light.css'; 13 | -------------------------------------------------------------------------------- /ng-demo/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module"; 3 | import { AppRoutingModule } from "./app.routing"; 4 | import { AppComponent } from "./app.component"; 5 | import { MapComponent } from "./map/map.component"; 6 | 7 | import * as platform from "platform"; 8 | declare var GMSServices: any; 9 | 10 | if(platform.isIOS) { 11 | GMSServices.provideAPIKey("AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs"); 12 | } 13 | 14 | 15 | @NgModule({ 16 | bootstrap: [ 17 | AppComponent 18 | ], 19 | imports: [ 20 | NativeScriptModule, 21 | AppRoutingModule 22 | ], 23 | declarations: [ 24 | AppComponent, 25 | MapComponent 26 | ], 27 | schemas: [ 28 | NO_ERRORS_SCHEMA 29 | ] 30 | }) 31 | export class AppModule { } 32 | -------------------------------------------------------------------------------- /ng-demo/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { NativeScriptRouterModule } from "nativescript-angular/router"; 3 | import { Routes } from "@angular/router"; 4 | import { MapComponent } from "./map/map.component"; 5 | 6 | const routes: Routes = [ 7 | { path: "", redirectTo: "map", pathMatch: 'full' }, 8 | { path: "map", component: MapComponent, pathMatch: 'full' }, 9 | ]; 10 | 11 | @NgModule({ 12 | imports: [ NativeScriptRouterModule.forRoot(routes) ], 13 | exports: [ NativeScriptRouterModule ] 14 | }) 15 | export class AppRoutingModule { } -------------------------------------------------------------------------------- /ng-demo/app/main.aot.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScript } from "nativescript-angular/platform-static"; 3 | 4 | import { AppModuleNgFactory } from "./app.module.ngfactory"; 5 | 6 | platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory); 7 | -------------------------------------------------------------------------------- /ng-demo/app/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.module"; 5 | 6 | platformNativeScriptDynamic().bootstrapModule(AppModule); 7 | -------------------------------------------------------------------------------- /ng-demo/app/map/map.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, ViewChild} from '@angular/core'; 2 | import { registerElement } from 'nativescript-angular/element-registry'; 3 | import { MapView, Marker, Position } from 'nativescript-google-maps-sdk'; 4 | 5 | 6 | // Important - must register MapView plugin in order to use in Angular templates 7 | registerElement('MapView', () => MapView); 8 | 9 | @Component({ 10 | moduleId: module.id, 11 | selector: 'map', 12 | templateUrl: 'map.html', 13 | styleUrls: ['map.css'], 14 | }) 15 | export class MapComponent { 16 | 17 | latitude = -33.86; 18 | longitude = 151.20; 19 | zoom = 8; 20 | minZoom = 0; 21 | maxZoom = 22; 22 | bearing = 0; 23 | tilt = 0; 24 | padding = [40, 40, 40, 40]; 25 | mapView: MapView; 26 | 27 | lastCamera: String; 28 | 29 | constructor() { 30 | } 31 | 32 | //Map events 33 | onMapReady(event) { 34 | console.log('Map Ready'); 35 | 36 | this.mapView = event.object; 37 | 38 | console.log("Setting a marker..."); 39 | 40 | var marker = new Marker(); 41 | marker.position = Position.positionFromLatLng(-33.86, 151.20); 42 | marker.title = "Sydney"; 43 | marker.snippet = "Australia"; 44 | marker.userData = {index: 1}; 45 | this.mapView.addMarker(marker); 46 | } 47 | 48 | onCoordinateTapped(args) { 49 | console.log("Coordinate Tapped, Lat: " + args.position.latitude + ", Lon: " + args.position.longitude, args); 50 | } 51 | 52 | onMarkerEvent(args) { 53 | console.log("Marker Event: '" + args.eventName 54 | + "' triggered on: " + args.marker.title 55 | + ", Lat: " + args.marker.position.latitude + ", Lon: " + args.marker.position.longitude, args); 56 | } 57 | 58 | onCameraChanged(args) { 59 | console.log("Camera changed: " + JSON.stringify(args.camera), JSON.stringify(args.camera) === this.lastCamera); 60 | this.lastCamera = JSON.stringify(args.camera); 61 | } 62 | 63 | onCameraMove(args) { 64 | console.log("Camera moving: " + JSON.stringify(args.camera)); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /ng-demo/app/map/map.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/ng-demo/app/map/map.css -------------------------------------------------------------------------------- /ng-demo/app/map/map.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | -------------------------------------------------------------------------------- /ng-demo/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": { 3 | "v8Flags": "--expose_gc" 4 | }, 5 | "main": "main.js", 6 | "name": "tns-template-hello-world-ng", 7 | "version": "3.0.0" 8 | } -------------------------------------------------------------------------------- /ng-demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "NativeScript Application", 3 | "license": "SEE LICENSE IN ", 4 | "readme": "NativeScript Application", 5 | "repository": "", 6 | "nativescript": { 7 | "id": "org.nativescript.ngdemo", 8 | "tns-ios": { 9 | "version": "3.0.1" 10 | }, 11 | "tns-android": { 12 | "version": "4.0.0" 13 | } 14 | }, 15 | "dependencies": { 16 | "@angular/animations": "~4.1.0", 17 | "@angular/common": "~4.1.0", 18 | "@angular/compiler": "~4.1.0", 19 | "@angular/core": "~4.1.0", 20 | "@angular/forms": "~4.1.0", 21 | "@angular/http": "~4.1.0", 22 | "@angular/platform-browser": "~4.1.0", 23 | "@angular/router": "~4.1.0", 24 | "nativescript-angular": "~3.0.0", 25 | "nativescript-google-maps-sdk": "../src", 26 | "nativescript-theme-core": "~1.0.2", 27 | "reflect-metadata": "~0.1.8", 28 | "rxjs": "~5.3.0", 29 | "tns-core-modules": "^4.0.0", 30 | "zone.js": "~0.8.2" 31 | }, 32 | "devDependencies": { 33 | "babel-traverse": "6.24.1", 34 | "babel-types": "6.24.1", 35 | "babylon": "6.17.1", 36 | "lazy": "1.0.11", 37 | "nativescript-dev-typescript": "~0.4.0", 38 | "typescript": "~2.2.1" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ng-demo/references.d.ts: -------------------------------------------------------------------------------- 1 | /// Needed for autocompletion and compilation. -------------------------------------------------------------------------------- /ng-demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "noEmitHelpers": true, 8 | "noEmitOnError": true, 9 | "lib": [ 10 | "es6", 11 | "dom", 12 | "es2015.iterable" 13 | ], 14 | "baseUrl": ".", 15 | "paths": { 16 | "*": [ 17 | "./node_modules/tns-core-modules/*", 18 | "./node_modules/*" 19 | ] 20 | } 21 | }, 22 | "exclude": [ 23 | "node_modules", 24 | "app/node_modules", 25 | "platforms", 26 | "**/*.aot.ts" 27 | ] 28 | } -------------------------------------------------------------------------------- /publish/pack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCE_DIR=../src; 4 | TO_SOURCE_DIR=src; 5 | PACK_DIR=package; 6 | ROOT_DIR=..; 7 | PUBLISH=--publish 8 | 9 | install(){ 10 | npm i 11 | } 12 | 13 | pack() { 14 | 15 | echo 'Clearing /src and /package...' 16 | node_modules/.bin/rimraf "$TO_SOURCE_DIR" 17 | node_modules/.bin/rimraf "$PACK_DIR" 18 | 19 | # copy src 20 | echo 'Copying src...' 21 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR" 22 | 23 | # copy README & LICENSE to src 24 | echo 'Copying README and LICENSE to /src...' 25 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE 26 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md 27 | 28 | # compile package and copy files required by npm 29 | echo 'Building /src...' 30 | node_modules/.bin/tsc -p "$TO_SOURCE_DIR/tsconfig.json" 31 | 32 | echo 'Creating package...' 33 | # create package dir 34 | mkdir "$PACK_DIR" 35 | 36 | # create the package 37 | cd "$PACK_DIR" 38 | npm pack ../"$TO_SOURCE_DIR" 39 | 40 | # delete source directory used to create the package 41 | cd .. 42 | node_modules/.bin/rimraf "$TO_SOURCE_DIR" 43 | } 44 | 45 | install && pack -------------------------------------------------------------------------------- /publish/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-publish", 3 | "version": "1.0.0", 4 | "description": "Publish helper", 5 | "devDependencies": { 6 | "ncp": "^2.0.0", 7 | "rimraf": "^2.5.0", 8 | "typescript": "^2.7.2" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /publish/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PACK_DIR=package; 4 | 5 | publish() { 6 | cd $PACK_DIR 7 | echo 'Publishing to npm...' 8 | npm publish *.tgz 9 | } 10 | 11 | ./pack.sh && publish -------------------------------------------------------------------------------- /src/.github-release.json: -------------------------------------------------------------------------------- 1 | { 2 | "gitRawCommitsOpts": { 3 | "merges": null, 4 | "noMerges": null 5 | } 6 | } -------------------------------------------------------------------------------- /src/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | demo 3 | ng-demo 4 | tsconfig.json 5 | *.ts 6 | !*.d.ts 7 | scripts -------------------------------------------------------------------------------- /src/map-view.d.ts: -------------------------------------------------------------------------------- 1 | import { Point } from "@nativescript/core/ui/core/view"; 2 | import { Property, View, Image, Color, EventData } from "@nativescript/core"; 3 | 4 | export class IndoorLevel { 5 | public name: string; 6 | public shortName: string; 7 | } 8 | 9 | export class IndoorBuilding { 10 | public defaultLevelIndex: number; 11 | public levels: IndoorLevel[]; 12 | public isUnderground: boolean; 13 | } 14 | 15 | export class Camera { 16 | public latitude: number; 17 | public longitude: number; 18 | public zoom: number; 19 | public bearing: number; 20 | public tilt: number; 21 | } 22 | 23 | export class MapView extends View { 24 | 25 | public latitude: number; 26 | public longitude: number; 27 | public zoom: number; 28 | public minZoom: number; 29 | public maxZoom: number; 30 | public bearing: number; 31 | public tilt: number; 32 | public padding: number[]; 33 | public mapAnimationsEnabled: boolean; 34 | 35 | public notifyMapReady(): void; 36 | 37 | public updateCamera(): void; 38 | 39 | public setViewport(bounds: Bounds, padding?: number): void; 40 | 41 | public updatePadding(): void; 42 | 43 | public static mapReadyEvent: string; 44 | public static myLocationTappedEvent: string; 45 | public static coordinateTappedEvent: string; 46 | public static coordinateLongPressEvent: string; 47 | public static markerSelectEvent: string; 48 | public static markerBeginDraggingEvent: string; 49 | public static markerEndDraggingEvent: string; 50 | public static markerDragEvent: string; 51 | public static markerInfoWindowTappedEvent: string; 52 | public static markerInfoWindowClosedEvent: string; 53 | public static shapeSelectEvent: string; 54 | public static cameraChangedEvent: string; 55 | public static cameraMoveEvent: string; 56 | public static indoorBuildingFocusedEvent: string; 57 | public static indoorLevelActivatedEvent: string; 58 | 59 | public nativeView: any; /* GMSMapView | com.google.android.gms.maps.MapView */ 60 | 61 | public gMap: any; 62 | 63 | public settings: UISettings; 64 | 65 | public projection: Projection; 66 | 67 | public myLocationEnabled: boolean; 68 | 69 | public setMinZoomMaxZoom(): void; 70 | 71 | public addMarker(...markers: Marker[]): void; 72 | 73 | public removeMarker(...markers: Marker[]): void; 74 | 75 | public removeAllMarkers(): void; 76 | 77 | public findMarker(callback: (marker: Marker) => boolean): Marker; 78 | 79 | public notifyMarkerEvent(eventName: string, marker: Marker); 80 | 81 | public addPolyline(shape: Polyline): void; 82 | 83 | public addPolygon(shape: Polygon): void; 84 | 85 | public addCircle(shape: Circle): void; 86 | 87 | public removeShape(shape: Shape): void; 88 | 89 | public removeAllShapes(): void; 90 | 91 | public findShape(callback: (shape: Shape) => boolean): Shape; 92 | 93 | public clear(): void; 94 | 95 | public setStyle(style: Style): boolean; 96 | } 97 | 98 | export const latitudeProperty: Property; 99 | export const longitudeProperty: Property; 100 | export const bearingProperty: Property; 101 | export const zoomProperty: Property; 102 | export const tiltProperty: Property; 103 | export const paddingProperty: Property; 104 | 105 | export class UISettings { 106 | // Whether the compass is enabled/disabled. 107 | compassEnabled(): boolean; 108 | compassEnabled(value: boolean): boolean; 109 | // Whether the indoor level picker is enabled/disabled. 110 | indoorLevelPickerEnabled: boolean; 111 | // Whether the indoor level picker is enabled/disabled. 112 | mapToolbarEnabled: boolean; 113 | // Whether the my-location button is enabled/disabled. 114 | myLocationButtonEnabled: boolean; 115 | // Whether rotate gestures are enabled/disabled. 116 | rotateGesturesEnabled: boolean; 117 | // Whether scroll gestures are enabled/disabled. 118 | scrollGesturesEnabled: boolean; 119 | // Whether tilt gestures are enabled/disabled. 120 | tiltGesturesEnabled: boolean; 121 | // Whether the zoom controls are enabled/disabled. 122 | zoomControlsEnabled: boolean; 123 | // Whether zoom gestures are enabled/disabled 124 | zoomGesturesEnabled: boolean; 125 | } 126 | 127 | export class Projection { 128 | public visibleRegion: VisibleRegion; 129 | public fromScreenLocation(point: Point): Position; 130 | public toScreenLocation(position: Position): Point; 131 | public ios: any; /* GMSProjection */ 132 | public android: any; 133 | } 134 | 135 | export class VisibleRegion { 136 | public nearLeft: Position; 137 | public nearRight: Position; 138 | public farLeft: Position; 139 | public farRight: Position; 140 | public bounds: Bounds; 141 | } 142 | 143 | export class Position { 144 | public latitude: number; 145 | public longitude: number; 146 | public static positionFromLatLng(latitude: number, longitude: number): Position; 147 | public ios: any; /* CLLocationCoordinate2D */ 148 | public android: any; 149 | } 150 | 151 | export class Bounds { 152 | public northeast: Position; 153 | public southwest: Position; 154 | public ios: any; /* GMSCoordinateBounds */ 155 | public android: any; 156 | public static fromCoordinates(southwest: Position, northeast: Position): Bounds; 157 | } 158 | 159 | export class Marker { 160 | public position: Position; 161 | public rotation: number; 162 | public anchor: Array; 163 | public title: string; 164 | public snippet: string; 165 | public color: Color | string | number; /* Default Icon color - either Color, string color name, string color hex, or number hue (0-360) */ 166 | public icon: Image | string; 167 | public alpha: number; 168 | public flat: boolean; 169 | public draggable: boolean; 170 | public visible: boolean; 171 | public zIndex: number; 172 | public showInfoWindow(): void; 173 | public isInfoWindowShown(): boolean; 174 | public infoWindowTemplate: string; 175 | public hideInfoWindow(): void; 176 | public userData: any; 177 | public _map: any; 178 | public ios: any; 179 | public android: any; 180 | } 181 | 182 | export class Shape { 183 | public shape: string; 184 | public visible: boolean; 185 | public zIndex: number; 186 | public userData: any; 187 | public _map: any; 188 | public ios: any; 189 | public android: any; 190 | public clickable: boolean; 191 | } 192 | 193 | export class Polyline extends Shape { 194 | public width: number; 195 | public color: Color; 196 | public geodesic: boolean; 197 | public addPoint(shape: Position): void; 198 | public addPoints(shapes: Position[]): void; 199 | public removePoint(shape: Position): void; 200 | public removeAllPoints(): void; 201 | public getPoints(): Array; 202 | } 203 | 204 | export class Polygon extends Shape { 205 | public strokeWidth: number; 206 | public strokeColor: Color; 207 | public fillColor: Color; 208 | public addPoint(shape: Position): void; 209 | public addPoints(shapes: Position[]): void; 210 | public removePoint(shape: Position): void; 211 | public removeAllPoints(): void; 212 | public addHole(hole: Position[]): void; 213 | public addHoles(hole: Position[][]): void; 214 | public removeHole(hole: Position[]): void; 215 | public removeAllHoles(): void; 216 | public getPoints(): Array; 217 | public getHoles(): Array>; 218 | } 219 | 220 | export class Circle extends Shape { 221 | public center: Position; 222 | public radius: number; 223 | public strokeWidth: number; 224 | public strokeColor: Color; 225 | public fillColor: Color; 226 | } 227 | 228 | export class Style extends Array { 229 | public center: Position; 230 | public radius: number; 231 | public strokeWidth: number; 232 | public strokeColor: Color; 233 | public fillColor: Color; 234 | } 235 | 236 | export class StyleElement { 237 | public featureType?: StyleFeatureType; 238 | public elementType?: StyleElementType; 239 | public stylers: Array; 240 | } 241 | 242 | export type StyleElementType = "all" | "administrative" | "administrative.country" | "administrative.land_parcel" | 243 | "administrative.locality" | "administrative.neighborhoodadministrative.province" | "landscape" | 244 | "landscape.man_made" | "landscape.natural" | "landscape.natural.landcover" | "landscape.natural.terrain" | 245 | "poi" | "poi.attraction" | "poi.business" | "poi.government" | "poi.medical" | "poi.park" | 246 | "poi.place_of_worship" | "poi.school" | "poi.sports_complex" | "road" | "road.arterial" | "road.highway" | 247 | "road.highway.controlled_access" | "road.local" | "transit" | "transit.line" | "transit.station" | 248 | "transit.station.airport" | "transit.station.bus" | "transit.station.rail" | "water"; 249 | 250 | export type StyleFeatureType = "all" | "geometry" | "geometry.fill" | "geometry.stroke" | "labels" | "labels.icon" | 251 | "labels.text" | "labels.text.fill" | "labels.text.stroke"; 252 | 253 | export type StyleVisibility = "on" | "off" | "simplified"; 254 | 255 | export class StyleStylers { 256 | public hue?: string; 257 | public lightness?: number; 258 | public saturation?: number; 259 | public gamma?: number; 260 | public invert_lightness: boolean; 261 | public visibility: StyleVisibility; 262 | public color?: string; 263 | public weight: number; 264 | } 265 | 266 | export interface MarkerEventData extends EventData { 267 | marker: Marker; 268 | } 269 | 270 | export interface ShapeEventData extends EventData { 271 | shape: Shape; 272 | } 273 | 274 | export interface CameraEventData extends EventData { 275 | camera: Camera; 276 | } 277 | 278 | export interface PositionEventData extends EventData { 279 | position: Position; 280 | } 281 | 282 | export interface BuildingFocusedEventData extends EventData { 283 | indoorBuilding: IndoorBuilding; 284 | } 285 | 286 | export interface IndoorLevelActivatedEventData extends EventData { 287 | activateLevel: IndoorLevel; 288 | } 289 | -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-google-maps-sdk", 3 | "version": "3.0.2", 4 | "description": "Google Maps SDK plugin for Nativescript", 5 | "main": "map-view", 6 | "typings": "map-view.d.ts", 7 | "nativescript": { 8 | "platforms": { 9 | "android": "7.0.0", 10 | "ios": "7.0.0" 11 | } 12 | }, 13 | "scripts": { 14 | "cm": "git-cz", 15 | "commitmsg": "validate-commit-msg", 16 | "github-release": "conventional-github-releaser -p angular -n ./.github-release.json", 17 | "clean": "rm -f *.js", 18 | "build": "npm run clean && ts-patch install && tsc", 19 | "test": "echo \"Error: no test specified\" && exit 1", 20 | "compile": "./node_modules/.bin/tsc", 21 | "plugin.link": "npm link && cd ../demo && npm link nativescript-google-maps-sdk && cd ../src", 22 | "prepare": "node ./scripts/prepare.js", 23 | "demo.ios": "npm i && npm run build && cd ../demo && tns run ios --no-hmr", 24 | "demo.debug.ios": "npm i && npm run build && cd ../demo && tns debug ios --no-hmr", 25 | "demo.android": "npm i && npm run build && cd ../demo && tns run android --device --no-hmr", 26 | "demo-vue.ios": "npm i && npm run build && cd ../demo-vue && tns run ios --bundle --syncAllFiles", 27 | "demo-vue.android": "npm i && npm run build && cd ../demo-vue && tns run android --bundle --syncAllFiles", 28 | "generate.typings.ios": "cd ../demo && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios && echo 'Now look for your library typings in demo/typings!'" 29 | }, 30 | "repository": { 31 | "type": "git", 32 | "url": "git+ssh://git@github.com/dapriett/nativescript-google-maps-sdk.git" 33 | }, 34 | "keywords": [ 35 | "Nativescript", 36 | "Google", 37 | "Maps", 38 | "API", 39 | "SDK" 40 | ], 41 | "author": "Dan Prietti (https://github.com/dapriett)", 42 | "license": "MIT", 43 | "bugs": { 44 | "url": "https://github.com/dapriett/nativescript-google-maps-sdk/issues" 45 | }, 46 | "homepage": "https://github.com/dapriett/nativescript-google-maps-sdk#readme", 47 | "devDependencies": { 48 | "@nativescript/core": "^7.0.12", 49 | "@nativescript/types": "^7.0.4", 50 | "@nativescript/webpack": "^3.0.8", 51 | "@typescript-eslint/eslint-plugin": "^3.7.0", 52 | "@typescript-eslint/parser": "^3.7.0", 53 | "commitizen": "^4.2.2", 54 | "conventional-github-releaser": "^3.1.5", 55 | "cz-conventional-changelog": "^2.0.0", 56 | "husky": "^0.14.2", 57 | "semver": "^5.5.0", 58 | "ts-patch": "^1.3.0", 59 | "typescript": "~3.9.0", 60 | "validate-commit-msg": "^2.12.2", 61 | "lint-staged": "^10.3.0", 62 | "prettier": "^2.1.1", 63 | "rimraf": "^3.0.2", 64 | "ts-node": "^9.0.0", 65 | "eslint": "^7.5.0" 66 | }, 67 | "config": { 68 | "commitizen": { 69 | "path": "./node_modules/cz-conventional-changelog" 70 | }, 71 | "validate-commit-msg": { 72 | "helpMessage": "\nPlease fix your commit message to match format. For help, execute 'npm run cm'\n", 73 | "types": [ 74 | "feat", 75 | "fix", 76 | "docs", 77 | "style", 78 | "refactor", 79 | "perf", 80 | "test", 81 | "chore", 82 | "revert", 83 | "custom" 84 | ], 85 | "warnOnFail": false, 86 | "autoFix": false 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/platforms/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/platforms/android/include.gradle: -------------------------------------------------------------------------------- 1 | android { 2 | 3 | } 4 | 5 | dependencies { 6 | def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '+' 7 | compile "com.google.android.gms:play-services-maps:$googlePlayServicesVersion" 8 | } -------------------------------------------------------------------------------- /src/platforms/android/nativescript_google_maps_sdk.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dapriett/nativescript-google-maps-sdk/923d4419ec2d366f7a34b78db7efcec11414a5df/src/platforms/android/nativescript_google_maps_sdk.aar -------------------------------------------------------------------------------- /src/platforms/android/res/values/nativescript_google_maps_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/platforms/ios/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | pod 'GoogleMaps' -------------------------------------------------------------------------------- /src/platforms/ios/typings/objc!GoogleMapsBase.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare class GMSCoordinateBounds extends NSObject { 3 | 4 | static alloc(): GMSCoordinateBounds; // inherited from NSObject 5 | 6 | static new(): GMSCoordinateBounds; // inherited from NSObject 7 | 8 | readonly northEast: CLLocationCoordinate2D; 9 | 10 | readonly southWest: CLLocationCoordinate2D; 11 | 12 | readonly valid: boolean; 13 | 14 | constructor(o: { coordinate: CLLocationCoordinate2D; coordinate2: CLLocationCoordinate2D; }); 15 | 16 | constructor(o: { path: GMSPath; }); 17 | 18 | constructor(o: { region: GMSVisibleRegion; }); 19 | 20 | containsCoordinate(coordinate: CLLocationCoordinate2D): boolean; 21 | 22 | includingBounds(other: GMSCoordinateBounds): GMSCoordinateBounds; 23 | 24 | includingCoordinate(coordinate: CLLocationCoordinate2D): GMSCoordinateBounds; 25 | 26 | includingPath(path: GMSPath): GMSCoordinateBounds; 27 | 28 | initWithCoordinateCoordinate(coord1: CLLocationCoordinate2D, coord2: CLLocationCoordinate2D): this; 29 | 30 | initWithPath(path: GMSPath): this; 31 | 32 | initWithRegion(region: GMSVisibleRegion): this; 33 | 34 | intersectsBounds(other: GMSCoordinateBounds): boolean; 35 | } 36 | -------------------------------------------------------------------------------- /src/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | /// 5 | /// -------------------------------------------------------------------------------- /src/scripts/prepare.js: -------------------------------------------------------------------------------- 1 | const { exec } = require('child_process'); 2 | const semver = require('semver'); 3 | 4 | exec('tns --version', (err, stdout, stderr) => { 5 | if (err) { 6 | // node couldn't execute the command 7 | console.log(`tns --version err: ${err}`); 8 | return; 9 | } 10 | 11 | const tnsVersion = semver.major(stdout); 12 | 13 | // execute 'tns plugin build' for {N} version > 4. This command builds .aar in platforms/android folder. 14 | if (tnsVersion >= 4) { 15 | console.log(`executing 'tns plugin build'`); 16 | exec('tns plugin build'); 17 | } 18 | }); -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "declaration": false, 7 | "noImplicitAny": false, 8 | "removeComments": true, 9 | "preserveConstEnums": true, 10 | "suppressImplicitAnyIndexErrors": true, 11 | "sourceMap": false, 12 | "experimentalDecorators": true, 13 | "noEmitHelpers": true, 14 | "plugins": [{ 15 | "transform": "@nativescript/webpack/transformers/ns-transform-native-classes", 16 | "type": "raw" 17 | }], 18 | "lib": [ 19 | "es6", 20 | "dom" 21 | ], 22 | "baseUrl": ".", 23 | "paths": { 24 | "*": [ 25 | "./node_modules/*" 26 | ] 27 | } 28 | }, 29 | "include": [ 30 | "./" 31 | ], 32 | "exclude": [ 33 | "node_modules", 34 | "platforms", 35 | "demo", 36 | "ng-demo" 37 | ] 38 | } 39 | --------------------------------------------------------------------------------