You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: remove MapboxV10 constant and dead code branches
MapboxV10 was always hardcoded to true on both platforms. Remove the
constant and all conditional branches that checked it, simplifying the
codebase. Closes#4131.
* keep MapboxV10 constant as deprecated
The constant actually means "v10 or later" and is always true. Keep it
for backwards compatibility but mark as deprecated.
"description": "[Android only] Enable/Disable use of GLSurfaceView instead of TextureView."
5325
5325
},
5326
5326
{
@@ -5697,7 +5697,7 @@
5697
5697
"required": false,
5698
5698
"type": "boolean",
5699
5699
"default": "false",
5700
-
"description": "@v10\n\nWhether or not nearby markers on the map should all be displayed. If false, adjacent\nmarkers will 'collapse' and only one will be shown. Defaults to false."
5700
+
"description": "Whether or not nearby markers on the map should all be displayed. If false, adjacent\nmarkers will 'collapse' and only one will be shown. Defaults to false."
'Native part of Mapbox React Native libraries were not registered properly, double check our native installation guides.',
38
38
);
39
39
}
40
-
if(!RNMBXModule.MapboxV10){
41
-
console.warn(
42
-
'@rnmapbox/maps: Non v10 implementations are deprecated and will be removed in next version - see https://github.com/rnmapbox/maps/wiki/Deprecated-RNMapboxImpl-Maplibre',
43
-
);
44
-
}
45
40
46
41
conststyles=StyleSheet.create({
47
42
matchParent: {flex: 1},
@@ -494,7 +489,7 @@ class MapView extends NativeBridgeComponent(
`rnmapbox maps: on${name} is deprecated, please use onMapLoadingError`,
597
+
);
607
598
}else{
608
-
events.push(EventTypes[name]);
609
-
returntrue;
599
+
console.warn(`rnmapbox maps: ${name} is not supported`);
610
600
}
601
+
}else{
602
+
events.push(EventTypes[name]);
603
+
returntrue;
611
604
}
612
-
returnfalse;
613
605
}
606
+
returnfalse;
607
+
}
614
608
615
-
addIfHasHandler('RegionWillChange');
616
-
addIfHasHandler('RegionIsChanging');
617
-
addIfHasHandler('RegionDidChange');
618
-
addIfHasHandler('UserLocationUpdate');
619
-
addIfHasHandler('WillStartLoadingMap');
620
-
addIfHasHandler('DidFinishLoadingMap');
621
-
addIfHasHandler('MapLoadingError');
622
-
addIfHasHandler('DidFailLoadingMap');
623
-
addIfHasHandler('WillStartRenderingFrame');
624
-
addIfHasHandler('DidFinishRenderingFrame');
625
-
addIfHasHandler('DidFinishRenderingFrameFully');
626
-
addIfHasHandler('WillStartRenderingMap');
627
-
addIfHasHandler('DidFinishRenderingMap');
628
-
addIfHasHandler('DidFinishRenderingMapFully');
629
-
addIfHasHandler('DidFinishLoadingStyle');
630
-
631
-
addIfHasHandler('CameraChanged');
632
-
addIfHasHandler('MapIdle');
633
-
634
-
if(addIfHasHandler('RegionDidChange')){
635
-
if(!this.deprecationLogged.regionDidChange){
636
-
console.warn(
637
-
'onRegionDidChange is deprecated and will be removed in next release - please use onMapIdle. https://github.com/rnmapbox/maps/wiki/Deprecated-RegionIsDidChange',
638
-
);
639
-
this.deprecationLogged.regionDidChange=true;
640
-
}
641
-
if(props.onMapIdle){
642
-
console.warn(
643
-
'rnmapbox/maps: only one of MapView.onRegionDidChange or onMapIdle is supported',
644
-
);
645
-
}
609
+
addIfHasHandler('RegionWillChange');
610
+
addIfHasHandler('RegionIsChanging');
611
+
addIfHasHandler('RegionDidChange');
612
+
addIfHasHandler('UserLocationUpdate');
613
+
addIfHasHandler('WillStartLoadingMap');
614
+
addIfHasHandler('DidFinishLoadingMap');
615
+
addIfHasHandler('MapLoadingError');
616
+
addIfHasHandler('DidFailLoadingMap');
617
+
addIfHasHandler('WillStartRenderingFrame');
618
+
addIfHasHandler('DidFinishRenderingFrame');
619
+
addIfHasHandler('DidFinishRenderingFrameFully');
620
+
addIfHasHandler('WillStartRenderingMap');
621
+
addIfHasHandler('DidFinishRenderingMap');
622
+
addIfHasHandler('DidFinishRenderingMapFully');
623
+
addIfHasHandler('DidFinishLoadingStyle');
624
+
625
+
addIfHasHandler('CameraChanged');
626
+
addIfHasHandler('MapIdle');
627
+
628
+
if(addIfHasHandler('RegionDidChange')){
629
+
if(!this.deprecationLogged.regionDidChange){
630
+
console.warn(
631
+
'onRegionDidChange is deprecated and will be removed in next release - please use onMapIdle. https://github.com/rnmapbox/maps/wiki/Deprecated-RegionIsDidChange',
632
+
);
633
+
this.deprecationLogged.regionDidChange=true;
646
634
}
647
-
if(addIfHasHandler('RegionIsChanging')){
648
-
if(!this.deprecationLogged.regionIsChanging){
649
-
console.warn(
650
-
'onRegionIsChanging is deprecated and will be removed in next release - please use onCameraChanged. https://github.com/rnmapbox/maps/wiki/Deprecated-RegionIsDidChange',
651
-
);
652
-
this.deprecationLogged.regionIsChanging=true;
653
-
}
654
-
if(props.onCameraChanged){
655
-
console.warn(
656
-
'rnmapbox/maps: only one of MapView.onRegionIsChanging or onCameraChanged is supported',
657
-
);
658
-
}
635
+
if(props.onMapIdle){
636
+
console.warn(
637
+
'rnmapbox/maps: only one of MapView.onRegionDidChange or onMapIdle is supported',
638
+
);
659
639
}
660
-
661
-
if(props.onRegionWillChange){
640
+
}
641
+
if(addIfHasHandler('RegionIsChanging')){
642
+
if(!this.deprecationLogged.regionIsChanging){
643
+
console.warn(
644
+
'onRegionIsChanging is deprecated and will be removed in next release - please use onCameraChanged. https://github.com/rnmapbox/maps/wiki/Deprecated-RegionIsDidChange',
645
+
);
646
+
this.deprecationLogged.regionIsChanging=true;
647
+
}
648
+
if(props.onCameraChanged){
662
649
console.warn(
663
-
'onRegionWillChange is deprecated and will be removed in v10 - please use onRegionIsChanging',
650
+
'rnmapbox/maps: only one of MapView.onRegionIsChanging or onCameraChanged is supported',
0 commit comments