react-native-maps 1.21.0-alpha.36 → 1.21.0-alpha.38
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.
|
@@ -363,15 +363,15 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
- (NSDictionary *) getCameraDic {
|
|
366
|
-
|
|
366
|
+
GMSCameraPosition *camera = [self camera];
|
|
367
367
|
return @{
|
|
368
368
|
@"center": @{
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
@"pitch": @(camera.
|
|
373
|
-
@"heading": @(camera.
|
|
374
|
-
@"
|
|
369
|
+
@"latitude": @(camera.target.latitude),
|
|
370
|
+
@"longitude": @(camera.target.longitude),
|
|
371
|
+
},
|
|
372
|
+
@"pitch": @(camera.viewingAngle),
|
|
373
|
+
@"heading": @(camera.bearing),
|
|
374
|
+
@"zoom": @(camera.zoom),
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
377
|
|
|
@@ -525,7 +525,7 @@ using namespace facebook::react;
|
|
|
525
525
|
[_view setMinZoom:newViewProps.minZoom maxZoom:newViewProps.maxZoom];
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
|
|
528
|
+
[_view setShowsCompass:newViewProps.showsCompass];
|
|
529
529
|
REMAP_MAPVIEW_PROP(showsTraffic)
|
|
530
530
|
REMAP_MAPVIEW_PROP(showsUserLocation)
|
|
531
531
|
REMAP_MAPVIEW_PROP(zoomEnabled)
|
package/ios/AirMaps/AIRMap.h
CHANGED
|
@@ -44,7 +44,7 @@ extern const NSInteger AIRMapMaxZoomLevel;
|
|
|
44
44
|
@property (nonatomic, assign) CGFloat maxDelta;
|
|
45
45
|
@property (nonatomic, assign) UIEdgeInsets legalLabelInsets;
|
|
46
46
|
@property (nonatomic, assign) MKCoordinateRegion initialRegion;
|
|
47
|
-
@property (nonatomic,
|
|
47
|
+
@property (nonatomic, retain) MKMapCamera *initialCamera;
|
|
48
48
|
@property (nonatomic, assign) CGFloat minZoom;
|
|
49
49
|
@property (nonatomic, assign) CGFloat maxZoom;
|
|
50
50
|
@property (nonatomic, assign) CGPoint compassOffset;
|
package/ios/AirMaps/AIRMap.m
CHANGED
|
@@ -599,7 +599,8 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
599
599
|
|
|
600
600
|
|
|
601
601
|
- (void)setInitialCamera:(MKMapCamera*)initialCamera {
|
|
602
|
-
|
|
602
|
+
_initialCamera = initialCamera;
|
|
603
|
+
if (!_initialCameraSet && _loadingStarted) {
|
|
603
604
|
_initialCameraSet = YES;
|
|
604
605
|
[self setCamera:initialCamera animated:NO];
|
|
605
606
|
}
|
|
@@ -820,8 +821,9 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
820
821
|
}
|
|
821
822
|
}
|
|
822
823
|
_loadingStarted = YES;
|
|
823
|
-
//
|
|
824
|
+
// display initialRegion/Camera
|
|
824
825
|
[self setInitialRegion:_initialRegion];
|
|
826
|
+
[self setInitialCamera:_initialCamera];
|
|
825
827
|
}
|
|
826
828
|
|
|
827
829
|
- (void)finishLoading {
|
|
@@ -459,6 +459,7 @@ MKMapCamera* camera = [[MKMapCamera alloc] init]; \
|
|
|
459
459
|
camera.centerCoordinate = center; \
|
|
460
460
|
camera.heading = newViewProps.name.heading; \
|
|
461
461
|
camera.pitch = newViewProps.name.pitch; \
|
|
462
|
+
camera.centerCoordinateDistance = newViewProps.name.altitude; \
|
|
462
463
|
_view.name = camera; \
|
|
463
464
|
}
|
|
464
465
|
|
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.38",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|