@rnmapbox/maps 10.0.0-beta.44 → 10.0.0-beta.46
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/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/RCTMGLPackage.java +0 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerView.kt +162 -51
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerViewManager.kt +10 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLPointAnnotation.kt +6 -6
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraStop.kt +5 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/images/RCTMGLImages.kt +22 -2
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +17 -19
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyle.kt +1 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/modules/CustomHttpHeaders.kt +38 -0
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/modules/RCTMGLModule.kt +12 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/utils/DownloadMapImageTask.kt +2 -1
- package/docs/MapboxGL.md +1 -1
- package/docs/MarkerView.md +17 -10
- package/docs/PointAnnotation.md +1 -1
- package/docs/SymbolLayer.md +1 -1
- package/docs/docs.json +116 -102
- package/index.d.ts +1 -0
- package/ios/RCTMGL-v10/RCTLog.swift +5 -5
- package/ios/RCTMGL-v10/RCTMGLMapView.swift +70 -9
- package/ios/RCTMGL-v10/RCTMGLMapViewManager.swift +2 -2
- package/ios/RCTMGL-v10/RCTMGLMarkerView.swift +186 -105
- package/ios/RCTMGL-v10/RCTMGLMarkerViewManager.m +2 -1
- package/ios/RCTMGL-v10/RCTMGLShapeSourceManager.swift +1 -1
- package/ios/RCTMGL-v10/RCTMGLUtils.swift +1 -1
- package/ios/RCTMGL-v10/RCTMGLVectorLayer.swift +1 -1
- package/javascript/components/AbstractLayer.tsx +6 -3
- package/javascript/components/MarkerView.tsx +81 -77
- package/javascript/components/PointAnnotation.tsx +1 -1
- package/javascript/components/SymbolLayer.tsx +2 -2
- package/javascript/utils/index.d.ts +3 -3
- package/package.json +1 -1
- package/scripts/autogenHelpers/DocJSONBuilder.js +17 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerViewWrapper.kt +0 -8
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/annotation/RCTMGLMarkerViewWrapperManager.kt +0 -21
- package/ios/RCTMGL-v10/RCTMGLMarkerViewWrapper.swift +0 -24
- package/ios/RCTMGL-v10/RCTMGLMarkerViewWrapperManager.m +0 -8
- package/ios/RCTMGL-v10/RCTMGLMarkerViewWrapperManager.swift +0 -14
|
@@ -48,6 +48,7 @@ class DocJSONBuilder {
|
|
|
48
48
|
return {
|
|
49
49
|
match: fileExtensionsRegex,
|
|
50
50
|
shortName: true,
|
|
51
|
+
sort: true,
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -422,6 +423,18 @@ class DocJSONBuilder {
|
|
|
422
423
|
});
|
|
423
424
|
}
|
|
424
425
|
|
|
426
|
+
sortObject(not_sorted) {
|
|
427
|
+
return Object.keys(not_sorted)
|
|
428
|
+
.sort()
|
|
429
|
+
.reduce(
|
|
430
|
+
(acc, key) => ({
|
|
431
|
+
...acc,
|
|
432
|
+
[key]: not_sorted[key],
|
|
433
|
+
}),
|
|
434
|
+
{},
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
|
|
425
438
|
async generate() {
|
|
426
439
|
this.generateModulesTask({}, MODULES_PATH);
|
|
427
440
|
|
|
@@ -433,7 +446,10 @@ class DocJSONBuilder {
|
|
|
433
446
|
];
|
|
434
447
|
|
|
435
448
|
return Promise.all(tasks).then(() => {
|
|
436
|
-
fs.writeFileSync(
|
|
449
|
+
fs.writeFileSync(
|
|
450
|
+
OUTPUT_PATH,
|
|
451
|
+
JSON.stringify(this.sortObject(results), null, 2),
|
|
452
|
+
);
|
|
437
453
|
return true;
|
|
438
454
|
});
|
|
439
455
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
package com.mapbox.rctmgl.components.annotation
|
|
2
|
-
import android.content.Context
|
|
3
|
-
import android.util.Log
|
|
4
|
-
import android.view.View
|
|
5
|
-
import com.facebook.react.views.view.ReactViewGroup
|
|
6
|
-
|
|
7
|
-
class RCTMGLMarkerViewWrapper(context: Context?, private val mManager: RCTMGLMarkerViewWrapperManager) : ReactViewGroup(context) {
|
|
8
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
package com.mapbox.rctmgl.components.annotation
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
5
|
-
import com.facebook.react.uimanager.ViewGroupManager
|
|
6
|
-
|
|
7
|
-
class RCTMGLMarkerViewWrapperManager(reactApplicationContext: ReactApplicationContext?) :
|
|
8
|
-
ViewGroupManager<RCTMGLMarkerViewWrapper>() {
|
|
9
|
-
|
|
10
|
-
override fun getName(): String {
|
|
11
|
-
return REACT_CLASS
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLMarkerViewWrapper {
|
|
15
|
-
return RCTMGLMarkerViewWrapper(reactContext, this)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
companion object {
|
|
19
|
-
const val REACT_CLASS = "RCTMGLMarkerViewWrapper"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import MapboxMaps
|
|
2
|
-
|
|
3
|
-
class RCTMGLMarkerViewWrapper : UIView {
|
|
4
|
-
var anchorX : CGFloat? = nil
|
|
5
|
-
var anchorY : CGFloat? = nil
|
|
6
|
-
|
|
7
|
-
override func reactSetFrame(_ frame: CGRect) {
|
|
8
|
-
let oldFrame = self.frame
|
|
9
|
-
let newSize = frame.size
|
|
10
|
-
let oldSize = oldFrame.size
|
|
11
|
-
|
|
12
|
-
if let anchorX = anchorX, let anchorY = anchorY {
|
|
13
|
-
let oldCenter = CGPoint(x: oldFrame.origin.x + oldSize.width * anchorX,
|
|
14
|
-
y: oldFrame.origin.y + oldSize.height * anchorY)
|
|
15
|
-
|
|
16
|
-
let newFrame = CGRect(origin: CGPoint(x: oldCenter.x-anchorX * newSize.width,y: oldCenter.y-anchorY * newSize.height), size: newSize)
|
|
17
|
-
self.frame = newFrame
|
|
18
|
-
} else {
|
|
19
|
-
super.reactSetFrame(frame)
|
|
20
|
-
let newFrame = CGRect(origin: oldFrame.origin, size: newSize)
|
|
21
|
-
self.frame = newFrame
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import Foundation
|
|
2
|
-
import MapboxMaps
|
|
3
|
-
|
|
4
|
-
@objc(RCTMGLMarkerViewWrapperManager)
|
|
5
|
-
class RCTMGLMarkerViewWrapperManager : RCTViewManager {
|
|
6
|
-
@objc
|
|
7
|
-
override static func requiresMainQueueSetup() -> Bool {
|
|
8
|
-
return true
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
override func view() -> UIView! {
|
|
12
|
-
return RCTMGLMarkerViewWrapper()
|
|
13
|
-
}
|
|
14
|
-
}
|