react-native-maps 1.21.0-alpha.10 → 1.21.0-alpha.11

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.
@@ -12,7 +12,7 @@
12
12
 
13
13
  @class AIRGoogleMapMarker;
14
14
 
15
- @interface AIRGMSMarker : GMSMarker
15
+ @interface AIRGMSMarker : GMSAdvancedMarker
16
16
  @property (nonatomic, strong) NSString *identifier;
17
17
  @property (nonatomic, weak) AIRGoogleMapMarker *fakeMarker;
18
18
  @property (nonatomic, copy) RCTBubblingEventBlock onPress;
@@ -21,7 +21,7 @@
21
21
  #import <React/RCTConversions.h>
22
22
  #import "RCTConvert+GMSMapViewType.h"
23
23
  #import "RCTConvert+AirMap.h"
24
-
24
+ #import "UIView+AirMap.h"
25
25
 
26
26
  using namespace facebook::react;
27
27
 
@@ -380,18 +380,9 @@ using namespace facebook::react;
380
380
  return self;
381
381
  }
382
382
 
383
- - (id)getPaperViewFromChildComponentView:(UIView *)childComponentView {
384
- // Check if the childComponentView responds to the "adapter" selector
385
- if ([childComponentView respondsToSelector:@selector(paperView)]) {
386
- // Safely return the paperView
387
- return [childComponentView valueForKey:@"paperView"];
388
- }
389
- // Return nil if paperView is not accessible
390
- return nil;
391
- }
392
383
 
393
384
  - (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index{
394
- id<RCTComponent> paperView = [self getPaperViewFromChildComponentView:childComponentView];
385
+ id<RCTComponent> paperView = [childComponentView getPaperViewFromChildComponentView];
395
386
  if (paperView){
396
387
  if(_view && [_view isReady]){
397
388
  [_view insertReactSubview:paperView atIndex:index];
@@ -402,7 +393,7 @@ using namespace facebook::react;
402
393
  }
403
394
  - (void) unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
404
395
  {
405
- id<RCTComponent> paperView = [self getPaperViewFromChildComponentView:childComponentView];
396
+ id<RCTComponent> paperView = [childComponentView getPaperViewFromChildComponentView];
406
397
  if (paperView){
407
398
  if(_view && [_view isReady]){
408
399
  [_view removeReactSubview:paperView];
@@ -0,0 +1,24 @@
1
+ //
2
+ // AIRUrlTileOverlay.h
3
+ // AirMaps
4
+ //
5
+ // Created by cascadian on 3/19/16.
6
+ // Copyright © 2016. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <CoreLocation/CoreLocation.h>
11
+ #import <React/RCTBridge.h>
12
+
13
+ @protocol RNMapsAirModuleDelegate <NSObject>
14
+ @required
15
+
16
+ - (void)takeSnapshotWithConfig:(NSDictionary *)config
17
+ callback:(RCTPromiseResolveBlock) callback;
18
+
19
+ - (NSDictionary *) getCamera;
20
+ - (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible;
21
+ - (NSArray *) getMapBoundaries;
22
+ - (NSDictionary *) getPointForCoordinates:(CLLocationCoordinate2D) location;
23
+ - (NSDictionary *) getCoordinatesForPoint:(CGPoint) point;
24
+ @end
@@ -0,0 +1,17 @@
1
+ //
2
+ // AIRUrlTileOverlay.h
3
+ // AirMaps
4
+ //
5
+ // Created by cascadian on 3/19/16.
6
+ // Copyright © 2016. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "RNMapsAirModuleDelegate.h"
11
+
12
+ @protocol RNMapsHostVewDelegate <NSObject>
13
+ @required
14
+
15
+ - (id<RNMapsAirModuleDelegate>) mapView;
16
+
17
+ @end
@@ -14,9 +14,9 @@
14
14
  #import <react/renderer/components/RNMapsSpecs/EventEmitters.h>
15
15
  #import <react/renderer/components/RNMapsSpecs/Props.h>
16
16
  #import <react/renderer/components/RNMapsSpecs/RCTComponentViewHelpers.h>
17
-
18
17
  #import "RCTFabricComponentsPlugins.h"
19
18
  #import <React/RCTConversions.h>
19
+ #import "UIView+AirMap.h"
20
20
 
21
21
  using namespace facebook::react;
22
22
 
@@ -359,27 +359,22 @@ using namespace facebook::react;
359
359
  return self;
360
360
  }
361
361
 
362
- - (id)getPaperViewFromChildComponentView:(UIView *)childComponentView {
363
- // Check if the childComponentView responds to the "adapter" selector
364
- if ([childComponentView respondsToSelector:@selector(paperView)]) {
365
- // Safely return the paperView
366
- return [childComponentView valueForKey:@"paperView"];
367
- }
368
- // Return nil if paperView is not accessible
369
- return nil;
370
- }
371
362
 
372
363
  - (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index{
373
- id<RCTComponent> paperView = [self getPaperViewFromChildComponentView:childComponentView];
364
+ id<RCTComponent> paperView = [childComponentView getPaperViewFromChildComponentView];
374
365
  if (paperView){
375
366
  [_view insertReactSubview:paperView atIndex:index];
367
+ } else {
368
+ [_view insertReactSubview:childComponentView atIndex:index];
376
369
  }
377
370
  }
378
371
  - (void) unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
379
372
  {
380
- id<RCTComponent> paperView = [self getPaperViewFromChildComponentView:childComponentView];
373
+ id<RCTComponent> paperView = [childComponentView getPaperViewFromChildComponentView];
381
374
  if (paperView){
382
375
  [_view removeReactSubview:paperView];
376
+ } else {
377
+ [_view removeReactSubview:childComponentView];
383
378
  }
384
379
  }
385
380
 
@@ -0,0 +1,20 @@
1
+ //
2
+ // Created by Leland Richardson on 12/27/15.
3
+ // Copyright (c) 2015 Facebook. All rights reserved.
4
+ //
5
+
6
+ #import "UIView+AirMap.h"
7
+
8
+ @implementation UIView (AirMap)
9
+
10
+ - (UIView *) getPaperViewFromChildComponentView {
11
+ // Check if the childComponentView responds to the "adapter" selector
12
+ if ([self respondsToSelector:@selector(paperView)]) {
13
+ // Safely return the paperView
14
+ return [self valueForKey:@"paperView"];
15
+ }
16
+ // Return nil if paperView is not accessible
17
+ return nil;
18
+ }
19
+
20
+ @end
@@ -0,0 +1,11 @@
1
+ //
2
+ // Created by Salah Ghanim on 29/12/2024.
3
+ // Copyright (c) 2015 Facebook. All rights reserved.
4
+ //
5
+
6
+ #import <UIKit/UIKit.h>
7
+
8
+ @interface UIView (AirMap)
9
+ - (UIView *) getPaperViewFromChildComponentView;
10
+
11
+ @end
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.10",
8
+ "version": "1.21.0-alpha.11",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",