react-native-maps 1.21.0-alpha.35 → 1.21.0-alpha.36

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.
@@ -362,6 +362,19 @@ id regionAsJSON(MKCoordinateRegion region) {
362
362
  ];
363
363
  }
364
364
 
365
+ - (NSDictionary *) getCameraDic {
366
+ MKMapCamera *camera = [self camera];
367
+ return @{
368
+ @"center": @{
369
+ @"latitude": @(camera.centerCoordinate.latitude),
370
+ @"longitude": @(camera.centerCoordinate.longitude),
371
+ },
372
+ @"pitch": @(camera.pitch),
373
+ @"heading": @(camera.heading),
374
+ @"altitude": @(camera.altitude),
375
+ };
376
+ }
377
+
365
378
  - (void)layoutSubviews {
366
379
  [super layoutSubviews];
367
380
  if(_didLayoutSubviews) return;
@@ -379,7 +379,7 @@ const NSInteger AIRMapMaxZoomLevel = 20;
379
379
  return markersFrames;
380
380
  }
381
381
 
382
- - (NSDictionary *) getCamera {
382
+ - (NSDictionary *) getCameraDic {
383
383
  MKMapCamera *camera = [self camera];
384
384
  return @{
385
385
  @"center": @{
@@ -37,7 +37,7 @@
37
37
  resolve:(RCTPromiseResolveBlock)resolve
38
38
  reject:(RCTPromiseRejectBlock)reject {
39
39
  [self executeWithMapView:tag success:^(id<RNMapsAirModuleDelegate> mapView) {
40
- resolve([mapView getCamera]);
40
+ resolve([mapView getCameraDic]);
41
41
  } reject:reject];
42
42
 
43
43
  }
@@ -16,7 +16,7 @@
16
16
  - (void)takeSnapshotWithConfig:(NSDictionary *)config
17
17
  success:(RCTPromiseResolveBlock) success error:(RCTPromiseRejectBlock) error;
18
18
 
19
- - (NSDictionary *) getCamera;
19
+ - (NSDictionary *) getCameraDic;
20
20
  - (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible;
21
21
  - (NSArray *) getMapBoundaries;
22
22
  - (NSDictionary *) getPointForCoordinates:(CLLocationCoordinate2D) location;
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.35",
8
+ "version": "1.21.0-alpha.36",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",