react-native-maps 1.15.1 → 1.15.2
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/README.md +51 -0
- package/ios/AirGoogleMaps/AIRGoogleMap.h +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMap.m +3 -3
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +9 -3
- package/ios/AirGoogleMaps/Resources/GoogleMapsPrivacy.bundle/PrivacyInfo.xcprivacy +110 -0
- package/ios/AirMaps.xcodeproj/project.pbxproj +8 -4
- package/ios/PrivacyInfo.xcprivacy +26 -0
- package/package.json +1 -1
- package/react-native-google-maps.podspec +3 -0
- package/react-native-maps.podspec +3 -1
package/README.md
CHANGED
|
@@ -197,6 +197,57 @@ For Android: add the following line in your AndroidManifest.xml
|
|
|
197
197
|
|
|
198
198
|
For IOS: configure [App Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33) in your app
|
|
199
199
|
|
|
200
|
+
## React Native Configuration for Fabric / New Architecture
|
|
201
|
+
|
|
202
|
+
If you are using React Native 0.74 or higher, or if Fabric / the new architecture is enabled in your project, you need to add specific configurations to your `react-native-config` file to ensure compatibility with certain components. This setup is essential for maintaining the stability and functionality of the map components provided by `react-native-maps`.
|
|
203
|
+
|
|
204
|
+
### Configuration Steps
|
|
205
|
+
|
|
206
|
+
1. **Open your configuration file**: Locate the `react-native-config` file in your project directory.
|
|
207
|
+
|
|
208
|
+
2. **Add the following configuration**: Include the `unstable_reactLegacyComponentNames` array for both Android and iOS platforms as shown below:
|
|
209
|
+
|
|
210
|
+
```javascript
|
|
211
|
+
module.exports = {
|
|
212
|
+
project: {
|
|
213
|
+
android: {
|
|
214
|
+
unstable_reactLegacyComponentNames: [
|
|
215
|
+
'AIRMap',
|
|
216
|
+
'AIRMapCallout',
|
|
217
|
+
'AIRMapCalloutSubview',
|
|
218
|
+
'AIRMapCircle',
|
|
219
|
+
'AIRMapHeatmap',
|
|
220
|
+
'AIRMapLocalTile',
|
|
221
|
+
'AIRMapMarker',
|
|
222
|
+
'AIRMapOverlay',
|
|
223
|
+
'AIRMapPolygon',
|
|
224
|
+
'AIRMapPolyline',
|
|
225
|
+
'AIRMapUrlTile',
|
|
226
|
+
'AIRMapWMSTile',
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
ios: {
|
|
230
|
+
unstable_reactLegacyComponentNames: [
|
|
231
|
+
'AIRMap',
|
|
232
|
+
'AIRMapCallout',
|
|
233
|
+
'AIRMapCalloutSubview',
|
|
234
|
+
'AIRMapCircle',
|
|
235
|
+
'AIRMapHeatmap',
|
|
236
|
+
'AIRMapLocalTile',
|
|
237
|
+
'AIRMapMarker',
|
|
238
|
+
'AIRMapOverlay',
|
|
239
|
+
'AIRMapPolygon',
|
|
240
|
+
'AIRMapPolyline',
|
|
241
|
+
'AIRMapUrlTile',
|
|
242
|
+
'AIRMapWMSTile',
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
checkout the example project to see it in action.
|
|
250
|
+
|
|
200
251
|
#### Tile Overlay using local tiles
|
|
201
252
|
|
|
202
253
|
Tiles can be stored locally within device using xyz tiling scheme and displayed as tile overlay as well. This is usefull especially for offline map usage when tiles are available for selected map region within device storage.
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
+ (GMSCameraPosition*)makeGMSCameraPositionFromMap:(GMSMapView *)map andMKCoordinateRegion:(MKCoordinateRegion)region;
|
|
82
82
|
|
|
83
83
|
- (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible;
|
|
84
|
-
- (instancetype) initWithMapId:(NSString *) mapId;
|
|
84
|
+
- (instancetype) initWithMapId:(NSString *) mapId andZoomTapEnabled:(BOOL) zoomTapEnabled;
|
|
85
85
|
@end
|
|
86
86
|
|
|
87
87
|
#endif
|
|
@@ -71,7 +71,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
71
71
|
NSString* _googleMapId;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
- (instancetype)initWithMapId:(NSString *)mapId
|
|
74
|
+
- (instancetype)initWithMapId:(NSString *)mapId andZoomTapEnabled:(BOOL)zoomTapEnabled
|
|
75
75
|
{
|
|
76
76
|
if (mapId){
|
|
77
77
|
GMSMapID *mapID = [GMSMapID mapIDWithIdentifier:mapId];
|
|
@@ -100,7 +100,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
100
100
|
_didLayoutSubviews = false;
|
|
101
101
|
_didPrepareMap = false;
|
|
102
102
|
_didCallOnMapReady = false;
|
|
103
|
-
_zoomTapEnabled =
|
|
103
|
+
_zoomTapEnabled = zoomTapEnabled;
|
|
104
104
|
|
|
105
105
|
// Listen to the myLocation property of GMSMapView.
|
|
106
106
|
[self addObserver:self
|
|
@@ -116,7 +116,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
- (instancetype) init {
|
|
119
|
-
return [self initWithMapId:nil];
|
|
119
|
+
return [self initWithMapId:nil andZoomTapEnabled:YES];
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
- (void)dealloc {
|
|
@@ -47,10 +47,16 @@ RCT_EXPORT_MODULE()
|
|
|
47
47
|
{
|
|
48
48
|
[GMSServices setMetalRendererEnabled:YES];
|
|
49
49
|
NSString* googleMapId = nil;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
BOOL zoomTapEnabled = YES;
|
|
51
|
+
if (self.initialProps){
|
|
52
|
+
if (self.initialProps[@"googleMapId"]){
|
|
53
|
+
googleMapId = self.initialProps[@"googleMapId"];
|
|
54
|
+
}
|
|
55
|
+
if (self.initialProps[@"zoomTapEnabled"]){
|
|
56
|
+
zoomTapEnabled = self.initialProps[@"zoomTapEnabled"];
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
|
-
AIRGoogleMap *map = [[AIRGoogleMap alloc] initWithMapId:googleMapId];
|
|
59
|
+
AIRGoogleMap *map = [[AIRGoogleMap alloc] initWithMapId:googleMapId andZoomTapEnabled:zoomTapEnabled];
|
|
54
60
|
map.bridge = self.bridge;
|
|
55
61
|
map.delegate = self;
|
|
56
62
|
map.isAccessibilityElement = NO;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>NSPrivacyTracking</key>
|
|
6
|
+
<false/>
|
|
7
|
+
<key>NSPrivacyTrackingDomains</key>
|
|
8
|
+
<array>
|
|
9
|
+
</array>
|
|
10
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
11
|
+
<array>
|
|
12
|
+
<dict>
|
|
13
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
14
|
+
<string>NSPrivacyCollectedDataTypeCrashData</string>
|
|
15
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
16
|
+
<false/>
|
|
17
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
18
|
+
<false/>
|
|
19
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
20
|
+
<array>
|
|
21
|
+
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
22
|
+
</array>
|
|
23
|
+
</dict>
|
|
24
|
+
<dict>
|
|
25
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
26
|
+
<string>NSPrivacyCollectedDataTypeDeviceID</string>
|
|
27
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
28
|
+
<false/>
|
|
29
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
30
|
+
<false/>
|
|
31
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
32
|
+
<array>
|
|
33
|
+
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
34
|
+
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
35
|
+
</array>
|
|
36
|
+
</dict>
|
|
37
|
+
<dict>
|
|
38
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
39
|
+
<string>NSPrivacyCollectedDataTypePerformanceData</string>
|
|
40
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
41
|
+
<false/>
|
|
42
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
43
|
+
<false/>
|
|
44
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
45
|
+
<array>
|
|
46
|
+
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
47
|
+
</array>
|
|
48
|
+
</dict>
|
|
49
|
+
<dict>
|
|
50
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
51
|
+
<string>NSPrivacyCollectedDataTypeProductInteraction</string>
|
|
52
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
53
|
+
<false/>
|
|
54
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
55
|
+
<false/>
|
|
56
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
57
|
+
<array>
|
|
58
|
+
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
59
|
+
</array>
|
|
60
|
+
</dict>
|
|
61
|
+
<dict>
|
|
62
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
63
|
+
<string>NSPrivacyCollectedDataTypeUserID</string>
|
|
64
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
65
|
+
<true/>
|
|
66
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
67
|
+
<false/>
|
|
68
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
69
|
+
<array>
|
|
70
|
+
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
71
|
+
</array>
|
|
72
|
+
</dict>
|
|
73
|
+
</array>
|
|
74
|
+
<key>NSPrivacyAccessedAPITypes</key>
|
|
75
|
+
<array>
|
|
76
|
+
<dict>
|
|
77
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
78
|
+
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
|
79
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
80
|
+
<array>
|
|
81
|
+
<string>85F4.1</string>
|
|
82
|
+
</array>
|
|
83
|
+
</dict>
|
|
84
|
+
<dict>
|
|
85
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
86
|
+
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
|
87
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
88
|
+
<array>
|
|
89
|
+
<string>C617.1</string>
|
|
90
|
+
</array>
|
|
91
|
+
</dict>
|
|
92
|
+
<dict>
|
|
93
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
94
|
+
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
|
95
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
96
|
+
<array>
|
|
97
|
+
<string>35F9.1</string>
|
|
98
|
+
</array>
|
|
99
|
+
</dict>
|
|
100
|
+
<dict>
|
|
101
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
102
|
+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
|
103
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
104
|
+
<array>
|
|
105
|
+
<string>1C8F.1</string>
|
|
106
|
+
</array>
|
|
107
|
+
</dict>
|
|
108
|
+
</array>
|
|
109
|
+
</dict>
|
|
110
|
+
</plist>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
archiveVersion = 1;
|
|
4
4
|
classes = {
|
|
5
5
|
};
|
|
6
|
-
objectVersion =
|
|
6
|
+
objectVersion = 63;
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
@@ -113,6 +113,8 @@
|
|
|
113
113
|
4C99C9DD2226CF2800A8693E /* AIRWeakTimerReference.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIRWeakTimerReference.m; sourceTree = "<group>"; };
|
|
114
114
|
4C99C9DF2226D8C400A8693E /* AIRWeakMapReference.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIRWeakMapReference.h; sourceTree = "<group>"; };
|
|
115
115
|
4C99C9E02226D8C400A8693E /* AIRWeakMapReference.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIRWeakMapReference.m; sourceTree = "<group>"; };
|
|
116
|
+
4E0A36142BFB4CF3009FCCE4 /* Resources */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Resources; path = AirGoogleMaps/Resources; sourceTree = "<group>"; };
|
|
117
|
+
4E0A36152BFB4E76009FCCE4 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
|
116
118
|
4E0CFBDC2B388F2B0017E126 /* RCTComponentData+Maps.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCTComponentData+Maps.h"; sourceTree = "<group>"; };
|
|
117
119
|
4E0CFBDD2B388F2B0017E126 /* RCTComponentData+Maps.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCTComponentData+Maps.m"; sourceTree = "<group>"; };
|
|
118
120
|
53D31635202E723B00B55447 /* AIRMapOverlayManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIRMapOverlayManager.m; sourceTree = "<group>"; };
|
|
@@ -201,6 +203,7 @@
|
|
|
201
203
|
11FA5C481C4A1296003AC2EE = {
|
|
202
204
|
isa = PBXGroup;
|
|
203
205
|
children = (
|
|
206
|
+
4E0A36152BFB4E76009FCCE4 /* PrivacyInfo.xcprivacy */,
|
|
204
207
|
9B9498A32017EF9D00158761 /* AirGoogleMaps */,
|
|
205
208
|
62AEC4D31FD5A0AA003225E0 /* AIRMapLocalTileOverlay.m */,
|
|
206
209
|
11FA5C531C4A1296003AC2EE /* AirMaps */,
|
|
@@ -244,7 +247,6 @@
|
|
|
244
247
|
1125B2C91C4AD3DA007D0023 /* AIRMapManager.h */,
|
|
245
248
|
1125B2CA1C4AD3DA007D0023 /* AIRMapManager.m */,
|
|
246
249
|
1125B2CB1C4AD3DA007D0023 /* AIRMapMarker.h */,
|
|
247
|
-
1125B2CC1C4AD3DA007D0023 /* AIRMapMarker.m */,
|
|
248
250
|
1125B2CD1C4AD3DA007D0023 /* AIRMapMarkerManager.h */,
|
|
249
251
|
1125B2CE1C4AD3DA007D0023 /* AIRMapMarkerManager.m */,
|
|
250
252
|
1125B2CF1C4AD3DA007D0023 /* AIRMapPolygon.h */,
|
|
@@ -290,6 +292,7 @@
|
|
|
290
292
|
9B9498A32017EF9D00158761 /* AirGoogleMaps */ = {
|
|
291
293
|
isa = PBXGroup;
|
|
292
294
|
children = (
|
|
295
|
+
4E0A36142BFB4CF3009FCCE4 /* Resources */,
|
|
293
296
|
B5EA3BA82098E22B000E7AFD /* AIRDummyView.h */,
|
|
294
297
|
B5EA3BA72098E22B000E7AFD /* AIRDummyView.m */,
|
|
295
298
|
9B9498C12017EFB700158761 /* AIRGMSMarker.h */,
|
|
@@ -365,7 +368,7 @@
|
|
|
365
368
|
isa = PBXProject;
|
|
366
369
|
attributes = {
|
|
367
370
|
LastUpgradeCheck = 0940;
|
|
368
|
-
ORGANIZATIONNAME =
|
|
371
|
+
ORGANIZATIONNAME = "react-native-maps";
|
|
369
372
|
TargetAttributes = {
|
|
370
373
|
11FA5C501C4A1296003AC2EE = {
|
|
371
374
|
CreatedOnToolsVersion = 7.2;
|
|
@@ -373,10 +376,11 @@
|
|
|
373
376
|
};
|
|
374
377
|
};
|
|
375
378
|
buildConfigurationList = 11FA5C4C1C4A1296003AC2EE /* Build configuration list for PBXProject "AirMaps" */;
|
|
376
|
-
compatibilityVersion = "Xcode 3
|
|
379
|
+
compatibilityVersion = "Xcode 15.3";
|
|
377
380
|
developmentRegion = English;
|
|
378
381
|
hasScannedForEncodings = 0;
|
|
379
382
|
knownRegions = (
|
|
383
|
+
English,
|
|
380
384
|
en,
|
|
381
385
|
);
|
|
382
386
|
mainGroup = 11FA5C481C4A1296003AC2EE;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
9
|
+
<string>NSPrivacyCollectedDataTypePreciseLocation</string>
|
|
10
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
11
|
+
<false/>
|
|
12
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
13
|
+
<false/>
|
|
14
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
15
|
+
<array>
|
|
16
|
+
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
17
|
+
</array>
|
|
18
|
+
</dict>
|
|
19
|
+
</array>
|
|
20
|
+
<key>NSFileModificationDate</key>
|
|
21
|
+
<dict>
|
|
22
|
+
<key>PurposeString</key>
|
|
23
|
+
<string>We use the file modification date to manage and invalidate cached map tiles, ensuring the map data displayed to users is up-to-date.</string>
|
|
24
|
+
</dict>
|
|
25
|
+
</dict>
|
|
26
|
+
</plist>
|
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.15.
|
|
8
|
+
"version": "1.15.2",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -13,6 +13,9 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
|
|
14
14
|
s.source = { :git => "https://github.com/react-native-maps/react-native-maps.git", :tag=> "v#{s.version}" }
|
|
15
15
|
s.source_files = "ios/AirGoogleMaps/**/*.{h,m}"
|
|
16
|
+
s.resource_bundles = {
|
|
17
|
+
'GoogleMapsPrivacy' => ['ios/AirGoogleMaps/Resources/GoogleMapsPrivacy.bundle']
|
|
18
|
+
}
|
|
16
19
|
s.compiler_flags = '-DHAVE_GOOGLE_MAPS=1', '-DHAVE_GOOGLE_MAPS_UTILS=1'
|
|
17
20
|
s.pod_target_xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-maps"' }
|
|
18
21
|
|
|
@@ -13,6 +13,8 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
|
|
14
14
|
s.source = { :git => "https://github.com/react-native-maps/react-native-maps.git", :tag=> "v#{s.version}" }
|
|
15
15
|
s.source_files = "ios/AirMaps/**/*.{h,m}"
|
|
16
|
-
|
|
16
|
+
s.resource_bundles = {
|
|
17
|
+
'ReactNativeMapsPrivacy' => ['ios/PrivacyInfo.xcprivacy']
|
|
18
|
+
}
|
|
17
19
|
s.dependency 'React-Core'
|
|
18
20
|
end
|