@rnmapbox/maps 10.2.0-beta.3 → 10.2.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/android/src/main/mapbox-v11-compat/v11/com/rnmapbox/rnmbx/v11compat/Annotation.kt +1 -1
- package/ios/RNMBX/RNMBXMapViewComponentView.mm +8 -3
- package/lib/module/components/MarkerView.js +2 -2
- package/lib/module/components/MarkerView.js.map +1 -1
- package/lib/module/components/codeparts/LayerPropsCommon.codepart-tsx +1 -1
- package/lib/typescript/src/components/BackgroundLayer.d.ts +1 -1
- package/lib/typescript/src/components/CircleLayer.d.ts +1 -1
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts +1 -1
- package/lib/typescript/src/components/FillLayer.d.ts +1 -1
- package/lib/typescript/src/components/HeatmapLayer.d.ts +1 -1
- package/lib/typescript/src/components/ImageSource.d.ts +1 -1
- package/lib/typescript/src/components/LineLayer.d.ts +1 -1
- package/lib/typescript/src/components/ModelLayer.d.ts +1 -1
- package/lib/typescript/src/components/RasterDemSource.d.ts +1 -1
- package/lib/typescript/src/components/RasterLayer.d.ts +1 -1
- package/lib/typescript/src/components/RasterSource.d.ts +1 -1
- package/lib/typescript/src/components/ShapeSource.d.ts +1 -1
- package/lib/typescript/src/components/SkyLayer.d.ts +1 -1
- package/lib/typescript/src/components/SymbolLayer.d.ts +1 -1
- package/lib/typescript/src/components/VectorSource.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/BackgroundLayer.tsx +1 -1
- package/src/components/CircleLayer.tsx +1 -1
- package/src/components/FillExtrusionLayer.tsx +1 -1
- package/src/components/FillLayer.tsx +1 -1
- package/src/components/HeatmapLayer.tsx +1 -1
- package/src/components/ImageSource.tsx +1 -1
- package/src/components/LineLayer.tsx +1 -1
- package/src/components/MarkerView.tsx +3 -3
- package/src/components/ModelLayer.tsx +1 -1
- package/src/components/RasterDemSource.tsx +1 -1
- package/src/components/RasterLayer.tsx +1 -1
- package/src/components/RasterSource.tsx +1 -1
- package/src/components/ShapeSource.tsx +1 -1
- package/src/components/SkyLayer.tsx +1 -1
- package/src/components/SymbolLayer.tsx +1 -1
- package/src/components/VectorSource.tsx +1 -1
- package/src/components/codeparts/LayerPropsCommon.codepart-tsx +1 -1
|
@@ -23,7 +23,7 @@ fun ViewAnnotationOptions.Builder.geometry(point: Geometry): ViewAnnotationOptio
|
|
|
23
23
|
|
|
24
24
|
fun ViewAnnotationOptions.Builder.offsets(x: Double, y: Double) {
|
|
25
25
|
this.variableAnchors(listOf(
|
|
26
|
-
ViewAnnotationAnchorConfig.Builder().anchor(ViewAnnotationAnchor.CENTER).
|
|
26
|
+
ViewAnnotationAnchorConfig.Builder().anchor(ViewAnnotationAnchor.CENTER).offsetX(x).offsetY(y).build()
|
|
27
27
|
))
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -50,6 +50,7 @@ using namespace facebook::react;
|
|
|
50
50
|
RNMBXMapView *_view;
|
|
51
51
|
RNMBXMapViewEventDispatcher *_eventDispatcher;
|
|
52
52
|
CGRect _frame;
|
|
53
|
+
id _lastStyleURL;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
@@ -135,7 +136,7 @@ using namespace facebook::react;
|
|
|
135
136
|
{
|
|
136
137
|
const auto &oldViewProps = static_cast<const RNMBXMapViewProps &>(*oldProps);
|
|
137
138
|
const auto &newViewProps = static_cast<const RNMBXMapViewProps &>(*props);
|
|
138
|
-
|
|
139
|
+
|
|
139
140
|
RNMBX_REMAP_OPTIONAL_PROP_BOOL(attributionEnabled, reactAttributionEnabled)
|
|
140
141
|
|
|
141
142
|
id attributionPosition = RNMBXConvertFollyDynamicToId(newViewProps.attributionPosition);
|
|
@@ -187,7 +188,7 @@ using namespace facebook::react;
|
|
|
187
188
|
RNMBX_REMAP_OPTIONAL_PROP_BOOL(scrollEnabled, reactScrollEnabled)
|
|
188
189
|
|
|
189
190
|
RNMBX_REMAP_OPTIONAL_PROP_BOOL(rotateEnabled, reactRotateEnabled)
|
|
190
|
-
|
|
191
|
+
|
|
191
192
|
RNMBX_REMAP_OPTIONAL_PROP_BOOL(pitchEnabled, reactPitchEnabled)
|
|
192
193
|
|
|
193
194
|
id preferredFramesPerSecond = RNMBXConvertFollyDynamicToId(newViewProps.preferredFramesPerSecond);
|
|
@@ -209,7 +210,10 @@ using namespace facebook::react;
|
|
|
209
210
|
|
|
210
211
|
id styleURL = RNMBXConvertFollyDynamicToId(newViewProps.styleURL);
|
|
211
212
|
if (styleURL != nil) {
|
|
212
|
-
|
|
213
|
+
if (_lastStyleURL == nil || ![_lastStyleURL isEqual:styleURL]) {
|
|
214
|
+
_view.reactStyleURL = styleURL;
|
|
215
|
+
_lastStyleURL = styleURL;
|
|
216
|
+
}
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
[super updateProps:props oldProps:oldProps];
|
|
@@ -220,6 +224,7 @@ using namespace facebook::react;
|
|
|
220
224
|
- (void)prepareForRecycle
|
|
221
225
|
{
|
|
222
226
|
[super prepareForRecycle];
|
|
227
|
+
_lastStyleURL = nil;
|
|
223
228
|
[self prepareView];
|
|
224
229
|
}
|
|
225
230
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { NativeModules, Platform } from 'react-native';
|
|
5
|
-
import
|
|
5
|
+
import RNMBXMakerViewContentComponent from '../specs/RNMBXMarkerViewContentNativeComponent';
|
|
6
6
|
import NativeMarkerViewComponent from '../specs/RNMBXMarkerViewNativeComponent';
|
|
7
7
|
import { toJSONString } from "../utils/index.js";
|
|
8
8
|
import { makePoint } from "../utils/geoUtils.js";
|
|
@@ -75,7 +75,7 @@ class MarkerView extends React.PureComponent {
|
|
|
75
75
|
onTouchEnd: e => {
|
|
76
76
|
e.stopPropagation();
|
|
77
77
|
},
|
|
78
|
-
children: /*#__PURE__*/_jsx(
|
|
78
|
+
children: /*#__PURE__*/_jsx(RNMBXMakerViewContentComponent, {
|
|
79
79
|
collapsable: false,
|
|
80
80
|
style: {
|
|
81
81
|
flex: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","NativeModules","Platform","
|
|
1
|
+
{"version":3,"names":["React","NativeModules","Platform","RNMBXMakerViewContentComponent","NativeMarkerViewComponent","toJSONString","makePoint","PointAnnotation","jsx","_jsx","Mapbox","RNMBXModule","MarkerView","PureComponent","defaultProps","anchor","x","y","allowOverlap","allowOverlapWithPuck","isSelected","lastId","_idForPointAnnotation","__idForPointAnnotation","undefined","_getCoordinate","coordinate","render","props","console","warn","OS","MapboxV10","id","RNMBXMarkerView","style","flex","alignSelf","Number","onTouchEnd","e","stopPropagation","children","collapsable","onStartShouldSetResponder","_event"],"sourceRoot":"../../../src","sources":["components/MarkerView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,QAAQ,QAAwB,cAAc;AAEtE,OAAOC,8BAA8B,MAAM,gDAAgD;AAC3F,OAAOC,yBAAyB,MAAM,yCAAyC;AAE/E,SAASC,YAAY,QAAQ,mBAAU;AACvC,SAASC,SAAS,QAAQ,sBAAmB;AAE7C,OAAOC,eAAe,MAAM,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhD,MAAMC,MAAM,GAAGT,aAAa,CAACU,WAAW;AAuCxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,UAAU,SAASZ,KAAK,CAACa,aAAa,CAAQ;EAClD,OAAOC,YAAY,GAAmB;IACpCC,MAAM,EAAE;MAAEC,CAAC,EAAE,GAAG;MAAEC,CAAC,EAAE;IAAI,CAAC;IAC1BC,YAAY,EAAE,KAAK;IACnBC,oBAAoB,EAAE,KAAK;IAC3BC,UAAU,EAAE;EACd,CAAC;EAED,OAAOC,MAAM,GAAG,CAAC;EAGjBC,qBAAqBA,CAAA,EAAW;IAC9B,IAAI,IAAI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ACD,IAAI,CAACT,KAAK,CAACO,KAAK,CAChB;MACFT,UAAU,EAAE,CACVY,MAAM,CAAC,IAAI,CAACV,KAAK,CAACF,UAAU,CAAC,CAAC,CAAC,CAAC,EAChCY,MAAM,CAAC,IAAI,CAACV,KAAK,CAACF,UAAU,CAAC,CAAC,CAAC,CAAC,CAChC;MACFX,MAAM,EAAEA,MAAO;MACfG,YAAY,EAAE,IAAI,CAACU,KAAK,CAACV,YAAa;MACtCC,oBAAoB,EAAE,IAAI,CAACS,KAAK,CAACT,oBAAqB;MACtDC,UAAU,EAAE,IAAI,CAACQ,KAAK,CAACR,UAAW;MAClCmB,UAAU,EAAGC,CAAC,IAAK;QACjBA,CAAC,CAACC,eAAe,CAAC,CAAC;MACrB,CAAE;MAAAC,QAAA,eAEFjC,IAAA,CAACN,8BAA8B;QAC7BwC,WAAW,EAAE,KAAM;QACnBR,KAAK,EAAE;UAAEC,IAAI,EAAE,CAAC;UAAEC,SAAS,EAAE;QAAa,CAAE;QAC5CO,yBAAyB,EAAGC,MAAM,IAAK;UACrC,OAAO,IAAI;QACb,CAAE;QACFN,UAAU,EAAGC,CAAC,IAAK;UACjBA,CAAC,CAACC,eAAe,CAAC,CAAC;QACrB,CAAE;QAAAC,QAAA,EAED,IAAI,CAACd,KAAK,CAACc;MAAQ,CACU;IAAC,CAClB,CAAC;EAEtB;AACF;AAEA,MAAMR,eAAe,GAAG9B,yBAAyB;AAEjD,eAAeQ,UAAU","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnmapbox/maps",
|
|
3
|
-
"version": "10.2.0
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "Community-supported, open-source React Native library for building maps using Mapbox native maps SDK for iOS and Android",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NativeModules, Platform, type ViewProps } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import RNMBXMakerViewContentComponent from '../specs/RNMBXMarkerViewContentNativeComponent';
|
|
5
5
|
import NativeMarkerViewComponent from '../specs/RNMBXMarkerViewNativeComponent';
|
|
6
6
|
import { type Position } from '../types/Position';
|
|
7
7
|
import { toJSONString } from '../utils';
|
|
@@ -128,7 +128,7 @@ class MarkerView extends React.PureComponent<Props> {
|
|
|
128
128
|
e.stopPropagation();
|
|
129
129
|
}}
|
|
130
130
|
>
|
|
131
|
-
<
|
|
131
|
+
<RNMBXMakerViewContentComponent
|
|
132
132
|
collapsable={false}
|
|
133
133
|
style={{ flex: 0, alignSelf: 'flex-start' }}
|
|
134
134
|
onStartShouldSetResponder={(_event) => {
|
|
@@ -139,7 +139,7 @@ class MarkerView extends React.PureComponent<Props> {
|
|
|
139
139
|
}}
|
|
140
140
|
>
|
|
141
141
|
{this.props.children}
|
|
142
|
-
</
|
|
142
|
+
</RNMBXMakerViewContentComponent>
|
|
143
143
|
</RNMBXMarkerView>
|
|
144
144
|
);
|
|
145
145
|
}
|