react-native-maps 1.21.0-alpha.116 → 1.21.0-alpha.117
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/FabricPlaceholders/PlaceHolderGoogleMapView.h +28 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +68 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +43 -0
- package/package.json +1 -1
- package/react-native-google-maps.podspec +29 -0
- package/ios/AirMaps/NSObject+DynamicLoad.h +0 -16
- package/ios/AirMaps/NSObject+DynamicLoad.m +0 -28
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
#include "RNMapsDefines.h"
|
|
10
|
+
|
|
11
|
+
#if HAVE_GOOGLE_MAPS == 0
|
|
12
|
+
|
|
13
|
+
#import <React/RCTViewComponentView.h>
|
|
14
|
+
#import <UIKit/UIKit.h>
|
|
15
|
+
#import "RNMapsHostVewDelegate.h"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
@interface RNMapsGoogleMapView : RCTViewComponentView
|
|
22
|
+
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
NS_ASSUME_NONNULL_END
|
|
26
|
+
|
|
27
|
+
#endif
|
|
28
|
+
#endif
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNMapsGoogleMapView.mm
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
// Created by Salah Ghanim on 23.11.24.
|
|
6
|
+
// Copyright © 2024 react-native-maps. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
#include "RNMapsDefines.h"
|
|
9
|
+
|
|
10
|
+
#if HAVE_GOOGLE_MAPS == 0
|
|
11
|
+
|
|
12
|
+
#import <react/renderer/components/RNMapsSpecs/ComponentDescriptors.h>
|
|
13
|
+
#import <react/renderer/components/RNMapsSpecs/EventEmitters.h>
|
|
14
|
+
#import <react/renderer/components/RNMapsSpecs/Props.h>
|
|
15
|
+
#import <react/renderer/components/RNMapsSpecs/RCTComponentViewHelpers.h>
|
|
16
|
+
#import "RCTFabricComponentsPlugins.h"
|
|
17
|
+
#import <React/RCTConversions.h>
|
|
18
|
+
#import "PlaceHolderGoogleMapView.h"
|
|
19
|
+
|
|
20
|
+
using namespace facebook::react;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@implementation RNMapsGoogleMapView
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#pragma mark - JS Commands
|
|
27
|
+
- (void)animateToRegion:(NSString *)regionJSON duration:(NSInteger)duration{
|
|
28
|
+
}
|
|
29
|
+
- (void)setCamera:(NSString *)cameraJSON{
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
- (void)animateCamera:(NSString *)cameraJSON duration:(NSInteger)duration{
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
- (void)fitToElements:(NSString *)edgePaddingJSON animated:(BOOL)animated {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
- (void)fitToSuppliedMarkers:(NSString *)markersJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated {
|
|
39
|
+
}
|
|
40
|
+
- (void)fitToCoordinates:(NSString *)coordinatesJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated {
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
- (void) setIndoorActiveLevelIndex:(NSInteger)activeLevelIndex
|
|
44
|
+
{
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#pragma mark - Native commands
|
|
49
|
+
|
|
50
|
+
- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
|
|
51
|
+
{
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
56
|
+
{
|
|
57
|
+
return concreteComponentDescriptorProvider<RNMapsGoogleMapViewComponentDescriptor>();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@end
|
|
62
|
+
|
|
63
|
+
Class<RCTComponentViewProtocol> RNMapsGoogleMapViewCls(void)
|
|
64
|
+
{
|
|
65
|
+
return RNMapsGoogleMapView.class;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
#endif
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
#include "RNMapsDefines.h"
|
|
10
|
+
|
|
11
|
+
#if HAVE_GOOGLE_MAPS == 0
|
|
12
|
+
|
|
13
|
+
#import <React/RCTViewComponentView.h>
|
|
14
|
+
#import <UIKit/UIKit.h>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
@interface RNMapsGooglePolygonView : RCTViewComponentView
|
|
19
|
+
|
|
20
|
+
@end
|
|
21
|
+
|
|
22
|
+
NS_ASSUME_NONNULL_END
|
|
23
|
+
|
|
24
|
+
#endif
|
|
25
|
+
#endif
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNMapsGoogleMapView.mm
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
// Created by Salah Ghanim on 23.11.24.
|
|
6
|
+
// Copyright © 2024 react-native-maps. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
#include "RNMapsDefines.h"
|
|
9
|
+
|
|
10
|
+
#if HAVE_GOOGLE_MAPS == 0
|
|
11
|
+
|
|
12
|
+
#import <react/renderer/components/RNMapsSpecs/ComponentDescriptors.h>
|
|
13
|
+
#import <react/renderer/components/RNMapsSpecs/EventEmitters.h>
|
|
14
|
+
#import <react/renderer/components/RNMapsSpecs/Props.h>
|
|
15
|
+
#import <react/renderer/components/RNMapsSpecs/RCTComponentViewHelpers.h>
|
|
16
|
+
|
|
17
|
+
#import "RCTFabricComponentsPlugins.h"
|
|
18
|
+
#import <React/RCTConversions.h>
|
|
19
|
+
#import "PlaceHolderPolygonView.h"
|
|
20
|
+
|
|
21
|
+
using namespace facebook::react;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@interface RNMapsGooglePolygonView () <RCTRNMapsGooglePolygonViewProtocol>
|
|
25
|
+
@end
|
|
26
|
+
|
|
27
|
+
@implementation RNMapsGooglePolygonView
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
32
|
+
{
|
|
33
|
+
return concreteComponentDescriptorProvider<RNMapsGooglePolygonComponentDescriptor>();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@end
|
|
37
|
+
|
|
38
|
+
Class<RCTComponentViewProtocol> RNMapsGooglePolygonCls(void)
|
|
39
|
+
{
|
|
40
|
+
return RNMapsGooglePolygonView.class;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#endif
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "src/index.ts",
|
|
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.117",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -22,4 +22,33 @@ Pod::Spec.new do |s|
|
|
|
22
22
|
s.dependency 'Google-Maps-iOS-Utils', '6.1.0'
|
|
23
23
|
s.dependency 'react-native-maps-generated'
|
|
24
24
|
install_modules_dependencies(s)
|
|
25
|
+
|
|
26
|
+
# Add script phase to detect Google Maps
|
|
27
|
+
s.script_phases = [
|
|
28
|
+
{
|
|
29
|
+
:name => 'Check react-native-google-maps Availability',
|
|
30
|
+
:script => %(
|
|
31
|
+
GOOGLE_MAPS_HEADER_PATH="$PODS_ROOT/Headers/Public/react-native-google-maps/GoogleMaps.h"
|
|
32
|
+
DEFINES_FILE="$CONFIGURATION_BUILD_DIR/react-native-maps/RNMapsDefines.h"
|
|
33
|
+
|
|
34
|
+
# Ensure the defines file directory exists
|
|
35
|
+
mkdir -p "$(dirname "$DEFINES_FILE")"
|
|
36
|
+
|
|
37
|
+
# Check if Google Maps header exists
|
|
38
|
+
if [ -f "$GOOGLE_MAPS_HEADER_PATH" ]; then
|
|
39
|
+
echo "#define HAVE_GOOGLE_MAPS 1" > "$DEFINES_FILE"
|
|
40
|
+
echo "Google Maps detected. HAVE_GOOGLE_MAPS defined."
|
|
41
|
+
else
|
|
42
|
+
echo "#define HAVE_GOOGLE_MAPS 0" > "$DEFINES_FILE"
|
|
43
|
+
echo "Google Maps not detected."
|
|
44
|
+
fi
|
|
45
|
+
),
|
|
46
|
+
:execution_position => :before_compile
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
# Add the generated defines header to the header search path
|
|
51
|
+
s.pod_target_xcconfig = {
|
|
52
|
+
'HEADER_SEARCH_PATHS' => '$(CONFIGURATION_BUILD_DIR)/react-native-maps'
|
|
53
|
+
}
|
|
25
54
|
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// NSObject+DynamicLoad.h
|
|
3
|
-
// react-native-maps
|
|
4
|
-
//
|
|
5
|
-
// Created by Salah Ghanim on 16.03.25.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
-
|
|
12
|
-
@interface NSObject (DynamicLoad)
|
|
13
|
-
|
|
14
|
-
@end
|
|
15
|
-
|
|
16
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// NSObject+DynamicLoad.m
|
|
3
|
-
// react-native-maps
|
|
4
|
-
//
|
|
5
|
-
// Created by Salah Ghanim on 16.03.25.
|
|
6
|
-
//
|
|
7
|
-
#import <Foundation/Foundation.h>
|
|
8
|
-
#import <objc/runtime.h>
|
|
9
|
-
#import "NSObject+DynamicLoad.h"
|
|
10
|
-
|
|
11
|
-
@implementation NSObject (DynamicLoad)
|
|
12
|
-
+ (void)load {
|
|
13
|
-
[self ensureClassExists:"RNMapsGoogleMapView"];
|
|
14
|
-
[self ensureClassExists:"RNMapsGooglePolygonView"];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
+ (void)ensureClassExists:(const char *)className {
|
|
18
|
-
// Check if the class exists
|
|
19
|
-
Class existingClass = objc_getClass(className);
|
|
20
|
-
if (!existingClass) {
|
|
21
|
-
// If the class does not exist, create a new class that is a subclass of NSObject
|
|
22
|
-
Class newClass = objc_allocateClassPair([NSObject class], className, 0);
|
|
23
|
-
// Register the new class with the runtime
|
|
24
|
-
objc_registerClassPair(newClass);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@end
|