react-native-maps 1.21.0-alpha.33 → 1.21.0-alpha.35
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/ios/AirMaps/AIRMap.h
CHANGED
package/ios/AirMaps/AIRMap.m
CHANGED
|
@@ -51,6 +51,7 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
51
51
|
BOOL _initialRegionSet;
|
|
52
52
|
BOOL _initialCameraSet;
|
|
53
53
|
BOOL _initialized;
|
|
54
|
+
BOOL _loadingStarted;
|
|
54
55
|
|
|
55
56
|
// Array to manually track RN subviews
|
|
56
57
|
//
|
|
@@ -102,9 +103,6 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
102
103
|
[super addSubview:view];
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
- (void) didSetRegion {
|
|
106
|
-
_initialRegionSet = YES;
|
|
107
|
-
}
|
|
108
106
|
|
|
109
107
|
#pragma clang diagnostic push
|
|
110
108
|
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls"
|
|
@@ -572,12 +570,23 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
572
570
|
// Animate/move to new position
|
|
573
571
|
[super setRegion:region animated:animated];
|
|
574
572
|
}
|
|
573
|
+
- (void) setRegion:(MKCoordinateRegion)region
|
|
574
|
+
{
|
|
575
|
+
if (!CLLocationCoordinate2DIsValid(region.center)) {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
if (!CLLocationCoordinate2DIsValid(_initialRegion.center)) {
|
|
579
|
+
[self setInitialRegion:region];
|
|
580
|
+
}
|
|
581
|
+
[self setRegion:region animated:NO];
|
|
582
|
+
}
|
|
575
583
|
|
|
576
584
|
- (void)setInitialRegion:(MKCoordinateRegion)initialRegion {
|
|
577
585
|
if (!CLLocationCoordinate2DIsValid(initialRegion.center)) {
|
|
578
586
|
return;
|
|
579
587
|
}
|
|
580
|
-
|
|
588
|
+
_initialRegion = initialRegion;
|
|
589
|
+
if (!_initialRegionSet && _loadingStarted) {
|
|
581
590
|
_initialRegionSet = YES;
|
|
582
591
|
[self setRegion:initialRegion animated:NO];
|
|
583
592
|
}
|
|
@@ -810,6 +819,9 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
810
819
|
self.loadingView.hidden = YES;
|
|
811
820
|
}
|
|
812
821
|
}
|
|
822
|
+
_loadingStarted = YES;
|
|
823
|
+
// loadRegion
|
|
824
|
+
[self setInitialRegion:_initialRegion];
|
|
813
825
|
}
|
|
814
826
|
|
|
815
827
|
- (void)finishLoading {
|
|
@@ -445,7 +445,6 @@ newViewProps.name.longitudeDelta); \
|
|
|
445
445
|
MKCoordinateRegion region = MKCoordinateRegionMake(CLLocationCoordinate2DMake( \
|
|
446
446
|
newViewProps.name.latitude, newViewProps.name.longitude), span); \
|
|
447
447
|
_view.name = region; \
|
|
448
|
-
[_view didSetRegion]; \
|
|
449
448
|
}
|
|
450
449
|
|
|
451
450
|
#define REMAP_MAPVIEW_CAMERA_PROP(name) \
|
|
@@ -267,6 +267,9 @@ using namespace facebook::react;
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index{
|
|
270
|
+
if (!_view){
|
|
271
|
+
[self prepareMarkerView];
|
|
272
|
+
}
|
|
270
273
|
id<RCTComponent> paperView = [childComponentView getPaperViewFromChildComponentView];
|
|
271
274
|
if (paperView){
|
|
272
275
|
[_view insertReactSubview:paperView atIndex:index];
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.21.0-alpha.
|
|
8
|
+
"version": "1.21.0-alpha.35",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|