@nativescript-community/ui-mapbox 6.2.31 → 7.0.0
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 +7 -0
- package/common.d.ts +56 -26
- package/common.js +44 -28
- package/expression/expression-parser.android.d.ts +2 -2
- package/expression/expression-parser.android.js +4 -3
- package/expression/expression-parser.ios.d.ts +2 -2
- package/expression/expression-parser.ios.js +28 -13
- package/index.android.d.ts +59 -66
- package/index.android.js +1388 -1244
- package/index.d.ts +36 -5
- package/index.ios.d.ts +72 -243
- package/index.ios.js +1161 -1999
- 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 +8 -8
- package/layers/layer-factory.ios.js +46 -100
- package/layers/parser/property-parser.android.d.ts +3 -1
- package/layers/parser/property-parser.android.js +25 -24
- package/layers/parser/property-parser.d.ts +1 -1
- package/layers/parser/property-parser.ios.d.ts +0 -2
- package/layers/parser/property-parser.ios.js +0 -149
- package/markers/Marker.android.d.ts +28 -0
- package/markers/Marker.android.js +54 -0
- package/markers/Marker.common.d.ts +2 -0
- package/markers/Marker.common.js +31 -0
- package/markers/MarkerManager.android.d.ts +35 -0
- package/markers/MarkerManager.android.js +220 -0
- package/package.json +7 -6
- package/platforms/android/include.gradle +31 -27
- package/platforms/android/ui_mapbox.aar +0 -0
- package/platforms/ios/Podfile +3 -1
- package/platforms/ios/Resources/default_pin.png +0 -0
- package/platforms/ios/src/MapboxBridge.swift +1479 -0
- package/platforms/ios/src/NativeExpressionParser.swift +33 -0
- package/platforms/ios/src/NativeLayerFactory.swift +108 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/typings/Mapbox.ios.d.ts +2 -3242
- package/typings/geojson.android.d.ts +689 -0
- package/typings/index.android.d.ts +46 -0
- package/typings/mapbox.android.d.ts +39968 -12560
- package/typings/mapbox.bridge.ios.d.ts +129 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
declare class MapboxBridge extends NSObject {
|
|
2
|
+
coordinateToPoint(lat: number, lng: number): string
|
|
3
|
+
pointToCoordinate(x: number, y: number): string
|
|
4
|
+
|
|
5
|
+
static alloc(): MapboxBridge;
|
|
6
|
+
static new(): MapboxBridge;
|
|
7
|
+
|
|
8
|
+
static bridgeFor(mapboxView: MapView): MapboxBridge;
|
|
9
|
+
|
|
10
|
+
static MapLoadedNotification: string;
|
|
11
|
+
static StyleLoadedNotification: string;
|
|
12
|
+
static MapClickNotification: string;
|
|
13
|
+
static MapLongPressNotification: string;
|
|
14
|
+
static AnnotationTapNotification: string;
|
|
15
|
+
static CameraChangedNotification: string;
|
|
16
|
+
static CameraIdleNotification: string;
|
|
17
|
+
static MapScrollNotification: string;
|
|
18
|
+
static MapMoveBeginNotification: string;
|
|
19
|
+
static MapMoveEndNotification: string;
|
|
20
|
+
static MapFlingNotification: string;
|
|
21
|
+
static CameraMoveCancelNotification: string;
|
|
22
|
+
static OfflineProgressNotification: string;
|
|
23
|
+
static OfflineCompleteNotification: string;
|
|
24
|
+
static UserLocationUpdatedNotification: string;
|
|
25
|
+
static UserTrackingStateChangedNotification: string;
|
|
26
|
+
|
|
27
|
+
createMap(x: number, y: number, width: number, height: number, accessToken: string, styleURI?: string, mapOptions: string): UIView;
|
|
28
|
+
getMapView(): MapView;
|
|
29
|
+
show(): void;
|
|
30
|
+
hide(): void;
|
|
31
|
+
destroy(): void;
|
|
32
|
+
|
|
33
|
+
setStyle(styleURIOrURL: string, completion: (success: boolean, error?: any) => void): void;
|
|
34
|
+
|
|
35
|
+
addImage(imageId: string, image: any): void;
|
|
36
|
+
removeImage(imageId: string): void;
|
|
37
|
+
|
|
38
|
+
addMarkers(markers: string): void;
|
|
39
|
+
removeMarkers(ids?: string): void;
|
|
40
|
+
updateMarkerPosition(markerId: string, lat: number, lng: number): boolean;
|
|
41
|
+
|
|
42
|
+
setCenter(lat: number, lng: number, animated: boolean): void;
|
|
43
|
+
getCenter(): NSDictionary;
|
|
44
|
+
setZoom(zoom: number, animated: boolean): void;
|
|
45
|
+
getZoom(): number | null;
|
|
46
|
+
|
|
47
|
+
animateCamera(optionsJSON: string): void;
|
|
48
|
+
|
|
49
|
+
getViewport(): NSDictionary;
|
|
50
|
+
setViewport(optionsJSON: string): boolean;
|
|
51
|
+
setOnCameraChangeListener(callback: (info: any) => void): void;
|
|
52
|
+
|
|
53
|
+
queryRenderedFeaturesAtPoint(point: string, layerIds?: NSArray<string> | string[] | null, completion?: (result: string | null) => void);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* New async/native call:
|
|
57
|
+
* querySourceFeaturesAsync(sourceId, optionsJSON, completion) -> Cancelable
|
|
58
|
+
* - optionsJSON: optional JSON string containing { filter: <expression-array>, sourceLayer: string, ... }
|
|
59
|
+
* - completion: invoked with JSON string of features or null on error
|
|
60
|
+
* Returns: a Cancelable token (typed as any here)
|
|
61
|
+
*/
|
|
62
|
+
querySourceFeatures(sourceId: string, optionsJSON?: string | null, completion?: (result: string | null) => void): any;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
addSourceGeoJSON(sourceId: string, geojson: string): boolean;
|
|
66
|
+
updateSourceGeoJSON(sourceId: string, geojson: string): boolean;
|
|
67
|
+
removeSource(sourceId: string): boolean;
|
|
68
|
+
|
|
69
|
+
removeLayer(layerId: string): boolean;
|
|
70
|
+
|
|
71
|
+
addPolyline(id: string, coordsJSON: string, optionsJSON?: string | null): boolean;
|
|
72
|
+
addPolygon(id: string, coordsJSON: string, optionsJSON?: string | null): boolean;
|
|
73
|
+
addLinePoint(id: string, latlng: string, sourceId?): boolean;
|
|
74
|
+
removePolygons(ids?: NSArray<string> | string[] | null): boolean;
|
|
75
|
+
removePolylines(ids?: NSArray<string> | string[] | null): boolean;
|
|
76
|
+
|
|
77
|
+
addViewAnnotationForMarker(markerId: string, view: UIView, lat: number, lng: number): boolean;
|
|
78
|
+
updateViewAnnotationForMarker(markerId: string, lat: number, lng: number): boolean;
|
|
79
|
+
removeViewAnnotationForMarker(markerId: string): boolean;
|
|
80
|
+
hasViewAnnotationForMarker(markerId: string): boolean;
|
|
81
|
+
showAnnotationForMarker(markerId: string)
|
|
82
|
+
|
|
83
|
+
downloadOfflineRegion(optionsJSON: string, progress: (info: any) => void, completion: (success: boolean, error?: any) => void): void;
|
|
84
|
+
listOfflineRegions(callback:(res)=>void): string | null;
|
|
85
|
+
deleteOfflineRegion(idOrName: string): void;
|
|
86
|
+
|
|
87
|
+
// user location & tilt
|
|
88
|
+
showUserLocationMarker(show: boolean): void;
|
|
89
|
+
hideUserLocationMarker(): void;
|
|
90
|
+
forceUserLocationUpdate(): boolean;
|
|
91
|
+
getTilt(): number | null;
|
|
92
|
+
setTilt(tilt: number, animated: boolean): void;
|
|
93
|
+
getUserLocation(): NSDictionary | null;
|
|
94
|
+
|
|
95
|
+
trackUser(optionsJSON: string): boolean;
|
|
96
|
+
stopTrackingUser(): void;
|
|
97
|
+
|
|
98
|
+
// added/updated methods
|
|
99
|
+
getLayer(layerId: string): string | null;
|
|
100
|
+
getLayers(): string | null;
|
|
101
|
+
getImage(imageId: string): UIImage | null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Native helpers exported by Swift (renamed in Swift to avoid TS naming collisions).
|
|
106
|
+
* These are optional: the TS shims will call into them when present.
|
|
107
|
+
*/
|
|
108
|
+
declare class NativeLayerFactory extends NSObject {
|
|
109
|
+
static createLayer(mapboxView: MapView, id:string, layerJSON: string, belowLayerId: string): boolean;
|
|
110
|
+
static applyLayerProperties(mapboxView: MapView, layerId: string, properties: NSDictionary<any, any>): boolean;
|
|
111
|
+
static setLayerProperty(mapboxView: MapView, layerId: string, name: string, value: any): boolean;
|
|
112
|
+
static getLayerProperty(mapboxView: MapView, layerId: string, name: string): any;
|
|
113
|
+
static getLayerType(mapboxView: MapView, layerId: string): string;
|
|
114
|
+
static setLayerVisibility(mapboxView: MapView, layerId: string, visible: boolean): boolean;
|
|
115
|
+
static getLayers(mapboxView: MapView): string;
|
|
116
|
+
static getLayer(mapboxView: MapView, layerId): string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare class NativeExpressionParser extends NSObject {
|
|
120
|
+
/**
|
|
121
|
+
* parseJson: accepts an NSArray (JS array) representing the Mapbox expression JSON.
|
|
122
|
+
* Returns an opaque NSPredicate (any) or null if not available.
|
|
123
|
+
*/
|
|
124
|
+
static parseJson(jsonExpression: NSArray<any>): any | null;
|
|
125
|
+
/**
|
|
126
|
+
* toJson: accepts an opaque NSPredicate and returns an NSArray (expression JSON) or null.
|
|
127
|
+
*/
|
|
128
|
+
static toJson(predicate: any): NSArray<any> | null;
|
|
129
|
+
}
|