react-native-maps 1.21.0-alpha.1 → 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.
- package/android/build.gradle +19 -4
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +51 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +46 -0
- package/ios/AirGoogleMaps/AIRGMSMarker.h +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMap.h +8 -2
- package/ios/AirGoogleMaps/AIRGoogleMap.m +151 -7
- package/ios/AirGoogleMaps/AIRGoogleMapCircle.h +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapCoordinate.h +13 -0
- package/ios/AirGoogleMaps/AIRGoogleMapCoordinate.m +10 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.h +7 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +28 -119
- package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapOverlay.h +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.h +3 -3
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.m +2 -2
- package/ios/AirGoogleMaps/AIRGoogleMapPolygonManager.m +3 -3
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.h +3 -2
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +2 -3
- package/ios/AirGoogleMaps/AIRGoogleMapPolylineManager.m +2 -2
- package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.h +3 -0
- package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.m +16 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +26 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +572 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +25 -0
- package/ios/AirMaps/AIRMap.h +6 -4
- package/ios/AirMaps/AIRMap.m +179 -26
- package/ios/AirMaps/AIRMapManager.m +6 -21
- package/ios/AirMaps/RCTConvert+AirMap.h +4 -0
- package/ios/AirMaps/RCTConvert+AirMap.m +2 -0
- package/ios/AirMaps/RNMapsAirModule.h +3 -0
- package/ios/AirMaps/RNMapsAirModule.mm +40 -171
- package/ios/AirMaps/RNMapsAirModuleDelegate.h +24 -0
- package/ios/AirMaps/RNMapsHostVewDelegate.h +17 -0
- package/ios/AirMaps/RNMapsMapView.h +6 -3
- package/ios/AirMaps/RNMapsMapView.mm +20 -38
- package/ios/AirMaps/UIView +AirMap.m +20 -0
- package/ios/AirMaps/UIView+AirMap.h +11 -0
- package/lib/MapOverlay.d.ts +1 -1
- package/lib/MapView.d.ts +2 -2
- package/lib/MapView.js +20 -18
- package/lib/{FabricMapView.d.ts → createFabricMap.d.ts} +7 -6
- package/lib/createFabricMap.js +175 -0
- package/lib/specs/NativeComponentGoogleMapView.d.ts +713 -0
- package/lib/specs/NativeComponentGoogleMapView.js +21 -0
- package/lib/specs/NativeComponentMapView.d.ts +4 -11
- package/package.json +10 -7
- package/lib/FabricMapView.js +0 -175
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
#import <GoogleMaps/GoogleMaps.h>
|
|
10
10
|
#import <React/RCTBridge.h>
|
|
11
11
|
#import "AIRGMSPolygon.h"
|
|
12
|
-
#import "
|
|
12
|
+
#import "AIRGoogleMapCoordinate.h"
|
|
13
13
|
|
|
14
14
|
@interface AIRGoogleMapPolygon : UIView
|
|
15
15
|
|
|
16
16
|
@property (nonatomic, weak) RCTBridge *bridge;
|
|
17
17
|
@property (nonatomic, strong) NSString *identifier;
|
|
18
18
|
@property (nonatomic, strong) AIRGMSPolygon *polygon;
|
|
19
|
-
@property (nonatomic, strong) NSArray<
|
|
20
|
-
@property (nonatomic, strong) NSArray<NSArray<
|
|
19
|
+
@property (nonatomic, strong) NSArray<AIRGoogleMapCoordinate *> *coordinates;
|
|
20
|
+
@property (nonatomic, strong) NSArray<NSArray<AIRGoogleMapCoordinate *> *> *holes;
|
|
21
21
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
22
22
|
|
|
23
23
|
@property (nonatomic, strong) UIColor *fillColor;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
- (void)setCoordinates:(NSArray<
|
|
45
|
+
- (void)setCoordinates:(NSArray<AIRGoogleMapCoordinate *> *)coordinates
|
|
46
46
|
{
|
|
47
47
|
_coordinates = coordinates;
|
|
48
48
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
_polygon.path = path;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
- (void)setHoles:(NSArray<NSArray<
|
|
58
|
+
- (void)setHoles:(NSArray<NSArray<AIRGoogleMapCoordinate *> *> *)holes
|
|
59
59
|
{
|
|
60
60
|
_holes = holes;
|
|
61
61
|
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
#import <React/RCTEventDispatcher.h>
|
|
14
14
|
#import <React/RCTViewManager.h>
|
|
15
15
|
#import <React/UIView+React.h>
|
|
16
|
-
#import "RCTConvert+AirMap.h"
|
|
17
16
|
#import "AIRGoogleMapPolygon.h"
|
|
17
|
+
#import "RCTConvert+GMSMapViewType.h"
|
|
18
18
|
|
|
19
19
|
@interface AIRGoogleMapPolygonManager()
|
|
20
20
|
|
|
@@ -31,8 +31,8 @@ RCT_EXPORT_MODULE()
|
|
|
31
31
|
return polygon;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
RCT_EXPORT_VIEW_PROPERTY(coordinates,
|
|
35
|
-
RCT_EXPORT_VIEW_PROPERTY(holes,
|
|
34
|
+
RCT_EXPORT_VIEW_PROPERTY(coordinates, AIRGoogleMapCoordinateArray)
|
|
35
|
+
RCT_EXPORT_VIEW_PROPERTY(holes, AIRGoogleMapCoordinateArrayArray)
|
|
36
36
|
RCT_EXPORT_VIEW_PROPERTY(fillColor, UIColor)
|
|
37
37
|
RCT_EXPORT_VIEW_PROPERTY(strokeWidth, double)
|
|
38
38
|
RCT_EXPORT_VIEW_PROPERTY(strokeColor, UIColor)
|
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
#import <GoogleMaps/GoogleMaps.h>
|
|
10
10
|
#import <React/RCTBridge.h>
|
|
11
11
|
#import "AIRGMSPolyline.h"
|
|
12
|
-
#import "AIRMapCoordinate.h"
|
|
13
12
|
#import "AIRGoogleMapMarker.h"
|
|
14
13
|
|
|
14
|
+
#import "AIRGoogleMapCoordinate.h"
|
|
15
|
+
|
|
15
16
|
@interface AIRGoogleMapPolyline : UIView
|
|
16
17
|
|
|
17
18
|
@property (nonatomic, weak) RCTBridge *bridge;
|
|
18
19
|
@property (nonatomic, strong) NSString *identifier;
|
|
19
20
|
@property (nonatomic, strong) AIRGMSPolyline *polyline;
|
|
20
|
-
@property (nonatomic, strong) NSArray<
|
|
21
|
+
@property (nonatomic, strong) NSArray<AIRGoogleMapCoordinate *> *coordinates;
|
|
21
22
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
22
23
|
@property (nonatomic, strong) GMSMapView *originalMap;
|
|
23
24
|
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
#import "AIRGoogleMapPolyline.h"
|
|
10
10
|
#import "AIRGMSPolyline.h"
|
|
11
|
-
#import "AIRMapCoordinate.h"
|
|
12
11
|
#import "AIRGoogleMapMarker.h"
|
|
13
12
|
#import "AIRGoogleMapMarkerManager.h"
|
|
14
13
|
#import <GoogleMaps/GoogleMaps.h>
|
|
@@ -26,13 +25,13 @@
|
|
|
26
25
|
return self;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
-(void)setCoordinates:(NSArray<
|
|
28
|
+
-(void)setCoordinates:(NSArray<AIRGoogleMapCoordinate *> *)coordinates
|
|
30
29
|
{
|
|
31
30
|
_coordinates = coordinates;
|
|
32
31
|
|
|
33
32
|
GMSMutablePath *path = [GMSMutablePath path];
|
|
34
33
|
|
|
35
|
-
if (!coordinates || coordinates.count == 0)
|
|
34
|
+
if (!coordinates || coordinates.count == 0)
|
|
36
35
|
{
|
|
37
36
|
[path removeAllCoordinates];
|
|
38
37
|
return;
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
#import <React/RCTEventDispatcher.h>
|
|
15
15
|
#import <React/RCTViewManager.h>
|
|
16
16
|
#import <React/UIView+React.h>
|
|
17
|
-
#import "RCTConvert+AirMap.h"
|
|
18
17
|
#import "AIRGoogleMapPolyline.h"
|
|
18
|
+
#import "RCTConvert+GMSMapViewType.h"
|
|
19
19
|
|
|
20
20
|
@interface AIRGoogleMapPolylineManager()
|
|
21
21
|
|
|
@@ -32,7 +32,7 @@ RCT_EXPORT_MODULE()
|
|
|
32
32
|
return polyline;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
RCT_EXPORT_VIEW_PROPERTY(coordinates,
|
|
35
|
+
RCT_EXPORT_VIEW_PROPERTY(coordinates, AIRGoogleMapCoordinateArray)
|
|
36
36
|
RCT_EXPORT_VIEW_PROPERTY(fillColor, UIColor)
|
|
37
37
|
RCT_EXPORT_VIEW_PROPERTY(strokeColor, UIColor)
|
|
38
38
|
RCT_EXPORT_VIEW_PROPERTY(strokeColors, UIColorArray)
|
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
10
|
#import <GoogleMaps/GoogleMaps.h>
|
|
11
11
|
#import <React/RCTConvert.h>
|
|
12
|
+
#import "AIRGoogleMapCoordinate.h"
|
|
12
13
|
|
|
13
14
|
@interface RCTConvert (GMSMapViewType)
|
|
14
15
|
+ (GMSCameraPosition*)GMSCameraPositionWithDefaults:(id)json existingCamera:(GMSCameraPosition*)existingCamera;
|
|
16
|
+
+ (NSArray<NSArray<AIRGoogleMapCoordinate *> *> *)AIRGoogleMapCoordinateArrayArray:(id)json;
|
|
17
|
+
+ (AIRGoogleMapCoordinate *)AIRGoogleMapCoordinate:(id)json;
|
|
15
18
|
@end
|
|
16
19
|
|
|
17
20
|
#endif
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#import <GoogleMaps/GoogleMaps.h>
|
|
11
11
|
#import <React/RCTConvert.h>
|
|
12
12
|
#import <React/RCTConvert+CoreLocation.h>
|
|
13
|
+
#import "AIRGoogleMapCoordinate.h"
|
|
13
14
|
|
|
14
15
|
@implementation RCTConvert (GMSMapViewType)
|
|
15
16
|
RCT_ENUM_CONVERTER(GMSMapViewType,
|
|
@@ -30,6 +31,21 @@
|
|
|
30
31
|
return [RCTConvert GMSCameraPositionWithDefaults:json existingCamera:nil];
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
+ (AIRGoogleMapCoordinate *)AIRGoogleMapCoordinate:(id)json
|
|
35
|
+
{
|
|
36
|
+
AIRGoogleMapCoordinate *coord = [AIRGoogleMapCoordinate new];
|
|
37
|
+
coord.coordinate = [self CLLocationCoordinate2D:json];
|
|
38
|
+
return coord;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
RCT_ARRAY_CONVERTER(AIRGoogleMapCoordinate)
|
|
42
|
+
|
|
43
|
+
+ (NSArray<NSArray<AIRGoogleMapCoordinate *> *> *)AIRGoogleMapCoordinateArrayArray:(id)json
|
|
44
|
+
{
|
|
45
|
+
return RCTConvertArrayValue(@selector(AIRGoogleMapCoordinate:), json);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
33
49
|
+ (GMSCameraPosition*)GMSCameraPositionWithDefaults:(id)json existingCamera:(GMSCameraPosition*)existingCamera
|
|
34
50
|
{
|
|
35
51
|
CLLocationDegrees latitude = 0;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNMapsGoogleMapView.h
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
// Created by Salah Ghanim on 23.11.24.
|
|
6
|
+
// Copyright © 2024 react-native-maps. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
9
|
+
#ifdef HAVE_GOOGLE_MAPS
|
|
10
|
+
|
|
11
|
+
#import <React/RCTViewComponentView.h>
|
|
12
|
+
#import <UIKit/UIKit.h>
|
|
13
|
+
#import "RNMapsHostVewDelegate.h"
|
|
14
|
+
|
|
15
|
+
@class AIRGoogleMap;
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
|
|
19
|
+
@interface RNMapsGoogleMapView : RCTViewComponentView<RNMapsHostVewDelegate>
|
|
20
|
+
|
|
21
|
+
@end
|
|
22
|
+
|
|
23
|
+
NS_ASSUME_NONNULL_END
|
|
24
|
+
|
|
25
|
+
#endif
|
|
26
|
+
#endif
|