@rnmapbox/maps 10.0.0-beta.60 → 10.0.0-beta.62
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/build.gradle +1 -1
- package/android/rctmgl/src/main/java-mapboxgl/common/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +0 -55
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +2 -1
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +0 -55
- package/index.d.ts +7 -0
- package/ios/RCTMGL/RCTMGLStyle.h +0 -5
- package/ios/RCTMGL/RCTMGLStyle.m +0 -35
- package/ios/RCTMGL-v10/MGLModule.swift +1 -0
- package/ios/RCTMGL-v10/RCTMGLAtmosphere.swift +3 -2
- package/ios/RCTMGL-v10/RCTMGLCircleLayer.swift +3 -3
- package/ios/RCTMGL-v10/RCTMGLEvent.swift +1 -0
- package/ios/RCTMGL-v10/RCTMGLFillExtrustionLayer.swift +4 -4
- package/ios/RCTMGL-v10/RCTMGLFillLayer.swift +4 -3
- package/ios/RCTMGL-v10/RCTMGLHeatmapLayer.swift +5 -4
- package/ios/RCTMGL-v10/RCTMGLLocationModule.swift +4 -2
- package/ios/RCTMGL-v10/RCTMGLMapView.swift +27 -2
- package/ios/RCTMGL-v10/RCTMGLRasterLayer.swift +3 -2
- package/ios/RCTMGL-v10/RCTMGLStyle.swift +0 -35
- package/ios/RCTMGL-v10/RCTMGLSymbolLayer.swift +1 -1
- package/ios/RCTMGL-v10/RCTMGLTerrain.swift +3 -2
- package/ios/RCTMGL.xcodeproj/project.pbxproj +1 -0
- package/javascript/components/UserLocation.js +2 -2
- package/javascript/index.js +3 -0
- package/javascript/modules/location/locationManager.js +13 -1
- package/javascript/utils/MapboxStyles.d.ts +27 -31
- package/javascript/utils/{filterUtils.tsx → filterUtils.ts} +0 -0
- package/javascript/utils/getAnnotationsLayerID.ts +16 -0
- package/javascript/utils/styleMap.ts +0 -45
- package/lib/commonjs/components/UserLocation.js +1 -1
- package/lib/commonjs/components/UserLocation.js.map +1 -1
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/location/locationManager.js +8 -1
- package/lib/commonjs/modules/location/locationManager.js.map +1 -1
- package/lib/commonjs/utils/filterUtils.js.map +1 -1
- package/lib/commonjs/utils/getAnnotationsLayerID.js +21 -0
- package/lib/commonjs/utils/getAnnotationsLayerID.js.map +1 -0
- package/lib/commonjs/utils/styleMap.js +1 -41
- package/lib/commonjs/utils/styleMap.js.map +1 -1
- package/lib/commonjs/web/UnimplementedComponent.js.map +1 -1
- package/lib/module/components/UserLocation.js +1 -1
- package/lib/module/components/UserLocation.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/location/locationManager.js +8 -1
- package/lib/module/modules/location/locationManager.js.map +1 -1
- package/lib/module/utils/filterUtils.js.map +1 -1
- package/lib/module/utils/getAnnotationsLayerID.js +15 -0
- package/lib/module/utils/getAnnotationsLayerID.js.map +1 -0
- package/lib/module/utils/styleMap.js +1 -41
- package/lib/module/utils/styleMap.js.map +1 -1
- package/lib/module/web/UnimplementedComponent.js.map +1 -1
- package/lib/typescript/utils/filterUtils.d.ts.map +1 -1
- package/lib/typescript/utils/getAnnotationsLayerID.d.ts +2 -0
- package/lib/typescript/utils/getAnnotationsLayerID.d.ts.map +1 -0
- package/lib/typescript/utils/styleMap.d.ts +0 -40
- package/lib/typescript/utils/styleMap.d.ts.map +1 -1
- package/package.json +2 -2
- package/plugin/build/withMapbox.d.ts +1 -1
- package/plugin/build/withMapbox.js +46 -59
- package/plugin/src/withMapbox.ts +62 -65
- package/react-native.config.js +0 -3
- package/rnmapbox-maps.podspec +1 -1
|
@@ -130,7 +130,7 @@ dependencies {
|
|
|
130
130
|
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.1.0'
|
|
131
131
|
}
|
|
132
132
|
else if (safeExtGet("RNMapboxMapsImpl", defaultMapboxMapsImpl) == "mapbox") {
|
|
133
|
-
implementation 'com.mapbox.maps:android:10.
|
|
133
|
+
implementation 'com.mapbox.maps:android:10.10.0'
|
|
134
134
|
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:6.8.0'
|
|
135
135
|
implementation 'androidx.asynclayoutinflater:asynclayoutinflater:1.0.0'
|
|
136
136
|
}
|
|
@@ -80,9 +80,6 @@ public class RCTMGLStyleFactory {
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
break;
|
|
83
|
-
case "fillPatternTransition":
|
|
84
|
-
RCTMGLStyleFactory.setFillPatternTransition(layer, styleValue);
|
|
85
|
-
break;
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
85
|
}
|
|
@@ -163,9 +160,6 @@ public class RCTMGLStyleFactory {
|
|
|
163
160
|
case "lineDasharray":
|
|
164
161
|
RCTMGLStyleFactory.setLineDasharray(layer, styleValue);
|
|
165
162
|
break;
|
|
166
|
-
case "lineDasharrayTransition":
|
|
167
|
-
RCTMGLStyleFactory.setLineDasharrayTransition(layer, styleValue);
|
|
168
|
-
break;
|
|
169
163
|
case "linePattern":
|
|
170
164
|
style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() {
|
|
171
165
|
@Override
|
|
@@ -174,9 +168,6 @@ public class RCTMGLStyleFactory {
|
|
|
174
168
|
}
|
|
175
169
|
});
|
|
176
170
|
break;
|
|
177
|
-
case "linePatternTransition":
|
|
178
|
-
RCTMGLStyleFactory.setLinePatternTransition(layer, styleValue);
|
|
179
|
-
break;
|
|
180
171
|
case "lineGradient":
|
|
181
172
|
RCTMGLStyleFactory.setLineGradient(layer, styleValue);
|
|
182
173
|
break;
|
|
@@ -564,9 +555,6 @@ public class RCTMGLStyleFactory {
|
|
|
564
555
|
}
|
|
565
556
|
});
|
|
566
557
|
break;
|
|
567
|
-
case "fillExtrusionPatternTransition":
|
|
568
|
-
RCTMGLStyleFactory.setFillExtrusionPatternTransition(layer, styleValue);
|
|
569
|
-
break;
|
|
570
558
|
case "fillExtrusionHeight":
|
|
571
559
|
RCTMGLStyleFactory.setFillExtrusionHeight(layer, styleValue);
|
|
572
560
|
break;
|
|
@@ -719,9 +707,6 @@ public class RCTMGLStyleFactory {
|
|
|
719
707
|
}
|
|
720
708
|
});
|
|
721
709
|
break;
|
|
722
|
-
case "backgroundPatternTransition":
|
|
723
|
-
RCTMGLStyleFactory.setBackgroundPatternTransition(layer, styleValue);
|
|
724
|
-
break;
|
|
725
710
|
case "backgroundOpacity":
|
|
726
711
|
RCTMGLStyleFactory.setBackgroundOpacity(layer, styleValue);
|
|
727
712
|
break;
|
|
@@ -871,14 +856,6 @@ public class RCTMGLStyleFactory {
|
|
|
871
856
|
}
|
|
872
857
|
}
|
|
873
858
|
|
|
874
|
-
|
|
875
|
-
public static void setFillPatternTransition(FillLayer layer, RCTMGLStyleValue styleValue) {
|
|
876
|
-
TransitionOptions transition = styleValue.getTransition();
|
|
877
|
-
if (transition != null) {
|
|
878
|
-
layer.setFillPatternTransition(transition);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
|
|
882
859
|
public static void setLineCap(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
883
860
|
if (styleValue.isExpression()) {
|
|
884
861
|
layer.setProperties(PropertyFactory.lineCap(styleValue.getExpression()));
|
|
@@ -1051,14 +1028,6 @@ public class RCTMGLStyleFactory {
|
|
|
1051
1028
|
}
|
|
1052
1029
|
}
|
|
1053
1030
|
|
|
1054
|
-
|
|
1055
|
-
public static void setLineDasharrayTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1056
|
-
TransitionOptions transition = styleValue.getTransition();
|
|
1057
|
-
if (transition != null) {
|
|
1058
|
-
layer.setLineDasharrayTransition(transition);
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
1031
|
public static void setLinePattern(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1063
1032
|
if (styleValue.isExpression()) {
|
|
1064
1033
|
if (styleValue.isImageStringValue()) {
|
|
@@ -1071,14 +1040,6 @@ public class RCTMGLStyleFactory {
|
|
|
1071
1040
|
}
|
|
1072
1041
|
}
|
|
1073
1042
|
|
|
1074
|
-
|
|
1075
|
-
public static void setLinePatternTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1076
|
-
TransitionOptions transition = styleValue.getTransition();
|
|
1077
|
-
if (transition != null) {
|
|
1078
|
-
layer.setLinePatternTransition(transition);
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
1043
|
public static void setLineGradient(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1083
1044
|
if (styleValue.isExpression()) {
|
|
1084
1045
|
layer.setProperties(PropertyFactory.lineGradient(styleValue.getExpression()));
|
|
@@ -1927,14 +1888,6 @@ public class RCTMGLStyleFactory {
|
|
|
1927
1888
|
}
|
|
1928
1889
|
}
|
|
1929
1890
|
|
|
1930
|
-
|
|
1931
|
-
public static void setFillExtrusionPatternTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
|
|
1932
|
-
TransitionOptions transition = styleValue.getTransition();
|
|
1933
|
-
if (transition != null) {
|
|
1934
|
-
layer.setFillExtrusionPatternTransition(transition);
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
1891
|
public static void setFillExtrusionHeight(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
|
|
1939
1892
|
if (styleValue.isExpression()) {
|
|
1940
1893
|
layer.setProperties(PropertyFactory.fillExtrusionHeight(styleValue.getExpression()));
|
|
@@ -2207,14 +2160,6 @@ public class RCTMGLStyleFactory {
|
|
|
2207
2160
|
}
|
|
2208
2161
|
}
|
|
2209
2162
|
|
|
2210
|
-
|
|
2211
|
-
public static void setBackgroundPatternTransition(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
|
|
2212
|
-
TransitionOptions transition = styleValue.getTransition();
|
|
2213
|
-
if (transition != null) {
|
|
2214
|
-
layer.setBackgroundPatternTransition(transition);
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
2163
|
public static void setBackgroundOpacity(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
|
|
2219
2164
|
if (styleValue.isExpression()) {
|
|
2220
2165
|
layer.setProperties(PropertyFactory.backgroundOpacity(styleValue.getExpression()));
|
package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt
CHANGED
|
@@ -29,6 +29,7 @@ import com.mapbox.maps.extension.style.layers.properties.generated.Visibility
|
|
|
29
29
|
import com.mapbox.maps.extension.style.projection.generated.Projection
|
|
30
30
|
import com.mapbox.maps.extension.style.projection.generated.setProjection
|
|
31
31
|
import com.mapbox.maps.plugin.annotation.Annotation
|
|
32
|
+
import com.mapbox.maps.plugin.annotation.AnnotationConfig
|
|
32
33
|
import com.mapbox.maps.plugin.annotation.annotations
|
|
33
34
|
import com.mapbox.maps.plugin.annotation.generated.*
|
|
34
35
|
import com.mapbox.maps.plugin.attribution.attribution
|
|
@@ -125,7 +126,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
|
|
|
125
126
|
gesturesPlugin.removeOnMapClickListener(_this)
|
|
126
127
|
gesturesPlugin.removeOnMapLongClickListener(_this)
|
|
127
128
|
|
|
128
|
-
mPointAnnotationManager = annotations.createPointAnnotationManager()
|
|
129
|
+
mPointAnnotationManager = annotations.createPointAnnotationManager(AnnotationConfig(layerId = "rctmgl-mapview-annotations"))
|
|
129
130
|
mPointAnnotationManager?.addClickListener(OnPointAnnotationClickListener { pointAnnotation ->
|
|
130
131
|
onMarkerClick(pointAnnotation)
|
|
131
132
|
false
|
package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java
CHANGED
|
@@ -91,9 +91,6 @@ public class RCTMGLStyleFactory {
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
break;
|
|
94
|
-
case "fillPatternTransition":
|
|
95
|
-
RCTMGLStyleFactory.setFillPatternTransition(layer, styleValue);
|
|
96
|
-
break;
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
96
|
}
|
|
@@ -174,9 +171,6 @@ public class RCTMGLStyleFactory {
|
|
|
174
171
|
case "lineDasharray":
|
|
175
172
|
RCTMGLStyleFactory.setLineDasharray(layer, styleValue);
|
|
176
173
|
break;
|
|
177
|
-
case "lineDasharrayTransition":
|
|
178
|
-
RCTMGLStyleFactory.setLineDasharrayTransition(layer, styleValue);
|
|
179
|
-
break;
|
|
180
174
|
case "linePattern":
|
|
181
175
|
style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() {
|
|
182
176
|
@Override
|
|
@@ -189,9 +183,6 @@ public class RCTMGLStyleFactory {
|
|
|
189
183
|
}
|
|
190
184
|
});
|
|
191
185
|
break;
|
|
192
|
-
case "linePatternTransition":
|
|
193
|
-
RCTMGLStyleFactory.setLinePatternTransition(layer, styleValue);
|
|
194
|
-
break;
|
|
195
186
|
case "lineGradient":
|
|
196
187
|
RCTMGLStyleFactory.setLineGradient(layer, styleValue);
|
|
197
188
|
break;
|
|
@@ -593,9 +584,6 @@ public class RCTMGLStyleFactory {
|
|
|
593
584
|
}
|
|
594
585
|
});
|
|
595
586
|
break;
|
|
596
|
-
case "fillExtrusionPatternTransition":
|
|
597
|
-
RCTMGLStyleFactory.setFillExtrusionPatternTransition(layer, styleValue);
|
|
598
|
-
break;
|
|
599
587
|
case "fillExtrusionHeight":
|
|
600
588
|
RCTMGLStyleFactory.setFillExtrusionHeight(layer, styleValue);
|
|
601
589
|
break;
|
|
@@ -752,9 +740,6 @@ public class RCTMGLStyleFactory {
|
|
|
752
740
|
}
|
|
753
741
|
});
|
|
754
742
|
break;
|
|
755
|
-
case "backgroundPatternTransition":
|
|
756
|
-
RCTMGLStyleFactory.setBackgroundPatternTransition(layer, styleValue);
|
|
757
|
-
break;
|
|
758
743
|
case "backgroundOpacity":
|
|
759
744
|
RCTMGLStyleFactory.setBackgroundOpacity(layer, styleValue);
|
|
760
745
|
break;
|
|
@@ -1018,14 +1003,6 @@ public class RCTMGLStyleFactory {
|
|
|
1018
1003
|
}
|
|
1019
1004
|
}
|
|
1020
1005
|
|
|
1021
|
-
|
|
1022
|
-
public static void setFillPatternTransition(FillLayer layer, RCTMGLStyleValue styleValue) {
|
|
1023
|
-
StyleTransition transition = styleValue.getTransition();
|
|
1024
|
-
if (transition != null) {
|
|
1025
|
-
layer.fillPatternTransition(transition);
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
1006
|
public static void setLineCap(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1030
1007
|
if (styleValue.isExpression()) {
|
|
1031
1008
|
layer.lineCap(styleValue.getExpression());
|
|
@@ -1198,14 +1175,6 @@ public class RCTMGLStyleFactory {
|
|
|
1198
1175
|
}
|
|
1199
1176
|
}
|
|
1200
1177
|
|
|
1201
|
-
|
|
1202
|
-
public static void setLineDasharrayTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1203
|
-
StyleTransition transition = styleValue.getTransition();
|
|
1204
|
-
if (transition != null) {
|
|
1205
|
-
layer.lineDasharrayTransition(transition);
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
1178
|
public static void setLinePattern(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1210
1179
|
if (styleValue.isExpression()) {
|
|
1211
1180
|
if (styleValue.isImageStringValue()) {
|
|
@@ -1218,14 +1187,6 @@ public class RCTMGLStyleFactory {
|
|
|
1218
1187
|
}
|
|
1219
1188
|
}
|
|
1220
1189
|
|
|
1221
|
-
|
|
1222
|
-
public static void setLinePatternTransition(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1223
|
-
StyleTransition transition = styleValue.getTransition();
|
|
1224
|
-
if (transition != null) {
|
|
1225
|
-
layer.linePatternTransition(transition);
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
1190
|
public static void setLineGradient(LineLayer layer, RCTMGLStyleValue styleValue) {
|
|
1230
1191
|
if (styleValue.isExpression()) {
|
|
1231
1192
|
layer.lineGradient(styleValue.getExpression());
|
|
@@ -2090,14 +2051,6 @@ public class RCTMGLStyleFactory {
|
|
|
2090
2051
|
}
|
|
2091
2052
|
}
|
|
2092
2053
|
|
|
2093
|
-
|
|
2094
|
-
public static void setFillExtrusionPatternTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
|
|
2095
|
-
StyleTransition transition = styleValue.getTransition();
|
|
2096
|
-
if (transition != null) {
|
|
2097
|
-
layer.fillExtrusionPatternTransition(transition);
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
2054
|
public static void setFillExtrusionHeight(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
|
|
2102
2055
|
if (styleValue.isExpression()) {
|
|
2103
2056
|
layer.fillExtrusionHeight(styleValue.getExpression());
|
|
@@ -2370,14 +2323,6 @@ public class RCTMGLStyleFactory {
|
|
|
2370
2323
|
}
|
|
2371
2324
|
}
|
|
2372
2325
|
|
|
2373
|
-
|
|
2374
|
-
public static void setBackgroundPatternTransition(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
|
|
2375
|
-
StyleTransition transition = styleValue.getTransition();
|
|
2376
|
-
if (transition != null) {
|
|
2377
|
-
layer.backgroundPatternTransition(transition);
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
2326
|
public static void setBackgroundOpacity(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
|
|
2382
2327
|
if (styleValue.isExpression()) {
|
|
2383
2328
|
layer.backgroundOpacity(styleValue.getExpression());
|
package/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import type {
|
|
|
26
26
|
SymbolLayerStyleProps,
|
|
27
27
|
LineLayerStyleProps,
|
|
28
28
|
} from './javascript/utils/MapboxStyles';
|
|
29
|
+
import { getAnnotationsLayerID as _getAnnotationsLayerID } from './javascript/utils/getAnnotationsLayerID';
|
|
29
30
|
import {
|
|
30
31
|
Camera as _Camera,
|
|
31
32
|
CameraStop as _CameraStop,
|
|
@@ -144,6 +145,9 @@ declare namespace MapboxGL {
|
|
|
144
145
|
|
|
145
146
|
const requestAndroidLocationPermissions = _requestAndroidLocationPermissions;
|
|
146
147
|
|
|
148
|
+
const getAnnotationsLayerID = _getAnnotationsLayerID;
|
|
149
|
+
type getAnnotationsLayerID = _getAnnotationsLayerID;
|
|
150
|
+
|
|
147
151
|
const Camera = _Camera;
|
|
148
152
|
type Camera = _Camera;
|
|
149
153
|
type CameraStop = _CameraStop;
|
|
@@ -944,6 +948,7 @@ export import RasterLayer = MapboxGL.RasterLayer;
|
|
|
944
948
|
export import BackgroundLayer = MapboxGL.BackgroundLayer;
|
|
945
949
|
export import MarkerView = MapboxGL.MarkerView;
|
|
946
950
|
export import PointAnnotation = MapboxGL.PointAnnotation;
|
|
951
|
+
export import Callout = MapboxGL.Callout;
|
|
947
952
|
|
|
948
953
|
export import MapboxGLEvent = MapboxGL.MapboxGLEvent;
|
|
949
954
|
export import UserTrackingMode = MapboxGL.UserTrackingMode;
|
|
@@ -955,4 +960,6 @@ export import AnimatedShape = MapboxGL.AnimatedShape;
|
|
|
955
960
|
|
|
956
961
|
export const { offlineManager } = MapboxGL;
|
|
957
962
|
|
|
963
|
+
export const { getAnnotationsLayerID } = MapboxGL;
|
|
964
|
+
|
|
958
965
|
export default MapboxGL;
|
package/ios/RCTMGL/RCTMGLStyle.h
CHANGED
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
- (void)setFillTranslateTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
39
39
|
- (void)setFillTranslateAnchor:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
40
40
|
- (void)setFillPattern:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
41
|
-
- (void)setFillPatternTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
42
41
|
- (void)setLineCap:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
43
42
|
- (void)setLineJoin:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
44
43
|
- (void)setLineMiterLimit:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
@@ -61,9 +60,7 @@
|
|
|
61
60
|
- (void)setLineBlur:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
62
61
|
- (void)setLineBlurTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
63
62
|
- (void)setLineDasharray:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
64
|
-
- (void)setLineDasharrayTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
65
63
|
- (void)setLinePattern:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
66
|
-
- (void)setLinePatternTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
67
64
|
- (void)setLineGradient:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
68
65
|
- (void)setSymbolPlacement:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
69
66
|
- (void)setSymbolSpacing:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
@@ -171,7 +168,6 @@
|
|
|
171
168
|
- (void)setFillExtrusionTranslateTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
172
169
|
- (void)setFillExtrusionTranslateAnchor:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
173
170
|
- (void)setFillExtrusionPattern:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
174
|
-
- (void)setFillExtrusionPatternTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
175
171
|
- (void)setFillExtrusionHeight:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
176
172
|
- (void)setFillExtrusionHeightTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
177
173
|
- (void)setFillExtrusionBase:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
@@ -207,7 +203,6 @@
|
|
|
207
203
|
- (void)setBackgroundColor:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
208
204
|
- (void)setBackgroundColorTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
209
205
|
- (void)setBackgroundPattern:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
210
|
-
- (void)setBackgroundPatternTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
211
206
|
- (void)setBackgroundOpacity:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
212
207
|
- (void)setBackgroundOpacityTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
|
213
208
|
- (void)setAnchor:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue;
|
package/ios/RCTMGL/RCTMGLStyle.m
CHANGED
|
@@ -71,8 +71,6 @@
|
|
|
71
71
|
}
|
|
72
72
|
}];
|
|
73
73
|
}
|
|
74
|
-
} else if ([prop isEqualToString:@"fillPatternTransition"]) {
|
|
75
|
-
[self setFillPatternTransition:layer withReactStyleValue:styleValue];
|
|
76
74
|
} else {
|
|
77
75
|
// TODO throw exception
|
|
78
76
|
}
|
|
@@ -138,8 +136,6 @@
|
|
|
138
136
|
[self setLineBlurTransition:layer withReactStyleValue:styleValue];
|
|
139
137
|
} else if ([prop isEqualToString:@"lineDasharray"]) {
|
|
140
138
|
[self setLineDasharray:layer withReactStyleValue:styleValue];
|
|
141
|
-
} else if ([prop isEqualToString:@"lineDasharrayTransition"]) {
|
|
142
|
-
[self setLineDasharrayTransition:layer withReactStyleValue:styleValue];
|
|
143
139
|
} else if ([prop isEqualToString:@"linePattern"]) {
|
|
144
140
|
if (![styleValue shouldAddImage]) {
|
|
145
141
|
[self setLinePattern:layer withReactStyleValue:styleValue];
|
|
@@ -157,8 +153,6 @@
|
|
|
157
153
|
}
|
|
158
154
|
}];
|
|
159
155
|
}
|
|
160
|
-
} else if ([prop isEqualToString:@"linePatternTransition"]) {
|
|
161
|
-
[self setLinePatternTransition:layer withReactStyleValue:styleValue];
|
|
162
156
|
} else if ([prop isEqualToString:@"lineGradient"]) {
|
|
163
157
|
[self setLineGradient:layer withReactStyleValue:styleValue];
|
|
164
158
|
} else {
|
|
@@ -487,8 +481,6 @@
|
|
|
487
481
|
}
|
|
488
482
|
}];
|
|
489
483
|
}
|
|
490
|
-
} else if ([prop isEqualToString:@"fillExtrusionPatternTransition"]) {
|
|
491
|
-
[self setFillExtrusionPatternTransition:layer withReactStyleValue:styleValue];
|
|
492
484
|
} else if ([prop isEqualToString:@"fillExtrusionHeight"]) {
|
|
493
485
|
[self setFillExtrusionHeight:layer withReactStyleValue:styleValue];
|
|
494
486
|
} else if ([prop isEqualToString:@"fillExtrusionHeightTransition"]) {
|
|
@@ -637,8 +629,6 @@
|
|
|
637
629
|
}
|
|
638
630
|
}];
|
|
639
631
|
}
|
|
640
|
-
} else if ([prop isEqualToString:@"backgroundPatternTransition"]) {
|
|
641
|
-
[self setBackgroundPatternTransition:layer withReactStyleValue:styleValue];
|
|
642
632
|
} else if ([prop isEqualToString:@"backgroundOpacity"]) {
|
|
643
633
|
[self setBackgroundOpacity:layer withReactStyleValue:styleValue];
|
|
644
634
|
} else if ([prop isEqualToString:@"backgroundOpacityTransition"]) {
|
|
@@ -752,11 +742,6 @@
|
|
|
752
742
|
layer.fillPattern = styleValue.mglStyleValue;
|
|
753
743
|
}
|
|
754
744
|
|
|
755
|
-
- (void)setFillPatternTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
756
|
-
{
|
|
757
|
-
layer.fillPatternTransition = [styleValue getTransition];
|
|
758
|
-
}
|
|
759
|
-
|
|
760
745
|
|
|
761
746
|
|
|
762
747
|
- (void)setLineCap:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
@@ -869,21 +854,11 @@
|
|
|
869
854
|
layer.lineDashPattern = styleValue.mglStyleValue;
|
|
870
855
|
}
|
|
871
856
|
|
|
872
|
-
- (void)setLineDasharrayTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
873
|
-
{
|
|
874
|
-
layer.lineDashPatternTransition = [styleValue getTransition];
|
|
875
|
-
}
|
|
876
|
-
|
|
877
857
|
- (void)setLinePattern:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
878
858
|
{
|
|
879
859
|
layer.linePattern = styleValue.mglStyleValue;
|
|
880
860
|
}
|
|
881
861
|
|
|
882
|
-
- (void)setLinePatternTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
883
|
-
{
|
|
884
|
-
layer.linePatternTransition = [styleValue getTransition];
|
|
885
|
-
}
|
|
886
|
-
|
|
887
862
|
- (void)setLineGradient:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
888
863
|
{
|
|
889
864
|
layer.lineGradient = styleValue.mglStyleValue;
|
|
@@ -1427,11 +1402,6 @@
|
|
|
1427
1402
|
layer.fillExtrusionPattern = styleValue.mglStyleValue;
|
|
1428
1403
|
}
|
|
1429
1404
|
|
|
1430
|
-
- (void)setFillExtrusionPatternTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
1431
|
-
{
|
|
1432
|
-
layer.fillExtrusionPatternTransition = [styleValue getTransition];
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
1405
|
- (void)setFillExtrusionHeight:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
1436
1406
|
{
|
|
1437
1407
|
layer.fillExtrusionHeight = styleValue.mglStyleValue;
|
|
@@ -1613,11 +1583,6 @@
|
|
|
1613
1583
|
layer.backgroundPattern = styleValue.mglStyleValue;
|
|
1614
1584
|
}
|
|
1615
1585
|
|
|
1616
|
-
- (void)setBackgroundPatternTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
1617
|
-
{
|
|
1618
|
-
layer.backgroundPatternTransition = [styleValue getTransition];
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
1586
|
- (void)setBackgroundOpacity:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
|
|
1622
1587
|
{
|
|
1623
1588
|
layer.backgroundOpacity = styleValue.mglStyleValue;
|
|
@@ -52,6 +52,7 @@ class MGLModule : NSObject {
|
|
|
52
52
|
"RegionDidChange" : RCTMGLEvent.EventType.regionDidChange.rawValue,
|
|
53
53
|
"CameraChanged" : RCTMGLEvent.EventType.cameraChanged.rawValue,
|
|
54
54
|
"MapIdle" : RCTMGLEvent.EventType.mapIdle.rawValue,
|
|
55
|
+
"WillStartLoadingMap": RCTMGLEvent.EventType.willStartLoadingMap.rawValue,
|
|
55
56
|
"DidFinishLoadingStyle": RCTMGLEvent.EventType.didFinishLoadingStyle.rawValue,
|
|
56
57
|
"DidFinishLoadingMap": RCTMGLEvent.EventType.didFinishLoadingMap.rawValue,
|
|
57
58
|
"DidFinishRenderingFrameFully": RCTMGLEvent.EventType.didFinishRenderingFully.rawValue,
|
|
@@ -47,14 +47,15 @@ class RCTMGLAtmosphere : RCTMGLSingletonLayer, RCTMGLMapComponent, RCTMGLSourceC
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
override func addStyles() {
|
|
50
|
-
if let style : Style = self.style
|
|
50
|
+
if let style : Style = self.style,
|
|
51
|
+
let reactStyle = self.reactStyle {
|
|
51
52
|
let styler = RCTMGLStyle(style: style)
|
|
52
53
|
styler.bridge = self.bridge
|
|
53
54
|
|
|
54
55
|
if var atmosphere = atmosphere {
|
|
55
56
|
styler.atmosphereLayer(
|
|
56
57
|
layer: &atmosphere,
|
|
57
|
-
reactStyle: reactStyle
|
|
58
|
+
reactStyle: reactStyle,
|
|
58
59
|
applyUpdater: { (updater) in fatalError("Atmosphere: TODO - implement apply updater")},
|
|
59
60
|
isValid: { fatalError("Atmosphere: TODO - no isValid") }
|
|
60
61
|
)
|
|
@@ -26,11 +26,11 @@ class RCTMGLCircleLayer: RCTMGLVectorLayer {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
override func addStyles() {
|
|
29
|
-
if let style : Style = self.style
|
|
29
|
+
if let style : Style = self.style,
|
|
30
|
+
let reactStyle = self.reactStyle {
|
|
30
31
|
let styler = RCTMGLStyle(style: self.style!)
|
|
31
32
|
styler.bridge = self.bridge
|
|
32
|
-
if var styleLayer = self.styleLayer as? LayerType
|
|
33
|
-
let reactStyle = self.reactStyle {
|
|
33
|
+
if var styleLayer = self.styleLayer as? LayerType {
|
|
34
34
|
styler.circleLayer(
|
|
35
35
|
layer: &styleLayer,
|
|
36
36
|
reactStyle: reactStyle,
|
|
@@ -5,7 +5,7 @@ class RCTMGLFillExtrusionLayer: RCTMGLVectorLayer {
|
|
|
5
5
|
typealias LayerType = FillExtrusionLayer
|
|
6
6
|
|
|
7
7
|
override func makeLayer(style: Style) throws -> Layer {
|
|
8
|
-
let
|
|
8
|
+
let _ : VectorSource = try self.layerWithSourceID(in: style)
|
|
9
9
|
var layer = LayerType(id: self.id!)
|
|
10
10
|
layer.sourceLayer = self.sourceLayerID
|
|
11
11
|
layer.source = sourceID
|
|
@@ -25,11 +25,11 @@ class RCTMGLFillExtrusionLayer: RCTMGLVectorLayer {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
override func addStyles() {
|
|
28
|
-
if let style : Style = self.style
|
|
28
|
+
if let style : Style = self.style,
|
|
29
|
+
let reactStyle = self.reactStyle {
|
|
29
30
|
let styler = RCTMGLStyle(style: self.style!)
|
|
30
31
|
styler.bridge = self.bridge
|
|
31
|
-
if var styleLayer = self.styleLayer as? LayerType
|
|
32
|
-
let reactStyle = self.reactStyle {
|
|
32
|
+
if var styleLayer = self.styleLayer as? LayerType {
|
|
33
33
|
styler.fillExtrusionLayer(
|
|
34
34
|
layer: &styleLayer,
|
|
35
35
|
reactStyle: reactStyle,
|
|
@@ -5,7 +5,7 @@ class RCTMGLFillLayer: RCTMGLVectorLayer {
|
|
|
5
5
|
typealias LayerType = FillLayer
|
|
6
6
|
|
|
7
7
|
override func makeLayer(style: Style) throws -> Layer {
|
|
8
|
-
let
|
|
8
|
+
let _ : VectorSource = try self.layerWithSourceID(in: style)
|
|
9
9
|
var layer: Layer = FillLayer(id: self.id!)
|
|
10
10
|
|
|
11
11
|
setOptions(&layer)
|
|
@@ -26,14 +26,15 @@ class RCTMGLFillLayer: RCTMGLVectorLayer {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
override func addStyles() {
|
|
29
|
-
if let style : Style = self.style
|
|
29
|
+
if let style : Style = self.style,
|
|
30
|
+
let reactStyle = reactStyle {
|
|
30
31
|
let styler = RCTMGLStyle(style: self.style!)
|
|
31
32
|
styler.bridge = self.bridge
|
|
32
33
|
|
|
33
34
|
if var styleLayer = self.styleLayer as? FillLayer {
|
|
34
35
|
styler.fillLayer(
|
|
35
36
|
layer: &styleLayer,
|
|
36
|
-
reactStyle: reactStyle
|
|
37
|
+
reactStyle: reactStyle,
|
|
37
38
|
applyUpdater: { (updater) in logged("RCTMGLFillLayer.updateLayer") {
|
|
38
39
|
try style.updateLayer(withId: self.id, type: LayerType.self) { (layer: inout FillLayer) in updater(&layer) }
|
|
39
40
|
}},
|
|
@@ -5,7 +5,7 @@ class RCTMGLHeatmapLayer: RCTMGLVectorLayer {
|
|
|
5
5
|
typealias LayerType = HeatmapLayer
|
|
6
6
|
|
|
7
7
|
override func makeLayer(style: Style) throws -> Layer {
|
|
8
|
-
let
|
|
8
|
+
let _ : VectorSource = try self.layerWithSourceID(in: style)
|
|
9
9
|
var layer: Layer = LayerType(id: self.id!)
|
|
10
10
|
|
|
11
11
|
setOptions(&layer)
|
|
@@ -26,14 +26,15 @@ class RCTMGLHeatmapLayer: RCTMGLVectorLayer {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
override func addStyles() {
|
|
29
|
-
if let style : Style = self.style
|
|
30
|
-
|
|
29
|
+
if let style : Style = self.style,
|
|
30
|
+
let reactStyle = reactStyle {
|
|
31
|
+
let styler = RCTMGLStyle(style: style)
|
|
31
32
|
styler.bridge = self.bridge
|
|
32
33
|
|
|
33
34
|
if var styleLayer = self.styleLayer as? HeatmapLayer {
|
|
34
35
|
styler.heatmapLayer(
|
|
35
36
|
layer: &styleLayer,
|
|
36
|
-
reactStyle: reactStyle
|
|
37
|
+
reactStyle: reactStyle,
|
|
37
38
|
applyUpdater: { (updater) in logged("RCTMGLHeatmapLayer.updateLayer") {
|
|
38
39
|
try style.updateLayer(withId: self.id, type: LayerType.self) { (layer: inout HeatmapLayer) in updater(&layer) }
|
|
39
40
|
}},
|
|
@@ -57,7 +57,9 @@ class RCTMGLLocationManager : LocationProviderDelegate {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
func setDistanceFilter(_ distanceFilter: CLLocationDistance) {
|
|
60
|
-
provider.locationProviderOptions
|
|
60
|
+
var options = provider.locationProviderOptions
|
|
61
|
+
options.distanceFilter = distanceFilter
|
|
62
|
+
provider.locationProviderOptions = options
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
func start() {
|
|
@@ -242,8 +244,8 @@ class RCTMGLLocationModule: RCTEventEmitter, RCTMGLLocationManagerDelegate {
|
|
|
242
244
|
}
|
|
243
245
|
|
|
244
246
|
@objc func start(_ minDisplacement: CLLocationDistance) {
|
|
247
|
+
if minDisplacement >= 0.0 { locationManager.setDistanceFilter(minDisplacement) }
|
|
245
248
|
locationManager.start()
|
|
246
|
-
locationManager.setDistanceFilter(minDisplacement)
|
|
247
249
|
}
|
|
248
250
|
|
|
249
251
|
@objc func stop() {
|
|
@@ -17,6 +17,8 @@ open class RCTMGLMapView : MapView {
|
|
|
17
17
|
var styleLoaded: Bool = false
|
|
18
18
|
var styleLoadWaiters : [(MapboxMap)->Void] = []
|
|
19
19
|
var onStyleLoadedComponents: [RCTMGLMapComponent] = []
|
|
20
|
+
|
|
21
|
+
var componentsToRefreshOnStyleChange: [RCTMGLMapComponent] = []
|
|
20
22
|
|
|
21
23
|
weak var reactCamera : RCTMGLCamera?
|
|
22
24
|
var images : [RCTMGLImages] = []
|
|
@@ -35,7 +37,7 @@ open class RCTMGLMapView : MapView {
|
|
|
35
37
|
}()
|
|
36
38
|
|
|
37
39
|
lazy var calloutAnnotationManager : MapboxMaps.PointAnnotationManager = {
|
|
38
|
-
return annotations.makePointAnnotationManager(id: "
|
|
40
|
+
return annotations.makePointAnnotationManager(id: "rctmgl-mapview-callouts")
|
|
39
41
|
}()
|
|
40
42
|
|
|
41
43
|
var mapView : MapView {
|
|
@@ -46,6 +48,7 @@ open class RCTMGLMapView : MapView {
|
|
|
46
48
|
if let mapComponent = subview as? RCTMGLMapComponent {
|
|
47
49
|
let style = mapView.mapboxMap.style
|
|
48
50
|
if mapComponent.waitForStyleLoad() {
|
|
51
|
+
componentsToRefreshOnStyleChange.append(mapComponent)
|
|
49
52
|
if (self.styleLoaded) {
|
|
50
53
|
mapComponent.addToMap(self, style: style)
|
|
51
54
|
} else {
|
|
@@ -66,6 +69,7 @@ open class RCTMGLMapView : MapView {
|
|
|
66
69
|
if let mapComponent = subview as? RCTMGLMapComponent {
|
|
67
70
|
if mapComponent.waitForStyleLoad() {
|
|
68
71
|
onStyleLoadedComponents.removeAll { $0 === mapComponent }
|
|
72
|
+
componentsToRefreshOnStyleChange.removeAll { $0 === mapComponent }
|
|
69
73
|
}
|
|
70
74
|
mapComponent.removeFromMap(self)
|
|
71
75
|
} else {
|
|
@@ -273,7 +277,21 @@ open class RCTMGLMapView : MapView {
|
|
|
273
277
|
self.mapView.gestures.options.pitchEnabled = value
|
|
274
278
|
}
|
|
275
279
|
|
|
280
|
+
func refreshComponentsBeforeStyleChange() {
|
|
281
|
+
componentsToRefreshOnStyleChange.forEach {
|
|
282
|
+
$0.removeFromMap(self)
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
func refreshComponentsAfterStyleChange(style: Style) {
|
|
287
|
+
componentsToRefreshOnStyleChange.forEach {
|
|
288
|
+
$0.addToMap(self, style: style)
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
276
292
|
@objc func setReactStyleURL(_ value: String?) {
|
|
293
|
+
var initialLoad = !self.styleLoaded
|
|
294
|
+
if !initialLoad { refreshComponentsBeforeStyleChange() }
|
|
277
295
|
self.styleLoaded = false
|
|
278
296
|
if let value = value {
|
|
279
297
|
if let _ = URL(string: value) {
|
|
@@ -283,7 +301,14 @@ open class RCTMGLMapView : MapView {
|
|
|
283
301
|
mapView.mapboxMap.loadStyleJSON(value)
|
|
284
302
|
}
|
|
285
303
|
}
|
|
304
|
+
if !initialLoad {
|
|
305
|
+
self.onNext(event: .styleLoaded) {_,_ in
|
|
306
|
+
self.refreshComponentsAfterStyleChange(style: self.mapboxMap.style)
|
|
307
|
+
}
|
|
308
|
+
}
|
|
286
309
|
}
|
|
310
|
+
let event = RCTMGLEvent(type:.willStartLoadingMap, payload: nil);
|
|
311
|
+
self.fireEvent(event: event, callback: self.reactOnMapChange)
|
|
287
312
|
}
|
|
288
313
|
|
|
289
314
|
private func getOrnamentOptionsFromPosition(_ position: [String: NSNumber]) -> (position: OrnamentPosition, margins: CGPoint)? {
|
|
@@ -872,7 +897,7 @@ class PointAnnotationManager : AnnotationInteractionDelegate {
|
|
|
872
897
|
weak var mapView : MapView? = nil
|
|
873
898
|
|
|
874
899
|
init(annotations: AnnotationOrchestrator, mapView: MapView) {
|
|
875
|
-
manager = annotations.makePointAnnotationManager()
|
|
900
|
+
manager = annotations.makePointAnnotationManager(id: "rctmgl-mapview-point-annotations")
|
|
876
901
|
manager.delegate = self
|
|
877
902
|
self.mapView = mapView
|
|
878
903
|
}
|