react-native-maps 1.21.0-alpha.43 → 1.21.0-alpha.45
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.m
CHANGED
|
@@ -49,6 +49,8 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
49
49
|
{
|
|
50
50
|
UIView *_legalLabel;
|
|
51
51
|
BOOL _initialRegionSet;
|
|
52
|
+
BOOL _initialRegionProvided;
|
|
53
|
+
BOOL _initialCameraProvided;
|
|
52
54
|
BOOL _initialCameraSet;
|
|
53
55
|
BOOL _initialized;
|
|
54
56
|
BOOL _loadingStarted;
|
|
@@ -586,6 +588,7 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
586
588
|
return;
|
|
587
589
|
}
|
|
588
590
|
_initialRegion = initialRegion;
|
|
591
|
+
_initialRegionProvided = YES;
|
|
589
592
|
if (!_initialRegionSet && _loadingStarted) {
|
|
590
593
|
_initialRegionSet = YES;
|
|
591
594
|
[self setRegion:initialRegion animated:NO];
|
|
@@ -600,6 +603,7 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
600
603
|
|
|
601
604
|
- (void)setInitialCamera:(MKMapCamera*)initialCamera {
|
|
602
605
|
_initialCamera = initialCamera;
|
|
606
|
+
_initialCameraProvided = YES;
|
|
603
607
|
if (initialCamera){
|
|
604
608
|
if (!_initialCameraSet && _loadingStarted) {
|
|
605
609
|
_initialCameraSet = YES;
|
|
@@ -824,8 +828,12 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
824
828
|
}
|
|
825
829
|
_loadingStarted = YES;
|
|
826
830
|
// display initialRegion/Camera
|
|
827
|
-
|
|
828
|
-
|
|
831
|
+
if (_initialRegionProvided){
|
|
832
|
+
[self setInitialRegion:_initialRegion];
|
|
833
|
+
}
|
|
834
|
+
if (_initialCameraProvided){
|
|
835
|
+
[self setInitialCamera:_initialCamera];
|
|
836
|
+
}
|
|
829
837
|
}
|
|
830
838
|
|
|
831
839
|
- (void)finishLoading {
|
|
@@ -436,17 +436,24 @@ _view.name = CGPointMake(newViewProps.name.x, newViewProps.name.y); \
|
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
#define REMAP_MAPVIEW_REGION_PROP(name) \
|
|
439
|
-
if (newViewProps.name.latitude
|
|
440
|
-
newViewProps.name.longitude
|
|
441
|
-
newViewProps.name.latitudeDelta
|
|
442
|
-
newViewProps.name.longitudeDelta
|
|
443
|
-
|
|
444
|
-
newViewProps.name.
|
|
445
|
-
|
|
446
|
-
newViewProps.name.
|
|
447
|
-
|
|
439
|
+
if (!(newViewProps.name.latitude == 0 && \
|
|
440
|
+
newViewProps.name.longitude == 0 && \
|
|
441
|
+
newViewProps.name.latitudeDelta == 0 && \
|
|
442
|
+
newViewProps.name.longitudeDelta == 0)) { \
|
|
443
|
+
if (newViewProps.name.latitude != oldViewProps.name.latitude || \
|
|
444
|
+
newViewProps.name.longitude != oldViewProps.name.longitude || \
|
|
445
|
+
newViewProps.name.latitudeDelta != oldViewProps.name.latitudeDelta ||\
|
|
446
|
+
newViewProps.name.longitudeDelta != oldViewProps.name.longitudeDelta) { \
|
|
447
|
+
MKCoordinateSpan span = MKCoordinateSpanMake(newViewProps.name.latitudeDelta, \
|
|
448
|
+
newViewProps.name.longitudeDelta); \
|
|
449
|
+
MKCoordinateRegion region = MKCoordinateRegionMake(CLLocationCoordinate2DMake( \
|
|
450
|
+
newViewProps.name.latitude, \
|
|
451
|
+
newViewProps.name.longitude), span); \
|
|
452
|
+
_view.name = region; \
|
|
453
|
+
} \
|
|
448
454
|
}
|
|
449
455
|
|
|
456
|
+
|
|
450
457
|
#define REMAP_MAPVIEW_CAMERA_PROP(name) \
|
|
451
458
|
if (newViewProps.name.center.latitude != oldViewProps.name.center.latitude || \
|
|
452
459
|
newViewProps.name.center.longitude != oldViewProps.name.center.longitude || \
|
|
@@ -70,6 +70,14 @@ using namespace facebook::react;
|
|
|
70
70
|
[_view.map deselectAnnotation:_view animated:YES];
|
|
71
71
|
|
|
72
72
|
}
|
|
73
|
+
- (void) redraw
|
|
74
|
+
{
|
|
75
|
+
// do nothing
|
|
76
|
+
}
|
|
77
|
+
- (void) redrawCallout
|
|
78
|
+
{
|
|
79
|
+
// do nothing
|
|
80
|
+
}
|
|
73
81
|
|
|
74
82
|
- (void) setCoordinates:(double)latitude longitude:(double)longitude
|
|
75
83
|
{
|
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.45",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|