@nativescript-community/ui-massifmaps 3.0.1 → 4.0.1
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 +41 -0
- package/README.md +237 -0
- package/api/bridge.android.d.ts +2 -0
- package/api/bridge.android.js +156 -0
- package/api/bridge.android.js.map +1 -0
- package/api/bridge.d.ts +91 -0
- package/api/bridge.ios.d.ts +2 -0
- package/api/bridge.ios.js +168 -0
- package/api/bridge.ios.js.map +1 -0
- package/api/index.common.d.ts +495 -0
- package/api/index.common.js +1448 -0
- package/api/index.common.js.map +1 -0
- package/api/index.d.ts +2 -0
- package/api/index.js +3 -0
- package/api/index.js.map +1 -0
- package/api/massif-api.d.ts +12471 -0
- package/api/resolve.d.ts +52 -0
- package/api/resolve.js +214 -0
- package/api/resolve.js.map +1 -0
- package/api/schema.d.ts +67 -0
- package/api/schema.js +539 -0
- package/api/schema.js.map +1 -0
- package/bindings/components/Options.d.ts +14 -13
- package/bindings/components/Options.js.map +1 -1
- package/bindings/core/Variant.d.ts +2 -1
- package/bindings/core/Variant.js.map +1 -1
- package/bindings/enums.d.ts +138 -0
- package/bindings/enums.js +153 -0
- package/bindings/enums.js.map +1 -0
- package/bindings/graphics/Bitmap.d.ts +2 -1
- package/bindings/graphics/Bitmap.js.map +1 -1
- package/bindings/layers/ClusterElementBuilder.d.ts +2 -1
- package/bindings/layers/ClusterElementBuilder.js.map +1 -1
- package/bindings/layers/CompositeVectorTileLayer.d.ts +3 -7
- package/bindings/layers/CompositeVectorTileLayer.js +3 -6
- package/bindings/layers/CompositeVectorTileLayer.js.map +1 -1
- package/bindings/layers/HillshadeRasterTileLayer.d.ts +3 -2
- package/bindings/layers/HillshadeRasterTileLayer.js.map +1 -1
- package/bindings/layers/Layer.d.ts +2 -1
- package/bindings/layers/Layer.js.map +1 -1
- package/bindings/layers/RasterTileLayer.d.ts +3 -2
- package/bindings/layers/RasterTileLayer.js.map +1 -1
- package/bindings/layers/TileLayer.d.ts +5 -3
- package/bindings/layers/TileLayer.js +1 -1
- package/bindings/layers/TileLayer.js.map +1 -1
- package/bindings/layers/VectorEditEventListener.d.ts +2 -1
- package/bindings/layers/VectorEditEventListener.js.map +1 -1
- package/bindings/layers/VectorTileLayer.d.ts +5 -4
- package/bindings/layers/VectorTileLayer.js.map +1 -1
- package/bindings/packagemanager/PackageInfo.d.ts +2 -1
- package/bindings/packagemanager/PackageInfo.js.map +1 -1
- package/bindings/packagemanager/PackageManagerListener.d.ts +2 -1
- package/bindings/packagemanager/PackageManagerListener.js.map +1 -1
- package/bindings/packagemanager/PackageStatus.d.ts +2 -1
- package/bindings/packagemanager/PackageStatus.js.map +1 -1
- package/bindings/packagemanager/PackageTileMask.d.ts +2 -1
- package/bindings/packagemanager/PackageTileMask.js.map +1 -1
- package/bindings/routing/RouteMatchingPoint.d.ts +2 -1
- package/bindings/routing/RouteMatchingPoint.js.map +1 -1
- package/bindings/routing/RoutingInstruction.js.map +1 -1
- package/bindings/styles/AnimationStyle.d.ts +3 -2
- package/bindings/styles/AnimationStyle.js.map +1 -1
- package/bindings/styles/AnimationStyleBuilder.d.ts +7 -6
- package/bindings/styles/AnimationStyleBuilder.js.map +1 -1
- package/bindings/styles/LabelStyle.js.map +1 -1
- package/bindings/styles/LabelStyleBuilder.d.ts +5 -4
- package/bindings/styles/LabelStyleBuilder.js.map +1 -1
- package/bindings/styles/LineStyle.d.ts +2 -1
- package/bindings/styles/LineStyle.js.map +1 -1
- package/bindings/styles/LineStyleBuilder.d.ts +6 -5
- package/bindings/styles/LineStyleBuilder.js.map +1 -1
- package/bindings/styles/MarkerStyle.js.map +1 -1
- package/bindings/styles/MarkerStyleBuilder.d.ts +5 -4
- package/bindings/styles/MarkerStyleBuilder.js.map +1 -1
- package/bindings/styles/NMLModelStyle.js.map +1 -1
- package/bindings/styles/NMLModelStyleBuilder.d.ts +5 -4
- package/bindings/styles/NMLModelStyleBuilder.js.map +1 -1
- package/bindings/ui/BalloonPopupButtonClickInfo.js.map +1 -1
- package/bindings/ui/ClickInfo.js.map +1 -1
- package/bindings/ui/MapClickInfo.js.map +1 -1
- package/bindings/ui/PopupClickInfo.js.map +1 -1
- package/bindings/ui/RasterTileClickInfo.js.map +1 -1
- package/bindings/ui/UTFGridClickInfo.js.map +1 -1
- package/bindings/ui/VectorElementClickInfo.js.map +1 -1
- package/bindings/ui/VectorElementDragInfo.d.ts +2 -1
- package/bindings/ui/VectorElementDragInfo.js.map +1 -1
- package/bindings/ui/VectorTileClickInfo.d.ts +3 -1
- package/bindings/ui/VectorTileClickInfo.js +5 -2
- package/bindings/ui/VectorTileClickInfo.js.map +1 -1
- package/bindings/utils/BundleAssetPackage.d.ts +15 -0
- package/bindings/utils/BundleAssetPackage.js +8 -0
- package/bindings/utils/BundleAssetPackage.js.map +1 -0
- package/bindings/utils/index.d.ts +1 -0
- package/bindings/utils/index.js +1 -0
- package/bindings/utils/index.js.map +1 -1
- package/bindings/vectortiles/MBVectorTileDecoder.d.ts +4 -3
- package/bindings/vectortiles/MBVectorTileDecoder.js.map +1 -1
- package/celestial/CelestialArc.android.d.ts +0 -1
- package/celestial/CelestialArc.android.js +0 -3
- package/celestial/CelestialArc.android.js.map +1 -1
- package/celestial/CelestialArc.d.ts +1 -3
- package/celestial/CelestialArc.ios.d.ts +0 -1
- package/celestial/CelestialArc.ios.js +0 -1
- package/celestial/CelestialArc.ios.js.map +1 -1
- package/celestial/CelestialObject.android.d.ts +0 -1
- package/celestial/CelestialObject.android.js +0 -1
- package/celestial/CelestialObject.android.js.map +1 -1
- package/celestial/CelestialObject.d.ts +0 -2
- package/celestial/CelestialObject.ios.d.ts +0 -1
- package/celestial/CelestialObject.ios.js +0 -1
- package/celestial/CelestialObject.ios.js.map +1 -1
- package/celestial/CelestialObjectVector.android.d.ts +0 -1
- package/celestial/CelestialObjectVector.android.js +0 -4
- package/celestial/CelestialObjectVector.android.js.map +1 -1
- package/celestial/CelestialObjectVector.d.ts +0 -2
- package/celestial/CelestialObjectVector.ios.d.ts +0 -1
- package/celestial/CelestialObjectVector.ios.js +0 -1
- package/celestial/CelestialObjectVector.ios.js.map +1 -1
- package/celestial/CelestialSprite.android.d.ts +0 -1
- package/celestial/CelestialSprite.android.js +0 -3
- package/celestial/CelestialSprite.android.js.map +1 -1
- package/celestial/CelestialSprite.d.ts +1 -3
- package/celestial/CelestialSprite.ios.d.ts +0 -1
- package/celestial/CelestialSprite.ios.js +0 -1
- package/celestial/CelestialSprite.ios.js.map +1 -1
- package/components/index.android.d.ts +9 -27
- package/components/index.android.js +3 -21
- package/components/index.android.js.map +1 -1
- package/components/index.d.ts +4 -26
- package/components/index.ios.d.ts +3 -21
- package/components/index.ios.js +3 -21
- package/components/index.ios.js.map +1 -1
- package/core/index.android.js +3 -3
- package/core/index.android.js.map +1 -1
- package/core/index.ios.js +3 -4
- package/core/index.ios.js.map +1 -1
- package/datasources/mbtiles.android.d.ts +2 -2
- package/index.android.d.ts +1 -6
- package/index.android.js +4 -8
- package/index.android.js.map +1 -1
- package/index.common.d.ts +3 -6
- package/index.common.js +3 -6
- package/index.common.js.map +1 -1
- package/index.d.ts +6 -0
- package/index.ios.d.ts +1 -6
- package/index.ios.js +1 -6
- package/index.ios.js.map +1 -1
- package/layers/CelestialLayer.android.d.ts +0 -1
- package/layers/CelestialLayer.android.js +0 -3
- package/layers/CelestialLayer.android.js.map +1 -1
- package/layers/CelestialLayer.d.ts +1 -4
- package/layers/CelestialLayer.ios.d.ts +0 -1
- package/layers/CelestialLayer.ios.js +1 -4
- package/layers/CelestialLayer.ios.js.map +1 -1
- package/layers/composite.android.d.ts +3 -5
- package/layers/composite.android.js +0 -6
- package/layers/composite.android.js.map +1 -1
- package/layers/composite.d.ts +6 -25
- package/layers/composite.ios.d.ts +2 -6
- package/layers/composite.ios.js +2 -10
- package/layers/composite.ios.js.map +1 -1
- package/layers/index.android.d.ts +3 -3
- package/layers/index.d.ts +4 -22
- package/layers/raster.android.d.ts +8 -8
- package/layers/raster.android.js +1 -1
- package/layers/raster.android.js.map +1 -1
- package/layers/raster.d.ts +2 -11
- package/layers/vector.android.d.ts +10 -10
- package/layers/vector.android.js +2 -2
- package/layers/vector.android.js.map +1 -1
- package/layers/vector.d.ts +15 -71
- package/nativeclass.common.d.ts +6 -31
- package/nativeclass.common.js +4 -21
- package/nativeclass.common.js.map +1 -1
- package/nativescript.config.ts +9 -6
- package/package.json +2 -2
- package/platforms/android/include-settings.gradle +18 -4
- package/platforms/android/include.gradle +10 -2
- package/platforms/android/java/com/nativescript/massifmaps/additions/CelestialEventListener.java +1 -1
- package/platforms/android/java/com/nativescript/massifmaps/additions/ClusterElementBuilder.java +1 -1
- package/platforms/android/java/com/nativescript/massifmaps/additions/HillshadeRasterTileLayer.java +4 -4
- package/platforms/android/java/com/nativescript/massifmaps/additions/RasterTileEventListener.java +1 -1
- package/platforms/android/java/com/nativescript/massifmaps/additions/RendererCaptureListener.java +1 -1
- package/platforms/android/java/com/nativescript/massifmaps/additions/SynchronousHandler.java +28 -0
- package/platforms/android/java/com/nativescript/massifmaps/additions/TileDownloadListener.java +4 -4
- package/platforms/android/java/com/nativescript/massifmaps/additions/VectorElementEventListener.java +1 -1
- package/platforms/android/java/com/nativescript/massifmaps/additions/VectorTileEventListener.java +1 -1
- package/platforms/android/java/com/nativescript/massifmaps/additions2/FeatureCollectionSearchService.java +1 -2
- package/platforms/android/java/com/nativescript/massifmaps/additions2/VectorEditEventListener.java +21 -20
- package/platforms/android/java/com/nativescript/massifmaps/additions2/VectorTileSearchService.java +1 -2
- package/platforms/android/java/com/nativescript/massifmaps/api/EventListener.java +60 -0
- package/platforms/android/java/com/nativescript/massifmaps/geocoding/GeocodingServiceAdditions.java +5 -5
- package/platforms/android/java/com/nativescript/massifmaps/packagemanager/PackageManagerListener.java +11 -11
- package/platforms/android/java/com/nativescript/massifmaps/routing/RoutingServiceAdditions.java +19 -36
- package/platforms/android/native-api-usage.json +8 -0
- package/platforms/ios/build.xcconfig +4 -1
- package/platforms/ios/native-api-usage.json +1 -0
- package/platforms/ios/src/MassifMapsAdditions.h +1 -0
- package/platforms/ios/src/NSMSFApiEventListener.h +23 -0
- package/platforms/ios/src/NSMSFApiEventListener.mm +33 -0
- package/platforms/ios/src/NSMSFFeatureCollectionSearchService.swift +1 -1
- package/platforms/ios/src/NSMSFGeocodingServiceAdditions.swift +1 -1
- package/platforms/ios/src/NSMSFHillshadeRasterTileLayer.swift +1 -1
- package/platforms/ios/src/NSMSFMainThread.swift +21 -0
- package/platforms/ios/src/NSMSFRoutingServiceAdditions.swift +1 -1
- package/platforms/ios/src/NSMSFVectorTileSearchService.swift +1 -1
- package/projections/index.ios.js.map +1 -1
- package/renderers/index.d.ts +3 -10
- package/routing/index.android.d.ts +17 -17
- package/tsconfig.tsbuildinfo +1 -1
- package/typings/massifmaps.android.d.ts +1913 -410
- package/typings/massifmaps.ios.d.ts +21 -4
- package/typings/ns.massifmaps.android.d.ts +44 -175
- package/typings/ns.massifmaps.ios.d.ts +10 -63
- package/ui/index.android.d.ts +10 -14
- package/ui/index.android.js +6 -66
- package/ui/index.android.js.map +1 -1
- package/ui/index.common.d.ts +31 -0
- package/ui/index.common.js +130 -2
- package/ui/index.common.js.map +1 -1
- package/ui/index.d.ts +60 -21
- package/ui/index.ios.d.ts +4 -6
- package/ui/index.ios.js +5 -92
- package/ui/index.ios.js.map +1 -1
- package/utils/index.android.d.ts +9 -22
- package/utils/index.android.js +20 -129
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +9 -7
- package/utils/index.ios.d.ts +10 -18
- package/utils/index.ios.js +20 -109
- package/utils/index.ios.js.map +1 -1
- package/vectorelements/index.android.d.ts +6 -6
- package/vectorelements/line.android.d.ts +8 -11
- package/vectorelements/line.android.js +1 -4
- package/vectorelements/line.android.js.map +1 -1
- package/vectorelements/line.ios.d.ts +1 -4
- package/vectorelements/line.ios.js +1 -4
- package/vectorelements/line.ios.js.map +1 -1
- package/vectortiles/index.android.d.ts +0 -2
- package/vectortiles/index.android.js +0 -9
- package/vectortiles/index.android.js.map +1 -1
- package/platforms/android/java/com/nativescript/massifmaps/additions/AssetPackage.java +0 -59
- package/platforms/android/java/com/nativescript/massifmaps/additions/DirAssetPackage.java +0 -53
- package/platforms/android/java/com/nativescript/massifmaps/additions/MapEventListener.java +0 -17
- package/platforms/android/java/com/nativescript/massifmaps/additions/MapView.java +0 -167
- package/platforms/android/java/com/nativescript/massifmaps/additions/TextureMapView.java +0 -166
- package/platforms/ios/src/NSMSFMapEventListener.swift +0 -43
- package/platforms/ios/src/NSMSFMapView.swift +0 -106
package/platforms/android/java/com/nativescript/massifmaps/routing/RoutingServiceAdditions.java
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
package com.nativescript.massifmaps.routing;
|
|
2
2
|
|
|
3
|
+
import com.nativescript.massifmaps.additions.SynchronousHandler;
|
|
3
4
|
import android.os.Handler;
|
|
4
5
|
import android.util.Log;
|
|
5
6
|
|
|
6
|
-
import com.nativescript.massifmaps.additions.MapView;
|
|
7
7
|
|
|
8
8
|
import org.json.JSONException;
|
|
9
9
|
import org.json.JSONArray;
|
|
@@ -24,26 +24,6 @@ import java.io.IOException;
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
public class RoutingServiceAdditions {
|
|
27
|
-
enum RoutingAction {
|
|
28
|
-
HEAD_ON,
|
|
29
|
-
FINISH,
|
|
30
|
-
NO_TURN,
|
|
31
|
-
GO_STRAIGHT,
|
|
32
|
-
TURN_RIGHT,
|
|
33
|
-
UTURN,
|
|
34
|
-
TURN_LEFT,
|
|
35
|
-
REACH_VIA_LOCATION,
|
|
36
|
-
ENTER_ROUNDABOUT,
|
|
37
|
-
LEAVE_ROUNDABOUT,
|
|
38
|
-
STAY_ON_ROUNDABOUT,
|
|
39
|
-
START_AT_END_OF_STREET,
|
|
40
|
-
ENTER_AGAINST_ALLOWED_DIRECTION,
|
|
41
|
-
LEAVE_AGAINST_ALLOWED_DIRECTION,
|
|
42
|
-
GO_UP,
|
|
43
|
-
GO_DOWN,
|
|
44
|
-
WAIT
|
|
45
|
-
}
|
|
46
|
-
|
|
47
27
|
static final String TAG = "RoutingServiceAdditions";
|
|
48
28
|
static Handler mainHandler = null;
|
|
49
29
|
|
|
@@ -61,7 +41,7 @@ public class RoutingServiceAdditions {
|
|
|
61
41
|
}
|
|
62
42
|
} catch (final Exception e) {
|
|
63
43
|
e.printStackTrace();
|
|
64
|
-
if (
|
|
44
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
65
45
|
if (mainHandler == null) {
|
|
66
46
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
67
47
|
}
|
|
@@ -79,7 +59,7 @@ public class RoutingServiceAdditions {
|
|
|
79
59
|
|
|
80
60
|
final RoutingResult fRa = result;
|
|
81
61
|
final String fStrResult = strResult;
|
|
82
|
-
if (
|
|
62
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
83
63
|
if (mainHandler == null) {
|
|
84
64
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
85
65
|
}
|
|
@@ -105,7 +85,10 @@ public class RoutingServiceAdditions {
|
|
|
105
85
|
RoutingInstruction instruction = rInstructions.get(i);
|
|
106
86
|
int index = instruction.getPointIndex();
|
|
107
87
|
JSONObject obj = new JSONObject();
|
|
108
|
-
|
|
88
|
+
// getAction() IS the ordinal now that the SDK's Java enums are int constants, so the
|
|
89
|
+
// name round trip is gone - and with it the throw on ENTER_FERRY / LEAVE_FERRY, which
|
|
90
|
+
// the local mirror of the enum never listed. Same numbers for every other action.
|
|
91
|
+
obj.put("a", instruction.getAction());
|
|
109
92
|
obj.put("az", Math.round(instruction.getAzimuth()));
|
|
110
93
|
obj.put("dist", instruction.getDistance());
|
|
111
94
|
obj.put("time", instruction.getTime());
|
|
@@ -138,7 +121,7 @@ public class RoutingServiceAdditions {
|
|
|
138
121
|
result = stringifyRoutingResult(routingResult);
|
|
139
122
|
} catch (final Exception e) {
|
|
140
123
|
e.printStackTrace();
|
|
141
|
-
if (
|
|
124
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
142
125
|
if (mainHandler == null) {
|
|
143
126
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
144
127
|
}
|
|
@@ -155,7 +138,7 @@ public class RoutingServiceAdditions {
|
|
|
155
138
|
}
|
|
156
139
|
|
|
157
140
|
final String fRa = result;
|
|
158
|
-
if (
|
|
141
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
159
142
|
if (mainHandler == null) {
|
|
160
143
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
161
144
|
}
|
|
@@ -185,7 +168,7 @@ public class RoutingServiceAdditions {
|
|
|
185
168
|
result = service.matchRoute(request);
|
|
186
169
|
} catch (final Exception e) {
|
|
187
170
|
e.printStackTrace();
|
|
188
|
-
if (
|
|
171
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
189
172
|
if (mainHandler == null) {
|
|
190
173
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
191
174
|
}
|
|
@@ -202,7 +185,7 @@ public class RoutingServiceAdditions {
|
|
|
202
185
|
}
|
|
203
186
|
|
|
204
187
|
final RouteMatchingResult fRa = result;
|
|
205
|
-
if (
|
|
188
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
206
189
|
if (mainHandler == null) {
|
|
207
190
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
208
191
|
}
|
|
@@ -231,7 +214,7 @@ public class RoutingServiceAdditions {
|
|
|
231
214
|
result = service.matchRoute(request);
|
|
232
215
|
} catch (final Exception e) {
|
|
233
216
|
e.printStackTrace();
|
|
234
|
-
if (
|
|
217
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
235
218
|
if (mainHandler == null) {
|
|
236
219
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
237
220
|
}
|
|
@@ -248,7 +231,7 @@ public class RoutingServiceAdditions {
|
|
|
248
231
|
}
|
|
249
232
|
|
|
250
233
|
final RouteMatchingResult fRa = result;
|
|
251
|
-
if (
|
|
234
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
252
235
|
if (mainHandler == null) {
|
|
253
236
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
254
237
|
}
|
|
@@ -277,7 +260,7 @@ public class RoutingServiceAdditions {
|
|
|
277
260
|
result = service.matchRoute(request);
|
|
278
261
|
} catch (final Exception e) {
|
|
279
262
|
e.printStackTrace();
|
|
280
|
-
if (
|
|
263
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
281
264
|
if (mainHandler == null) {
|
|
282
265
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
283
266
|
}
|
|
@@ -294,7 +277,7 @@ public class RoutingServiceAdditions {
|
|
|
294
277
|
}
|
|
295
278
|
|
|
296
279
|
final RouteMatchingResult fRa = result;
|
|
297
|
-
if (
|
|
280
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
298
281
|
if (mainHandler == null) {
|
|
299
282
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
300
283
|
}
|
|
@@ -322,7 +305,7 @@ public class RoutingServiceAdditions {
|
|
|
322
305
|
result = service.matchRoute(request);
|
|
323
306
|
} catch (final Exception e) {
|
|
324
307
|
e.printStackTrace();
|
|
325
|
-
if (
|
|
308
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
326
309
|
if (mainHandler == null) {
|
|
327
310
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
328
311
|
}
|
|
@@ -339,7 +322,7 @@ public class RoutingServiceAdditions {
|
|
|
339
322
|
}
|
|
340
323
|
|
|
341
324
|
final RouteMatchingResult fRa = result;
|
|
342
|
-
if (
|
|
325
|
+
if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
343
326
|
if (mainHandler == null) {
|
|
344
327
|
mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
345
328
|
}
|
|
@@ -368,7 +351,7 @@ public class RoutingServiceAdditions {
|
|
|
368
351
|
// result = service.rawCall(option, request);
|
|
369
352
|
// } catch (final Exception e) {
|
|
370
353
|
// e.printStackTrace();
|
|
371
|
-
// if (
|
|
354
|
+
// if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
372
355
|
// if (mainHandler == null) {
|
|
373
356
|
// mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
374
357
|
// }
|
|
@@ -385,7 +368,7 @@ public class RoutingServiceAdditions {
|
|
|
385
368
|
// }
|
|
386
369
|
|
|
387
370
|
// final String fRa = result;
|
|
388
|
-
// if (
|
|
371
|
+
// if (SynchronousHandler.RUN_ON_MAIN_THREAD) {
|
|
389
372
|
// if (mainHandler == null) {
|
|
390
373
|
// mainHandler = new Handler(android.os.Looper.getMainLooper());
|
|
391
374
|
// }
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"uses": [
|
|
3
|
+
"android.opengl:GLSurfaceView",
|
|
4
|
+
"com.massifmaps.api*:*",
|
|
3
5
|
"com.massifmaps.celestial:CelestialArc",
|
|
4
6
|
"com.massifmaps.celestial:CelestialObject",
|
|
5
7
|
"com.massifmaps.celestial:CelestialObjectVector",
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
"com.massifmaps.datasources:TileDataSource",
|
|
62
64
|
"com.massifmaps.datasources:TileDownloadListener",
|
|
63
65
|
"com.massifmaps.datasources:VectorDataSource",
|
|
66
|
+
"com.massifmaps.geocoding:GeocodingAddress",
|
|
64
67
|
"com.massifmaps.geocoding:GeocodingRequest",
|
|
65
68
|
"com.massifmaps.geocoding:GeocodingResult",
|
|
66
69
|
"com.massifmaps.geocoding:GeocodingResultVector",
|
|
@@ -85,6 +88,8 @@
|
|
|
85
88
|
"com.massifmaps.geometry:GeoJSONGeometryReader",
|
|
86
89
|
"com.massifmaps.geometry:GeoJSONGeometryWriter",
|
|
87
90
|
"com.massifmaps.geometry:Geometry",
|
|
91
|
+
"com.massifmaps.geometry:GeometrySimplifier",
|
|
92
|
+
"com.massifmaps.geometry:GeometryType",
|
|
88
93
|
"com.massifmaps.geometry:GeometryVector",
|
|
89
94
|
"com.massifmaps.geometry:LineGeometry",
|
|
90
95
|
"com.massifmaps.geometry:LineGeometryVector",
|
|
@@ -213,6 +218,7 @@
|
|
|
213
218
|
"com.massifmaps.styles:Polygon3DStyleBuilder",
|
|
214
219
|
"com.massifmaps.styles:PolygonStyle",
|
|
215
220
|
"com.massifmaps.styles:PolygonStyleBuilder",
|
|
221
|
+
"com.massifmaps.styles:PopupStyle",
|
|
216
222
|
"com.massifmaps.styles:PopupStyleBuilder",
|
|
217
223
|
"com.massifmaps.styles:StringCartoCSSStyleSetMap",
|
|
218
224
|
"com.massifmaps.styles:Style",
|
|
@@ -220,6 +226,7 @@
|
|
|
220
226
|
"com.massifmaps.styles:TextMargins",
|
|
221
227
|
"com.massifmaps.styles:TextStyle",
|
|
222
228
|
"com.massifmaps.styles:TextStyleBuilder",
|
|
229
|
+
"com.massifmaps.ui*:*",
|
|
223
230
|
"com.massifmaps.ui:BalloonPopupButtonClickInfo",
|
|
224
231
|
"com.massifmaps.ui:ClickInfo",
|
|
225
232
|
"com.massifmaps.ui:ClickType",
|
|
@@ -238,6 +245,7 @@
|
|
|
238
245
|
"com.massifmaps.utils:AssetPackage",
|
|
239
246
|
"com.massifmaps.utils:AssetUtils",
|
|
240
247
|
"com.massifmaps.utils:BitmapUtils",
|
|
248
|
+
"com.massifmaps.utils:BundleAssetPackage",
|
|
241
249
|
"com.massifmaps.utils:DirAssetPackage",
|
|
242
250
|
"com.massifmaps.utils:Log",
|
|
243
251
|
"com.massifmaps.utils:LogEventListener",
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// OpenGLES and GLKit do not exist on Mac Catalyst, whose slice renders through MetalANGLE
|
|
2
|
+
MASSIF_GL_LDFLAGS = -framework GLKit -framework OpenGLES
|
|
3
|
+
MASSIF_GL_LDFLAGS[sdk=macosx*] =
|
|
4
|
+
OTHER_LDFLAGS=$(inherited) $(MASSIF_GL_LDFLAGS) -framework CoreText
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#import <MassifMaps/MassifMaps.h>
|
|
2
|
+
|
|
3
|
+
// The surface API only exists in an SDK built with all/native/api. Guarding here rather than
|
|
4
|
+
// excluding the file keeps the plugin's object API building against an older MassifMaps pod.
|
|
5
|
+
#if __has_include(<MassifMaps/MSFEventListener.h>)
|
|
6
|
+
#define NSMSF_HAS_SURFACE_API 1
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The surface API's event listener, with the thread hop JavaScript needs.
|
|
10
|
+
*
|
|
11
|
+
* The SDK emits from its render and tile threads and NativeScript has no JavaScript runtime
|
|
12
|
+
* there, so this hops onto the main queue and WAITS - the same dance NSMSFVectorTileEventListener
|
|
13
|
+
* does. Waiting rather than dispatching async is what lets a consuming subscription answer in
|
|
14
|
+
* time, and what keeps the facade's payload alive until the handler has read it.
|
|
15
|
+
*
|
|
16
|
+
* JavaScript overrides -onEventThreaded:event:payload:, never -onEvent:event:payload:.
|
|
17
|
+
*/
|
|
18
|
+
@interface NSMSFApiEventListener : MSFEventListener
|
|
19
|
+
@property(nonatomic, assign) BOOL runOnMainThread;
|
|
20
|
+
- (BOOL)onEventThreaded:(int)target event:(NSString *)event payload:(int)payload;
|
|
21
|
+
@end
|
|
22
|
+
|
|
23
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#import "NSMSFApiEventListener.h"
|
|
2
|
+
|
|
3
|
+
#ifdef NSMSF_HAS_SURFACE_API
|
|
4
|
+
|
|
5
|
+
@implementation NSMSFApiEventListener
|
|
6
|
+
@synthesize runOnMainThread;
|
|
7
|
+
|
|
8
|
+
- (id)init {
|
|
9
|
+
if (self = [super init]) {
|
|
10
|
+
self.runOnMainThread = true;
|
|
11
|
+
}
|
|
12
|
+
return self;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
- (BOOL)onEventThreaded:(int)target event:(NSString *)event payload:(int)payload {
|
|
16
|
+
return NO;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (BOOL)onEvent:(int)target event:(NSString *)event payload:(int)payload {
|
|
20
|
+
// The isMainThread check matters: an event produced ON the main queue (a tap) would deadlock
|
|
21
|
+
// a plain dispatch_sync back onto it.
|
|
22
|
+
if (self.runOnMainThread && ![NSThread isMainThread]) {
|
|
23
|
+
__block BOOL result = NO;
|
|
24
|
+
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
25
|
+
result = [self onEventThreaded:target event:event payload:payload];
|
|
26
|
+
});
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
return [self onEventThreaded:target event:event payload:payload];
|
|
30
|
+
}
|
|
31
|
+
@end
|
|
32
|
+
|
|
33
|
+
#endif
|
|
@@ -14,7 +14,7 @@ class NSMSFFeatureCollectionSearchService: MSFFeatureCollectionSearchService {
|
|
|
14
14
|
func findFeaturesCallback(_ request: MSFSearchRequest!, _ callback: @escaping (_ features: MSFFeatureCollection?) -> Void) {
|
|
15
15
|
DispatchQueue.global(qos: .background).async {
|
|
16
16
|
let result = self.findFeatures(request)
|
|
17
|
-
if (
|
|
17
|
+
if (NSMSFMainThread.RUN_ON_MAIN_THREAD) {
|
|
18
18
|
DispatchQueue.main.async() {
|
|
19
19
|
callback(result)
|
|
20
20
|
}
|
|
@@ -13,7 +13,7 @@ import SwiftTryCatch
|
|
|
13
13
|
@objc(NSMSFGeocodingServiceAdditions)
|
|
14
14
|
@objcMembers
|
|
15
15
|
class NSMSFGeocodingServiceAdditions: NSObject {
|
|
16
|
-
static var runOnMainThread =
|
|
16
|
+
static var runOnMainThread = NSMSFMainThread.RUN_ON_MAIN_THREAD
|
|
17
17
|
static func calculateAddress (_ service: MSFGeocodingService, _ request: MSFGeocodingRequest, _ callback: @escaping (_ result: MSFGeocodingResultVector?, _ error: NSException?) -> Void) {
|
|
18
18
|
DispatchQueue.global(qos: .background).async {
|
|
19
19
|
SwiftTryCatch.try {
|
|
@@ -11,7 +11,7 @@ import MassifMaps
|
|
|
11
11
|
@objc(NSMSFHillshadeRasterTileLayer)
|
|
12
12
|
@objcMembers
|
|
13
13
|
class NSMSFHillshadeRasterTileLayer: MSFHillshadeRasterTileLayer {
|
|
14
|
-
var runOnMainThread =
|
|
14
|
+
var runOnMainThread = NSMSFMainThread.RUN_ON_MAIN_THREAD
|
|
15
15
|
|
|
16
16
|
func getElevation(_ pos: MSFMapPos, callback: @escaping (_ elevation: Double)-> Void) {
|
|
17
17
|
DispatchQueue.global(qos: .background).async {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Whether the plugin's listeners hop to the main thread before calling into JavaScript.
|
|
5
|
+
*
|
|
6
|
+
* It lives on its own rather than on a map view: the SDK calls back from its render, tile and
|
|
7
|
+
* routing queues, and every listener in this plugin - map events, routing, geocoding, search,
|
|
8
|
+
* hillshade, tile downloads - has the same problem whether or not the surface API is in play.
|
|
9
|
+
* It is plugin policy, so it does not belong on the SDK's MSFMapView either.
|
|
10
|
+
*
|
|
11
|
+
* The Obj-C twin of SynchronousHandler.RUN_ON_MAIN_THREAD on Android.
|
|
12
|
+
*/
|
|
13
|
+
@objc(NSMSFMainThread)
|
|
14
|
+
@objcMembers
|
|
15
|
+
public class NSMSFMainThread: NSObject {
|
|
16
|
+
public static var RUN_ON_MAIN_THREAD = true
|
|
17
|
+
|
|
18
|
+
public static func setRunOnMainThread(value: Bool) {
|
|
19
|
+
RUN_ON_MAIN_THREAD = value
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -13,7 +13,7 @@ import SwiftTryCatch
|
|
|
13
13
|
@objc(NSMSFRoutingServiceAdditions)
|
|
14
14
|
@objcMembers
|
|
15
15
|
class NSMSFRoutingServiceAdditions: NSObject {
|
|
16
|
-
static var runOnMainThread =
|
|
16
|
+
static var runOnMainThread = NSMSFMainThread.RUN_ON_MAIN_THREAD
|
|
17
17
|
|
|
18
18
|
public static func stringifyRouteResult(_ result: MSFRoutingResult?)-> String? {
|
|
19
19
|
if ((result) != nil) {
|
|
@@ -9,7 +9,7 @@ class NSMSFVectorTileSearchService: MSFVectorTileSearchService {
|
|
|
9
9
|
DispatchQueue.global(qos: .background).async {
|
|
10
10
|
SwiftTryCatch.try {
|
|
11
11
|
let result = self.findFeatures(request)
|
|
12
|
-
if (
|
|
12
|
+
if (NSMSFMainThread.RUN_ON_MAIN_THREAD) {
|
|
13
13
|
DispatchQueue.main.async() {
|
|
14
14
|
callback(result, nil)
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../src/ui-massifmaps/projections/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,gBAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,IAAI,cAAc,EAA+B,OAAO,IAAI,cAAc,EAA6B,SAAS,IAAI,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACjM,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,OAAgB,eAAsE,SAAQ,cAAoB;IACpH,SAAS,CAAC,QAAgB;QACtB,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,CAAC,QAAgB;QACpB,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,WAAW,CAAC,QAAQ,EAAE,SAAS;QAC3B,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,SAAS,CAAC,CAAC,EAAE,CAAC;QACV,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC;CACJ;AAED,MAAM,OAAO,UAAW,SAAQ,eAAiD;CAAG;
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../src/ui-massifmaps/projections/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,gBAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,IAAI,cAAc,EAA+B,OAAO,IAAI,cAAc,EAA6B,SAAS,IAAI,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACjM,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,OAAgB,eAAsE,SAAQ,cAAoB;IACpH,SAAS,CAAC,QAAgB;QACtB,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,CAAC,QAAgB;QACpB,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,WAAW,CAAC,QAAQ,EAAE,SAAS;QAC3B,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,SAAS,CAAC,CAAC,EAAE,CAAC;QACV,OAAO,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC;CACJ;AAED,MAAM,OAAO,UAAW,SAAQ,eAAiD;CAAG;AAIpF,UAAU,CAAC,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;AAG3F,UAAU,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC"}
|
package/renderers/index.d.ts
CHANGED
|
@@ -3,18 +3,11 @@ import { BaseNative } from '..';
|
|
|
3
3
|
import { Accessors as Acc_PostProcessEffect, Methods as Met_PostProcessEffect } from '../bindings/renderers/PostProcessEffect';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The SDK provides the mechanism - an offscreen colour buffer, optionally the packed
|
|
9
|
-
* terrain depth, and named float/colour parameters - and the application provides the
|
|
10
|
-
* look, as a shader string. Install one with `map.setPostProcessEffect(effect)`, and
|
|
11
|
-
* `map.setPostProcessEffect(null)` to take it off again.
|
|
12
|
-
*
|
|
13
|
-
* The shader always sees `uColorTex`, `uInvScreenSize`, `uProjInvScale` and `uFar`;
|
|
14
|
-
* `uTerrainDepthTex` only exists when `terrainDepthRequired` is set.
|
|
6
|
+
* Full-screen fragment shader run on the finished frame. It always sees `uColorTex`, `uInvScreenSize`,
|
|
7
|
+
* `uProjInvScale` and `uFar`; `uTerrainDepthTex` only exists when `terrainDepthRequired` is set.
|
|
15
8
|
*/
|
|
16
9
|
export interface PostProcessEffectOptions {
|
|
17
|
-
/**
|
|
10
|
+
/** a new name forces a shader rebuild */
|
|
18
11
|
name: string;
|
|
19
12
|
/** the fragment shader source, `void main(void)` and all */
|
|
20
13
|
fragmentShader: string;
|
|
@@ -9,23 +9,23 @@ import { Accessors as Acc_ValhallaOnlineRoutingService, Methods as Met_ValhallaO
|
|
|
9
9
|
import { Accessors as Acc_PackageManagerValhallaRoutingService, Methods as Met_PackageManagerValhallaRoutingService } from '../bindings/routing/PackageManagerValhallaRoutingService';
|
|
10
10
|
import { Accessors as Acc_RoutingService, Methods as Met_RoutingService } from '../bindings/routing/RoutingService';
|
|
11
11
|
export declare const RoutingAction: {
|
|
12
|
-
readonly HEAD_ON:
|
|
13
|
-
readonly FINISH:
|
|
14
|
-
readonly NO_TURN:
|
|
15
|
-
readonly GO_STRAIGHT:
|
|
16
|
-
readonly TURN_RIGHT:
|
|
17
|
-
readonly UTURN:
|
|
18
|
-
readonly TURN_LEFT:
|
|
19
|
-
readonly REACH_VIA_LOCATION:
|
|
20
|
-
readonly ENTER_ROUNDABOUT:
|
|
21
|
-
readonly LEAVE_ROUNDABOUT:
|
|
22
|
-
readonly STAY_ON_ROUNDABOUT:
|
|
23
|
-
readonly START_AT_END_OF_STREET:
|
|
24
|
-
readonly ENTER_AGAINST_ALLOWED_DIRECTION:
|
|
25
|
-
readonly LEAVE_AGAINST_ALLOWED_DIRECTION:
|
|
26
|
-
readonly GO_UP:
|
|
27
|
-
readonly GO_DOWN:
|
|
28
|
-
readonly WAIT:
|
|
12
|
+
readonly HEAD_ON: number;
|
|
13
|
+
readonly FINISH: number;
|
|
14
|
+
readonly NO_TURN: number;
|
|
15
|
+
readonly GO_STRAIGHT: number;
|
|
16
|
+
readonly TURN_RIGHT: number;
|
|
17
|
+
readonly UTURN: number;
|
|
18
|
+
readonly TURN_LEFT: number;
|
|
19
|
+
readonly REACH_VIA_LOCATION: number;
|
|
20
|
+
readonly ENTER_ROUNDABOUT: number;
|
|
21
|
+
readonly LEAVE_ROUNDABOUT: number;
|
|
22
|
+
readonly STAY_ON_ROUNDABOUT: number;
|
|
23
|
+
readonly START_AT_END_OF_STREET: number;
|
|
24
|
+
readonly ENTER_AGAINST_ALLOWED_DIRECTION: number;
|
|
25
|
+
readonly LEAVE_AGAINST_ALLOWED_DIRECTION: number;
|
|
26
|
+
readonly GO_UP: number;
|
|
27
|
+
readonly GO_DOWN: number;
|
|
28
|
+
readonly WAIT: number;
|
|
29
29
|
};
|
|
30
30
|
declare abstract class RoutingService<T extends com.massifmaps.routing.RoutingService, U extends RoutingServiceOptions> extends BaseRoutingService<T, U> {
|
|
31
31
|
profile: string;
|