Skip to content

Commit 5aad571

Browse files
committed
impelment android
1 parent f41a382 commit 5aad571

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+672
-1
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
*.js
3+
!demo/app/*.js
4+
*.map
5+
*.d.ts
6+
!index.d.ts
7+
demo/platforms
8+
demo/node_modules
9+
.DS_Store
10+
*.log
11+
lib

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
demo/
2+
*.ts
3+
!index.d.ts
4+
*.map
5+
*.json
6+
*.log

README.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,64 @@
1-
# nativescript-google-maps-sdk-utils
1+
nativescript-google-maps-sdk-utils
2+
==================================
23

34
NativeScript Google Maps SDK utility library to support features such as marker clustering, heatmap, ...
45

6+
7+
8+
![Andoird #1](./demo/screenshots/android.1.png "Andoird #1")
9+
![Andoird #2](./demo/screenshots/android.2.png "Andoird #2")
10+
![Andoird #3](./demo/screenshots/android.3.png "Andoird #3")
11+
![Andoird #4](./demo/screenshots/android.4.png "Andoird #4")
12+
13+
# State
14+
15+
Android implemented.
16+
17+
iOS not implemented.
18+
19+
520
## Dependencies
621

22+
* nativescript-google-maps-sdk
723
* https://github.com/googlemaps/android-maps-utils
824
* https://github.com/googlemaps/google-maps-ios-utils
925

26+
# Install
27+
28+
```
29+
tns plugin add nativescript-google-maps-sdk-utils
30+
```
31+
32+
# Usage
33+
34+
35+
```
36+
var GoogleMaps = require('nativescript-google-maps-sdk');
37+
var GoogleMapsUtils = require('nativescript-google-maps-sdk-utils');
38+
39+
40+
function onMapReady(args) {
41+
42+
var mapView = args.object;
43+
44+
var positionSet = [ /* GoogleMaps.Position... */ ];
45+
46+
GoogleMapsUtils.setupHeatmap(mapView, positionSet);
47+
48+
49+
var markerSet = [ /* GoogleMaps.Marker... */ ];
50+
51+
GoogleMapsUtils.setupMarkerCluster(mapView, makerSet);
52+
53+
}
54+
...
55+
56+
```
57+
58+
## Usage with TypeScript
59+
60+
import using either of
1061

62+
* `import GoogleMapsUtils = require("nativescript-google-maps-sdk-utils")`
63+
* `import * as GoogleMapsUtils from "nativescript-google-maps-sdk-utils"`
1164

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="__PACKAGE__"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
7+
<supports-screens
8+
android:smallScreens="true"
9+
android:normalScreens="true"
10+
android:largeScreens="true"
11+
android:xlargeScreens="true"/>
12+
13+
<uses-sdk
14+
android:minSdkVersion="17"
15+
android:targetSdkVersion="__APILEVEL__"/>
16+
17+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
18+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
19+
<uses-permission android:name="android.permission.INTERNET"/>
20+
21+
<application
22+
android:name="com.tns.NativeScriptApplication"
23+
android:allowBackup="true"
24+
android:icon="@drawable/icon"
25+
android:label="@string/app_name"
26+
android:theme="@style/AppTheme" >
27+
<activity
28+
android:name="com.tns.NativeScriptActivity"
29+
android:label="@string/title_activity_kimera"
30+
android:configChanges="keyboardHidden|orientation|screenSize">
31+
32+
<intent-filter>
33+
<action android:name="android.intent.action.MAIN" />
34+
35+
<category android:name="android.intent.category.LAUNCHER" />
36+
</intent-filter>
37+
</activity>
38+
<activity android:name="com.tns.ErrorReportActivity"/>
39+
</application>
40+
</manifest>
10.7 KB
Loading
6.03 KB
Loading
7.42 KB
Loading
26 KB
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="nativescript_google_maps_api_key">AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs</string>
4+
</resources>
62.2 KB
Loading

0 commit comments

Comments
 (0)