@nativescript-community/ui-mapbox 6.2.30 → 7.0.0-alpha.14.3191a7b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/common.d.ts +38 -24
- package/common.js +35 -26
- package/expression/expression-parser.android.d.ts +2 -2
- package/expression/expression-parser.android.js +4 -3
- package/index.android.d.ts +59 -59
- package/index.android.js +1389 -1222
- package/index.d.ts +36 -5
- package/index.ios.d.ts +6 -4
- package/index.ios.js +8 -9
- package/layers/layer-factory.android.d.ts +7 -5
- package/layers/layer-factory.android.js +71 -41
- package/layers/layer-factory.d.ts +2 -1
- package/layers/layer-factory.ios.d.ts +1 -1
- package/layers/layer-factory.ios.js +9 -9
- package/layers/parser/property-parser.android.d.ts +3 -1
- package/layers/parser/property-parser.android.js +25 -24
- package/layers/parser/property-parser.ios.js +1 -1
- package/markers/Marker.android.d.ts +35 -0
- package/markers/Marker.android.js +128 -0
- package/markers/MarkerManager.android.d.ts +28 -0
- package/markers/MarkerManager.android.js +154 -0
- package/package.json +6 -5
- package/platforms/android/include.gradle +31 -27
- package/platforms/android/ui_mapbox.aar +0 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/typings/geojson.android.d.ts +689 -0
- package/typings/index.android.d.ts +46 -0
- package/typings/mapbox.android.d.ts +39968 -12560
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Application, Color, Label, StackLayout, Trace, Utils } from '@nativescript/core';
|
|
2
|
+
import { CLog, CLogTypes } from '../common';
|
|
3
|
+
/**
|
|
4
|
+
* Hybrid Marker — uses native Mapbox annotation APIs, but NativeScript view for info window.
|
|
5
|
+
*/
|
|
6
|
+
export class AndroidMarker {
|
|
7
|
+
constructor(opts) {
|
|
8
|
+
this.prepared = false;
|
|
9
|
+
if (!opts.title && !opts.snippet) {
|
|
10
|
+
throw new Error('Marker should have either title or snippet!');
|
|
11
|
+
}
|
|
12
|
+
this.position = opts.position;
|
|
13
|
+
this.icon = opts.icon;
|
|
14
|
+
this.title = opts.title;
|
|
15
|
+
this.snippet = opts.snippet;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create the native PointAnnotation
|
|
19
|
+
*/
|
|
20
|
+
prepareAnnotationMarker(pointAnnotationManager, layerId) {
|
|
21
|
+
const IconAnchor = com.mapbox.maps.extension.style.layers.properties.generated.IconAnchor;
|
|
22
|
+
const PointAnnotationOptions = com.mapbox.maps.plugin.annotation.generated.PointAnnotationOptions;
|
|
23
|
+
this.pointAnnotation = pointAnnotationManager.create(new PointAnnotationOptions().withPoint(this.position).withIconAnchor(IconAnchor.valueOf('BOTTOM')).withIconImage(this.icon));
|
|
24
|
+
this.layerId = layerId;
|
|
25
|
+
if (Trace.isEnabled()) {
|
|
26
|
+
CLog(CLogTypes.log, 'MarkerManager prepareAnnotationMarker: ' + layerId);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
update(pointAnnotationManager) {
|
|
30
|
+
if (!this.pointAnnotation) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// const PointAnnotationOptions = com.mapbox.maps.plugin.annotation.generated.PointAnnotationOptions;
|
|
34
|
+
// const IconAnchor = com.mapbox.maps.extension.style.layers.properties.generated.IconAnchor;
|
|
35
|
+
this.pointAnnotation.setGeometry(this.position);
|
|
36
|
+
// this.pointAnnotation.setIconAnchor(IconAnchor.BOTTOM);
|
|
37
|
+
this.pointAnnotation.setIconImageBitmap(this.icon);
|
|
38
|
+
// 2. Update the annotation via the manager
|
|
39
|
+
pointAnnotationManager.update(this.pointAnnotation);
|
|
40
|
+
if (this.view) {
|
|
41
|
+
this.view.getViewById('title').text = this.title;
|
|
42
|
+
this.view.getViewById('snippet').text = this.snippet;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Build a NativeScript view to use as info window.
|
|
47
|
+
* Then attach it to Mapbox via ViewAnnotationManager.
|
|
48
|
+
*/
|
|
49
|
+
prepareViewAnnotation(mapView, onInfoWindowClick) {
|
|
50
|
+
// --- Step 1: Create a NativeScript view tree
|
|
51
|
+
const view = new StackLayout();
|
|
52
|
+
view.className = 'info-window';
|
|
53
|
+
view.padding = AndroidMarker.MARKER_PADDING_PX;
|
|
54
|
+
view.backgroundColor = '#FFFFFF';
|
|
55
|
+
view.width = 'auto'; // WRAP_CONTENT
|
|
56
|
+
view.height = 'auto'; // WRAP_CONTENT
|
|
57
|
+
view.borderRadius = 12;
|
|
58
|
+
view['shadowColor'] = '#000';
|
|
59
|
+
view['shadowOpacity'] = 0.25;
|
|
60
|
+
view['shadowRadius'] = 8;
|
|
61
|
+
if (this.title) {
|
|
62
|
+
const titleLabel = new Label();
|
|
63
|
+
titleLabel.id = 'title';
|
|
64
|
+
titleLabel.text = this.title;
|
|
65
|
+
titleLabel.className = 'info-window-title';
|
|
66
|
+
titleLabel.fontSize = 16;
|
|
67
|
+
titleLabel.fontWeight = 'bold';
|
|
68
|
+
view.addChild(titleLabel);
|
|
69
|
+
}
|
|
70
|
+
if (this.snippet) {
|
|
71
|
+
const snippetLabel = new Label();
|
|
72
|
+
snippetLabel.id = 'snippet';
|
|
73
|
+
snippetLabel.text = this.snippet;
|
|
74
|
+
snippetLabel.className = 'info-window-snippet';
|
|
75
|
+
snippetLabel.fontSize = 14;
|
|
76
|
+
snippetLabel.color = new Color('#555');
|
|
77
|
+
view.addChild(snippetLabel);
|
|
78
|
+
}
|
|
79
|
+
view._setupAsRootView(Utils.android.getApplicationContext());
|
|
80
|
+
view.parent = Application.getRootView();
|
|
81
|
+
view._isAddedToNativeVisualTree = true;
|
|
82
|
+
view.callLoaded();
|
|
83
|
+
const nativeView = view.nativeViewProtected;
|
|
84
|
+
view.on('tap', onInfoWindowClick);
|
|
85
|
+
const frameLayout = new android.widget.FrameLayout(view._context);
|
|
86
|
+
const layoutParams = new android.widget.FrameLayout.LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
87
|
+
frameLayout.addView(nativeView);
|
|
88
|
+
frameLayout.setLayoutParams(layoutParams);
|
|
89
|
+
frameLayout.measure(android.view.View.MeasureSpec.makeMeasureSpec(0, android.view.View.MeasureSpec.UNSPECIFIED), android.view.View.MeasureSpec.makeMeasureSpec(0, android.view.View.MeasureSpec.UNSPECIFIED));
|
|
90
|
+
frameLayout.layout(0, 0, nativeView.getMeasuredWidth(), nativeView.getMeasuredHeight());
|
|
91
|
+
// frameLayout.setLayoutParams(new android.widget.FrameLayout.LayoutParams(nativeView.getMeasuredWidth(), nativeView.getMeasuredHeight()));
|
|
92
|
+
// --- Step 3: Prepare view annotation options
|
|
93
|
+
const ViewAnnotationAnchor = com.mapbox.maps.ViewAnnotationAnchor;
|
|
94
|
+
const anchor = new com.mapbox.maps.ViewAnnotationAnchorConfig.Builder()
|
|
95
|
+
.anchor(ViewAnnotationAnchor.BOTTOM)
|
|
96
|
+
.offsetY((this.pointAnnotation.getIconImageBitmap()?.getHeight() ?? 0) + AndroidMarker.MARKER_PADDING_PX)
|
|
97
|
+
.build();
|
|
98
|
+
this.anchor = anchor;
|
|
99
|
+
const viewAnnotationOptions = new com.mapbox.maps.ViewAnnotationOptions.Builder()
|
|
100
|
+
.visible(java.lang.Boolean.valueOf(true))
|
|
101
|
+
// .allowOverlap(java.lang.Boolean.valueOf(true))
|
|
102
|
+
// .width(java.lang.Double.valueOf(frameLayout.getMeasuredWidth()))
|
|
103
|
+
// .height(java.lang.Double.valueOf(frameLayout.getMeasuredHeight()))
|
|
104
|
+
.allowOverlapWithPuck(java.lang.Boolean.valueOf(true))
|
|
105
|
+
.ignoreCameraPadding(java.lang.Boolean.valueOf(true))
|
|
106
|
+
// .priority(java.lang.Long.valueOf(0))
|
|
107
|
+
.selected(java.lang.Boolean.valueOf(true))
|
|
108
|
+
.annotatedFeature(com.mapbox.maps.AnnotatedFeature.valueOf(this.pointAnnotation.getGeometry()))
|
|
109
|
+
.variableAnchors(java.util.Arrays.asList([anchor]))
|
|
110
|
+
.build();
|
|
111
|
+
// --- Step 4: Add the view to Mapbox’s ViewAnnotationManager
|
|
112
|
+
com.nativescript.mapbox.ViewAnnotationManager.addViewAnnotation(mapView, frameLayout, viewAnnotationOptions);
|
|
113
|
+
// --- Step 5: Store references
|
|
114
|
+
this.viewAnnotation = frameLayout;
|
|
115
|
+
this.view = view;
|
|
116
|
+
this.prepared = true;
|
|
117
|
+
}
|
|
118
|
+
destroy() {
|
|
119
|
+
if (this.view) {
|
|
120
|
+
this.view._tearDownUI();
|
|
121
|
+
this.view = null;
|
|
122
|
+
}
|
|
123
|
+
this.viewAnnotation = null;
|
|
124
|
+
this.icon = null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
AndroidMarker.MARKER_PADDING_PX = 10;
|
|
128
|
+
//# sourceMappingURL=Marker.android.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AndroidMarker } from './Marker.android';
|
|
2
|
+
/**
|
|
3
|
+
* MarkerManager (Native Android Mapbox SDK version)
|
|
4
|
+
*/
|
|
5
|
+
export declare class MarkerManager {
|
|
6
|
+
private mapView;
|
|
7
|
+
private map;
|
|
8
|
+
private pointAnnotationManager;
|
|
9
|
+
private markerList;
|
|
10
|
+
private static readonly LAYER_ID;
|
|
11
|
+
private static readonly ADDITIONAL_EDGE_PADDING_PX;
|
|
12
|
+
private selectedMarker;
|
|
13
|
+
private onInfoWindowTapped;
|
|
14
|
+
private onMapClickListener;
|
|
15
|
+
private onPointClickListener;
|
|
16
|
+
onViewAnnotationUpdatedListener: com.mapbox.maps.viewannotation.OnViewAnnotationUpdatedListener;
|
|
17
|
+
constructor(map: com.mapbox.maps.MapboxMap, mapView: com.mapbox.maps.MapView, onMarkerClick: any, onInfoWindowClick: any);
|
|
18
|
+
deselectAll(): void;
|
|
19
|
+
adjustViewAnnotationXOffset(marker: AndroidMarker): void;
|
|
20
|
+
updateMarker(marker: AndroidMarker): void;
|
|
21
|
+
addMarker(marker: AndroidMarker): AndroidMarker;
|
|
22
|
+
removeMarker(marker: AndroidMarker): void;
|
|
23
|
+
selectMarker(marker: AndroidMarker, deselectIfSelected?: boolean, update?: boolean): void;
|
|
24
|
+
deselectMarker(marker: AndroidMarker): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
updateOffsetX(marker: AndroidMarker, leftTop: any, width: number): void;
|
|
27
|
+
isSelected(marker: AndroidMarker): boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Trace } from '@nativescript/core';
|
|
2
|
+
import { CLog, CLogTypes } from '../common';
|
|
3
|
+
/**
|
|
4
|
+
* MarkerManager (Native Android Mapbox SDK version)
|
|
5
|
+
*/
|
|
6
|
+
export class MarkerManager {
|
|
7
|
+
constructor(map, mapView, onMarkerClick, onInfoWindowClick) {
|
|
8
|
+
this.markerList = new Set();
|
|
9
|
+
this.map = map;
|
|
10
|
+
this.mapView = mapView;
|
|
11
|
+
this.onInfoWindowTapped = onInfoWindowClick;
|
|
12
|
+
const AnnotationConfig = com.mapbox.maps.plugin.annotation.AnnotationConfig;
|
|
13
|
+
const layerConfig = new AnnotationConfig(MarkerManager.LAYER_ID);
|
|
14
|
+
const annotationPlugin = mapView.getPlugin('MAPBOX_ANNOTATION_PLUGIN_ID');
|
|
15
|
+
this.pointAnnotationManager = annotationPlugin.createAnnotationManager(com.mapbox.maps.plugin.annotation.AnnotationType.PointAnnotation, layerConfig);
|
|
16
|
+
// add click listeners
|
|
17
|
+
this.onPointClickListener = new com.mapbox.maps.plugin.annotation.generated.OnPointAnnotationClickListener({
|
|
18
|
+
onAnnotationClick: (annotation) => {
|
|
19
|
+
for (const marker of this.markerList) {
|
|
20
|
+
if (marker.pointAnnotation === annotation) {
|
|
21
|
+
if (onMarkerClick(marker)) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
this.selectMarker(marker, true);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
this.pointAnnotationManager.addClickListener(this.onPointClickListener);
|
|
31
|
+
// Map click listener to deselect all markers
|
|
32
|
+
this.onMapClickListener = new com.mapbox.maps.plugin.gestures.OnMapClickListener({
|
|
33
|
+
onMapClick: (point) => {
|
|
34
|
+
if (this.selectedMarker) {
|
|
35
|
+
this.deselectMarker(this.selectedMarker);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
com.mapbox.maps.plugin.gestures.GesturesUtils.addOnMapClickListener(map, this.onMapClickListener);
|
|
42
|
+
}
|
|
43
|
+
deselectAll() {
|
|
44
|
+
this.markerList.forEach((marker) => this.deselectMarker(marker));
|
|
45
|
+
}
|
|
46
|
+
adjustViewAnnotationXOffset(marker) {
|
|
47
|
+
const listener = new com.mapbox.maps.viewannotation.OnViewAnnotationUpdatedListener({
|
|
48
|
+
onViewAnnotationPositionUpdated: (view, leftTopCoordinate, width) => {
|
|
49
|
+
if (view === marker.viewAnnotation) {
|
|
50
|
+
this.updateOffsetX(marker, leftTopCoordinate, width);
|
|
51
|
+
}
|
|
52
|
+
com.nativescript.mapbox.ViewAnnotationManager.removeOnViewAnnotationUpdatedListener(this.mapView, listener);
|
|
53
|
+
},
|
|
54
|
+
onViewAnnotationVisibilityUpdated(view, visible) { },
|
|
55
|
+
onViewAnnotationAnchorCoordinateUpdated(param0, param1) { },
|
|
56
|
+
onViewAnnotationAnchorUpdated(param0, param1) { }
|
|
57
|
+
});
|
|
58
|
+
com.nativescript.mapbox.ViewAnnotationManager.addOnViewAnnotationUpdatedListener(this.mapView, listener);
|
|
59
|
+
}
|
|
60
|
+
updateMarker(marker) {
|
|
61
|
+
this.adjustViewAnnotationXOffset(marker);
|
|
62
|
+
marker.update(this.pointAnnotationManager);
|
|
63
|
+
com.nativescript.mapbox.ViewAnnotationManager.updateViewAnnotation(this.mapView, marker.viewAnnotation, new com.mapbox.maps.ViewAnnotationOptions.Builder().annotatedFeature(com.mapbox.maps.AnnotatedFeature.valueOf(marker.pointAnnotation.getGeometry())).build());
|
|
64
|
+
}
|
|
65
|
+
addMarker(marker) {
|
|
66
|
+
if (Trace.isEnabled()) {
|
|
67
|
+
CLog(CLogTypes.log, 'MarkerManager addMarker: ' + JSON.stringify(marker));
|
|
68
|
+
}
|
|
69
|
+
marker.prepareAnnotationMarker(this.pointAnnotationManager, MarkerManager.LAYER_ID);
|
|
70
|
+
marker.prepareViewAnnotation(this.mapView, (e) => {
|
|
71
|
+
// info Window tapped.
|
|
72
|
+
if (!this.onInfoWindowTapped(marker)) {
|
|
73
|
+
this.deselectMarker(marker);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
this.markerList.add(marker);
|
|
77
|
+
// this.selectMarker(marker);
|
|
78
|
+
return marker;
|
|
79
|
+
}
|
|
80
|
+
removeMarker(marker) {
|
|
81
|
+
if (!marker.prepared)
|
|
82
|
+
return;
|
|
83
|
+
this.markerList.delete(marker);
|
|
84
|
+
com.nativescript.mapbox.ViewAnnotationManager.removeViewAnnotation(this.mapView, marker.viewAnnotation);
|
|
85
|
+
this.pointAnnotationManager.delete(marker.pointAnnotation);
|
|
86
|
+
marker.destroy();
|
|
87
|
+
}
|
|
88
|
+
selectMarker(marker, deselectIfSelected = false, update = false) {
|
|
89
|
+
if (this.isSelected(marker) && !update) {
|
|
90
|
+
if (deselectIfSelected)
|
|
91
|
+
this.deselectMarker(marker);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (this.selectedMarker && !this.isSelected(marker)) {
|
|
95
|
+
this.deselectMarker(this.selectedMarker);
|
|
96
|
+
}
|
|
97
|
+
this.selectedMarker = marker;
|
|
98
|
+
this.adjustViewAnnotationXOffset(marker);
|
|
99
|
+
com.nativescript.mapbox.ViewAnnotationManager.updateViewAnnotation(this.mapView, marker.viewAnnotation, new com.mapbox.maps.ViewAnnotationOptions.Builder().visible(java.lang.Boolean.valueOf(true)).selected(java.lang.Boolean.valueOf(true)).build());
|
|
100
|
+
marker.viewAnnotation.setVisibility(android.view.View.VISIBLE);
|
|
101
|
+
}
|
|
102
|
+
deselectMarker(marker) {
|
|
103
|
+
if (!this.selectedMarker || marker.pointAnnotation !== this.selectedMarker.pointAnnotation) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.selectedMarker = null;
|
|
107
|
+
const View = android.view.View;
|
|
108
|
+
const viewAnnotationOptionsBuilder = new com.mapbox.maps.ViewAnnotationOptions.Builder().selected(java.lang.Boolean.valueOf(false)).visible(java.lang.Boolean.valueOf(false));
|
|
109
|
+
if (marker.anchor) {
|
|
110
|
+
const anchorBuilder = marker.anchor.toBuilder().offsetX(0.0).build();
|
|
111
|
+
viewAnnotationOptionsBuilder.variableAnchors(java.util.Collections.singletonList(anchorBuilder));
|
|
112
|
+
}
|
|
113
|
+
com.nativescript.mapbox.ViewAnnotationManager.updateViewAnnotation(this.mapView, marker.viewAnnotation, viewAnnotationOptionsBuilder.build());
|
|
114
|
+
marker.viewAnnotation.setVisibility(View.INVISIBLE);
|
|
115
|
+
}
|
|
116
|
+
destroy() {
|
|
117
|
+
this.markerList.forEach((m) => this.removeMarker(m));
|
|
118
|
+
this.pointAnnotationManager.removeClickListener(this.onPointClickListener);
|
|
119
|
+
this.onPointClickListener = null;
|
|
120
|
+
const gesturePlugin = this.mapView.getPlugin('MAPBOX_GESTURES_PLUGIN_ID');
|
|
121
|
+
com.mapbox.maps.plugin.gestures.GesturesUtils.removeOnMapClickListener(this.map, this.onMapClickListener);
|
|
122
|
+
this.onMapClickListener = null;
|
|
123
|
+
com.nativescript.mapbox.ViewAnnotationManager.removeOnViewAnnotationUpdatedListener(this.mapView, this.onViewAnnotationUpdatedListener);
|
|
124
|
+
this.onViewAnnotationUpdatedListener = null;
|
|
125
|
+
this.map = null;
|
|
126
|
+
this.mapView = null;
|
|
127
|
+
}
|
|
128
|
+
updateOffsetX(marker, leftTop, width) {
|
|
129
|
+
// if (marker.preventNextUpdateOffsetX) {
|
|
130
|
+
// marker.preventNextUpdateOffsetX = false;
|
|
131
|
+
// return;
|
|
132
|
+
// }
|
|
133
|
+
const mapSize = this.mapView.getMapboxMap().getSize();
|
|
134
|
+
let resultOffsetX = 0.0;
|
|
135
|
+
if (leftTop.getX() < 0 && leftTop.getX() + width > 0) {
|
|
136
|
+
resultOffsetX = Math.abs(leftTop.getX()) + MarkerManager.ADDITIONAL_EDGE_PADDING_PX;
|
|
137
|
+
}
|
|
138
|
+
else if (leftTop.getX() + width > mapSize.getWidth() && leftTop.getX() < width) {
|
|
139
|
+
resultOffsetX = mapSize.getWidth() - leftTop.getX() - width - MarkerManager.ADDITIONAL_EDGE_PADDING_PX;
|
|
140
|
+
}
|
|
141
|
+
const anchor = marker.anchor ? marker.anchor.toBuilder().offsetX(resultOffsetX).build() : null;
|
|
142
|
+
if (anchor) {
|
|
143
|
+
const options = new com.mapbox.maps.ViewAnnotationOptions.Builder().variableAnchors(java.util.Collections.singletonList(anchor)).build();
|
|
144
|
+
// marker.preventNextUpdateOffsetX = true;
|
|
145
|
+
com.nativescript.mapbox.ViewAnnotationManager.updateViewAnnotation(this.mapView, marker.viewAnnotation, options);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
isSelected(marker) {
|
|
149
|
+
return this.selectedMarker?.pointAnnotation === marker.pointAnnotation;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
MarkerManager.LAYER_ID = 'annotation-layer';
|
|
153
|
+
MarkerManager.ADDITIONAL_EDGE_PADDING_PX = 20.0;
|
|
154
|
+
//# sourceMappingURL=MarkerManager.android.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript-community/ui-mapbox",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.14.3191a7b",
|
|
4
4
|
"description": "Interactive, thoroughly customizable maps powered by vector tiles and OpenGL.",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "npm run tsc && npm run readme",
|
|
9
|
-
"readme": "
|
|
10
|
-
"tsc": "
|
|
11
|
-
"clean": "
|
|
9
|
+
"readme": "readme generate -c ../../tools/readme/blueprint.json",
|
|
10
|
+
"tsc": "cpy '**/*.d.ts' '../../packages/ui-mapbox' --parents --cwd=../../src/ui-mapbox && tsc --build",
|
|
11
|
+
"clean": "bin/rimraf ./*.d.ts ./*.js ./*.js.map ./*.tsbuildinfo ./*.mjs ./*.mjs.map ./angular ./svelte ./vue* ./react",
|
|
12
|
+
"build.all": "npm run build"
|
|
12
13
|
},
|
|
13
14
|
"nativescript": {
|
|
14
15
|
"platforms": {
|
|
@@ -54,5 +55,5 @@
|
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"@nativescript-community/perms": "^2.3.0"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "3191a7b4737338f81d8bd15615f11faf52024a66"
|
|
58
59
|
}
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
repositories {
|
|
2
2
|
mavenCentral()
|
|
3
|
+
def MAPBOX_DOWNLOADS_TOKEN = project.hasProperty("MAPBOX_DOWNLOADS_TOKEN") ? project.MAPBOX_DOWNLOADS_TOKEN : "$System.env.MAPBOX_DOWNLOADS_TOKEN"
|
|
4
|
+
maven {
|
|
5
|
+
url 'https://api.mapbox.com/downloads/v2/releases/maven'
|
|
6
|
+
authentication {
|
|
7
|
+
basic(BasicAuthentication)
|
|
8
|
+
}
|
|
9
|
+
credentials {
|
|
10
|
+
// Do not change the username below.
|
|
11
|
+
// This should always be `mapbox` (not your username).
|
|
12
|
+
username = 'mapbox'
|
|
13
|
+
// Use the secret token you stored in gradle.properties as the password
|
|
14
|
+
password = MAPBOX_DOWNLOADS_TOKEN
|
|
15
|
+
}
|
|
16
|
+
}
|
|
3
17
|
}
|
|
4
18
|
|
|
5
19
|
// see https://www.mapbox.com/android-sdk/
|
|
6
20
|
dependencies {
|
|
7
|
-
def mapboxVersion = project.hasProperty("mapboxVersion") ? project.mapboxVersion : "
|
|
8
|
-
def mapboxServicesVersion = project.hasProperty("mapboxServicesVersion") ? project.mapboxServicesVersion : "
|
|
9
|
-
// def mapboxTelemetryVersion = project.hasProperty("mapboxTelemetryVersion") ? project.mapboxTelemetryVersion : "6.1.0"
|
|
21
|
+
def mapboxVersion = project.hasProperty("mapboxVersion") ? project.mapboxVersion : "11.15.3"
|
|
22
|
+
def mapboxServicesVersion = project.hasProperty("mapboxServicesVersion") ? project.mapboxServicesVersion : "7.8.0"
|
|
10
23
|
def mapboxPluginsVersion = project.hasProperty("mapboxPluginsVersion") ? project.mapboxPluginsVersion : "v9"
|
|
11
24
|
def mapboxAnnotationPluginVersion = project.hasProperty("mapboxAnnotationPluginVersion") ? project.mapboxAnnotationPluginVersion : "0.9.0"
|
|
12
|
-
// def mapboxGesturesVersion = project.hasProperty("mapboxGesturesVersion") ? project.mapboxGesturesVersion : "0.7.0"
|
|
13
25
|
def okHttpVersion = project.hasProperty("okHttpVersion") ? project.okHttpVersion : "4.9.0"
|
|
14
|
-
implementation ("com.mapbox.mapboxsdk:mapbox-android-sdk:$mapboxVersion") {
|
|
15
|
-
// transitive=false
|
|
16
|
-
}
|
|
17
|
-
if (project.hasProperty("mapboxTelemetryVersion")) {
|
|
18
|
-
def mapboxTelemetryVersion = project.hasProperty("mapboxTelemetryVersion") ? project.mapboxTelemetryVersion : "6.1.0"
|
|
19
|
-
implementation ("com.mapbox.mapboxsdk:mapbox-android-telemetry:$mapboxTelemetryVersion")
|
|
20
|
-
}
|
|
21
|
-
// implementation ("com.mapbox.mapboxsdk:mapbox-android-telemetry:$mapboxTelemetryVersion") {
|
|
22
|
-
// transitive=false
|
|
23
|
-
// }
|
|
24
|
-
implementation ("com.mapbox.mapboxsdk:mapbox-sdk-geojson:$mapboxServicesVersion"){
|
|
25
|
-
// transitive=false
|
|
26
|
-
}
|
|
27
|
-
// implementation ("com.mapbox.mapboxsdk:mapbox-android-gestures:$mapboxGesturesVersion"){
|
|
28
|
-
// transitive=false
|
|
29
|
-
// }
|
|
30
|
-
// implementation ("com.mapbox.mapboxsdk:mapbox-sdk-services:$mapboxServicesVersion"){
|
|
31
|
-
// transitive=false
|
|
32
|
-
// }
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
//
|
|
27
|
+
println "com.mapbox.maps:android:$mapboxVersion"
|
|
28
|
+
|
|
29
|
+
// Core Mapbox Maps SDK v11+
|
|
30
|
+
implementation "com.mapbox.maps:android:$mapboxVersion"
|
|
31
|
+
|
|
32
|
+
// GeoJSON / Annotations support (choose correct module name & version)
|
|
33
|
+
implementation "com.mapbox.mapboxsdk:mapbox-sdk-geojson:$mapboxServicesVersion" // example version
|
|
34
|
+
// implementation "com.mapbox.plugin:maps-annotation:$mapboxVersion" // plugin example
|
|
35
|
+
|
|
36
|
+
// Additional plugins: e.g., location component, gestures, etc.
|
|
37
|
+
// implementation "com.mapbox.plugin:maps-locationcomponent:$mapboxVersion"
|
|
38
|
+
// implementation "com.mapbox.plugin:maps-gestures:$mapboxVersion"
|
|
37
39
|
|
|
38
40
|
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
// If you need Mapbox Search or Navigation SDKs, add here
|
|
43
|
+
// implementation "com.mapbox.search:autofill:1.0.0-beta.39"
|
|
44
|
+
// implementation "com.mapbox.navigation:android:3.0.0"
|
|
41
45
|
|
|
42
46
|
}
|
|
43
47
|
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../../src/ui-mapbox/common.ts","../../src/ui-mapbox/geo.utils.ts","../../src/ui-mapbox/index.android.ts","../../src/ui-mapbox/index.d.ts","../../src/ui-mapbox/index.ios.ts","../../src/ui-mapbox/references.d.ts","../../src/ui-mapbox/expression/expression-parser.android.ts","../../src/ui-mapbox/expression/expression-parser.d.ts","../../src/ui-mapbox/expression/expression-parser.ios.ts","../../src/ui-mapbox/layers/layer-factory.android.ts","../../src/ui-mapbox/layers/layer-factory.d.ts","../../src/ui-mapbox/layers/layer-factory.ios.ts","../../src/ui-mapbox/layers/parser/property-parser.android.ts","../../src/ui-mapbox/layers/parser/property-parser.d.ts","../../src/ui-mapbox/layers/parser/property-parser.ios.ts","../../src/ui-mapbox/markers/marker.android.ts","../../src/ui-mapbox/markers/markermanager.android.ts","../../src/ui-mapbox/typings/mapbox.ios.d.ts","../../src/ui-mapbox/typings/geojson.android.d.ts","../../src/ui-mapbox/typings/index.android.d.ts","../../src/ui-mapbox/typings/mapbox.android.d.ts","../../references.d.ts","../../tools/references.d.ts"],"version":"5.8.3"}
|