react-native-maps 1.8.4 → 1.9.1

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 @@ buildscript {
12
12
  mavenCentral()
13
13
  }
14
14
  dependencies {
15
- classpath("com.android.tools.build:gradle:4.2.2")
15
+ classpath("com.android.tools.build:gradle:7.6.3")
16
16
  }
17
17
  }
18
18
  }
@@ -25,11 +25,11 @@ android {
25
25
  namespace "com.rnmaps.maps"
26
26
  }
27
27
 
28
- compileSdkVersion safeExtGet('compileSdkVersion', 31)
28
+ compileSdk safeExtGet('compileSdkVersion', 34)
29
29
 
30
30
  defaultConfig {
31
31
  minSdkVersion safeExtGet('minSdkVersion', 21)
32
- targetSdkVersion safeExtGet('targetSdkVersion', 31)
32
+ targetSdkVersion safeExtGet('targetSdkVersion', 34)
33
33
  }
34
34
  }
35
35
 
@@ -49,9 +49,9 @@ repositories {
49
49
 
50
50
  dependencies {
51
51
  implementation 'com.facebook.react:react-native:+'
52
- implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion', '18.1.0')}"
53
- implementation "com.google.android.gms:play-services-maps:${safeExtGet('playServicesVersion', '18.0.2')}"
52
+ implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion', '18.2.0')}"
53
+ implementation "com.google.android.gms:play-services-maps:${safeExtGet('playServicesVersion', '18.2.0')}"
54
54
  implementation "com.google.android.gms:play-services-location:21.0.1"
55
- implementation 'com.google.maps.android:android-maps-utils:3.4.0'
55
+ implementation 'com.google.maps.android:android-maps-utils:3.8.2'
56
56
  implementation "androidx.work:work-runtime:2.7.1"
57
57
  }
@@ -1,5 +1,5 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
@@ -13,6 +13,8 @@ import com.facebook.react.bridge.WritableMap;
13
13
  import com.facebook.react.common.MapBuilder;
14
14
  import com.facebook.react.modules.core.DeviceEventManagerModule;
15
15
  import com.facebook.react.uimanager.LayoutShadowNode;
16
+ import com.facebook.react.uimanager.ReactStylesDiffMap;
17
+ import com.facebook.react.uimanager.StateWrapper;
16
18
  import com.facebook.react.uimanager.ThemedReactContext;
17
19
  import com.facebook.react.uimanager.ViewGroupManager;
18
20
  import com.facebook.react.uimanager.annotations.ReactProp;
@@ -67,9 +69,21 @@ public class MapManager extends ViewGroupManager<MapView> {
67
69
  }
68
70
 
69
71
  @Override
70
- protected MapView createViewInstance(ThemedReactContext context) {
72
+ protected MapView createViewInstance(@NonNull ThemedReactContext context) {
71
73
  return new MapView(context, this.appContext, this, googleMapOptions);
72
74
  }
75
+ @Override
76
+ protected MapView createViewInstance(int reactTag, @NonNull ThemedReactContext reactContext, @Nullable ReactStylesDiffMap initialProps, @Nullable StateWrapper stateWrapper) {
77
+ if (initialProps != null){
78
+ if (initialProps.getString("googleMapId") != null) {
79
+ googleMapOptions.mapId(initialProps.getString("googleMapId"));
80
+ }
81
+ if (initialProps.hasKey("liteMode")) {
82
+ googleMapOptions.liteMode(initialProps.getBoolean("liteMode", false));
83
+ }
84
+ }
85
+ return super.createViewInstance(reactTag, reactContext, initialProps, stateWrapper);
86
+ }
73
87
 
74
88
  private void emitMapError(ThemedReactContext context, String message, String type) {
75
89
  WritableMap error = Arguments.createMap();
@@ -86,6 +100,18 @@ public class MapManager extends ViewGroupManager<MapView> {
86
100
  view.setRegion(region);
87
101
  }
88
102
 
103
+ @ReactProp(name = "liteMode", defaultBoolean = false)
104
+ public void setLiteMode(MapView view, boolean liteMode) {
105
+ googleMapOptions.liteMode(liteMode);
106
+ }
107
+
108
+ @ReactProp(name = "googleMapId")
109
+ public void setGoogleMapId(MapView view, @Nullable String googleMapId) {
110
+ if (googleMapId != null) {
111
+ googleMapOptions.mapId(googleMapId);
112
+ }
113
+ }
114
+
89
115
  @ReactProp(name = "initialRegion")
90
116
  public void setInitialRegion(MapView view, ReadableMap initialRegion) {
91
117
  view.setInitialRegion(initialRegion);
@@ -34,7 +34,6 @@ public class MapsPackage implements ReactPackage {
34
34
  viewManagers.add(new MapGradientPolylineManager(reactContext));
35
35
  viewManagers.add(new MapPolygonManager(reactContext));
36
36
  viewManagers.add(new MapCircleManager(reactContext));
37
- viewManagers.add(new MapLiteManager(reactContext));
38
37
  viewManagers.add(new MapUrlTileManager(reactContext));
39
38
  viewManagers.add(new MapWMSTileManager(reactContext));
40
39
  viewManagers.add(new MapLocalTileManager(reactContext));
@@ -79,6 +79,7 @@
79
79
  + (GMSCameraPosition*)makeGMSCameraPositionFromMap:(GMSMapView *)map andMKCoordinateRegion:(MKCoordinateRegion)region;
80
80
 
81
81
  - (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible;
82
+ - (instancetype) initWithMapId:(NSString *) mapId;
82
83
 
83
84
  @end
84
85
 
@@ -68,11 +68,21 @@ id regionAsJSON(MKCoordinateRegion region) {
68
68
  BOOL _didPrepareMap;
69
69
  BOOL _didCallOnMapReady;
70
70
  BOOL _zoomTapEnabled;
71
+ NSString* _googleMapId;
71
72
  }
72
73
 
73
- - (instancetype)init
74
+ - (instancetype)initWithMapId:(NSString *)mapId
74
75
  {
75
- if ((self = [super init])) {
76
+ if (mapId){
77
+ GMSMapID *mapID = [GMSMapID mapIDWithIdentifier:mapId];
78
+ GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:47.0169
79
+ longitude:-122.336471
80
+ zoom:12];
81
+ self = [super initWithFrame:CGRectZero mapID:mapID camera:camera];
82
+ } else {
83
+ self = [super init];
84
+ }
85
+ if (self) {
76
86
  _reactSubviews = [NSMutableArray new];
77
87
  _markers = [NSMutableArray array];
78
88
  _polygons = [NSMutableArray array];
@@ -105,6 +115,10 @@ id regionAsJSON(MKCoordinateRegion region) {
105
115
  return self;
106
116
  }
107
117
 
118
+ - (instancetype) init {
119
+ return [self initWithMapId:nil];
120
+ }
121
+
108
122
  - (void)dealloc {
109
123
  [self removeObserver:self
110
124
  forKeyPath:@"myLocation"
@@ -292,6 +306,10 @@ id regionAsJSON(MKCoordinateRegion region) {
292
306
  }
293
307
  }
294
308
 
309
+ - (void) setGoogleMapId:(NSString *) googleMapId {
310
+ _googleMapId = googleMapId;
311
+ }
312
+
295
313
  - (void)setCameraProp:(GMSCameraPosition*)camera {
296
314
  _initialCamera = camera;
297
315
  self.camera = camera;
@@ -10,6 +10,9 @@
10
10
  #import <React/RCTViewManager.h>
11
11
 
12
12
  @interface AIRGoogleMapManager : RCTViewManager
13
+
14
+ @property (nonatomic, strong) NSDictionary *initialProps;
15
+
13
16
  @property (nonatomic) BOOL isGesture;
14
17
 
15
18
  @end
@@ -46,8 +46,11 @@ RCT_EXPORT_MODULE()
46
46
  - (UIView *)view
47
47
  {
48
48
  [GMSServices setMetalRendererEnabled:YES];
49
-
50
- AIRGoogleMap *map = [AIRGoogleMap new];
49
+ NSString* googleMapId = nil;
50
+ if (self.initialProps && self.initialProps[@"googleMapId"]){
51
+ googleMapId = self.initialProps[@"googleMapId"];
52
+ }
53
+ AIRGoogleMap *map = [[AIRGoogleMap alloc] initWithMapId:googleMapId];
51
54
  map.bridge = self.bridge;
52
55
  map.delegate = self;
53
56
  map.isAccessibilityElement = NO;
@@ -67,6 +70,7 @@ RCT_EXPORT_MODULE()
67
70
 
68
71
  RCT_EXPORT_VIEW_PROPERTY(isAccessibilityElement, BOOL)
69
72
  RCT_REMAP_VIEW_PROPERTY(testID, accessibilityIdentifier, NSString)
73
+ RCT_EXPORT_VIEW_PROPERTY(googleMapId, NSString)
70
74
  RCT_EXPORT_VIEW_PROPERTY(initialCamera, GMSCameraPosition)
71
75
  RCT_REMAP_VIEW_PROPERTY(camera, cameraProp, GMSCameraPosition)
72
76
  RCT_EXPORT_VIEW_PROPERTY(initialRegion, MKCoordinateRegion)
@@ -97,12 +97,12 @@ CGRect unionRect(CGRect a, CGRect b) {
97
97
  }
98
98
 
99
99
  - (void)removeReactSubview:(id<RCTComponent>)dummySubview {
100
- UIView* subview = ((AIRDummyView*)dummySubview).view;
100
+ UIView *subview = [dummySubview isKindOfClass:[AIRDummyView class]] ? ((AIRDummyView *)dummySubview).view : (UIView *)dummySubview;
101
101
 
102
102
  if ([subview isKindOfClass:[AIRGoogleMapCallout class]]) {
103
103
  self.calloutView = nil;
104
104
  } else {
105
- [(UIView*)subview removeFromSuperview];
105
+ [subview removeFromSuperview];
106
106
  }
107
107
  [super removeReactSubview:(UIView*)dummySubview];
108
108
  }
@@ -6,7 +6,5 @@
6
6
  #import "AIRMapCoordinate.h"
7
7
 
8
8
 
9
- @implementation AIRMapCoordinate {
10
-
11
- }
12
- @end
9
+ @implementation AIRMapCoordinate
10
+ @end
@@ -0,0 +1,13 @@
1
+ //
2
+ // RCTComponentData+Maps.h
3
+ // AirMaps
4
+ //
5
+ // Created by Salah Ghanim on 24.12.23.
6
+ // Copyright © 2023 Christopher. All rights reserved.
7
+ //
8
+
9
+ #import <React/RCTComponentData.h>
10
+
11
+ @interface RCTComponentData (Maps)
12
+
13
+ @end
@@ -0,0 +1,55 @@
1
+ //
2
+ // RCTComponentData+Maps.m
3
+ // AirMaps
4
+ //
5
+ // Created by Salah Ghanim on 24.12.23.
6
+ // Copyright © 2023 Christopher. All rights reserved.
7
+ //
8
+
9
+ #import "RCTComponentData+Maps.h"
10
+ #import <objc/runtime.h>
11
+ #import <Foundation/NSObjCRuntime.h>
12
+
13
+ @implementation RCTComponentData (Maps)
14
+
15
+
16
+ - (void) myCustom_setProps:(NSDictionary<NSString *, id> *)props forShadowView:(RCTShadowView *)shadowView{
17
+ // Pass initialProps to any manager that supports initialProps
18
+ id manager = [self manager];
19
+ if ([manager respondsToSelector:@selector(setInitialProps:)]) {
20
+ [manager performSelector:@selector(setInitialProps:) withObject:props];
21
+ }
22
+
23
+ // Call the original method
24
+ [self myCustom_setProps:props forShadowView:shadowView];
25
+ }
26
+
27
+ + (void)load {
28
+ static dispatch_once_t onceToken;
29
+ dispatch_once(&onceToken, ^{
30
+ Class class = [RCTComponentData class]; // Or the class where the method is defined
31
+
32
+ SEL originalSelector = @selector(setProps:forShadowView:);
33
+ SEL swizzledSelector = @selector(myCustom_setProps:forShadowView:);
34
+
35
+ Method originalMethod = class_getInstanceMethod(class, originalSelector);
36
+ Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
37
+
38
+ BOOL didAddMethod = class_addMethod(class,
39
+ originalSelector,
40
+ method_getImplementation(swizzledMethod),
41
+ method_getTypeEncoding(swizzledMethod));
42
+
43
+ if (didAddMethod) {
44
+ class_replaceMethod(class,
45
+ swizzledSelector,
46
+ method_getImplementation(originalMethod),
47
+ method_getTypeEncoding(originalMethod));
48
+ } else {
49
+ method_exchangeImplementations(originalMethod, swizzledMethod);
50
+ }
51
+ });
52
+ }
53
+
54
+
55
+ @end
@@ -25,6 +25,7 @@
25
25
  2163AA501FEAEDD100BBEC95 /* AIRMapPolylineRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2163AA4F1FEAEDD100BBEC95 /* AIRMapPolylineRenderer.m */; };
26
26
  4C99C9DE2226CF2800A8693E /* AIRWeakTimerReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C99C9DD2226CF2800A8693E /* AIRWeakTimerReference.m */; };
27
27
  4C99C9E12226D8C400A8693E /* AIRWeakMapReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C99C9E02226D8C400A8693E /* AIRWeakMapReference.m */; };
28
+ 4E0CFBDE2B388F2B0017E126 /* RCTComponentData+Maps.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E0CFBDD2B388F2B0017E126 /* RCTComponentData+Maps.m */; };
28
29
  53D31636202E723B00B55447 /* AIRMapOverlayManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D31635202E723B00B55447 /* AIRMapOverlayManager.m */; };
29
30
  53D3163A202E72FC00B55447 /* AIRMapOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D31639202E72FC00B55447 /* AIRMapOverlay.m */; };
30
31
  53D3163D202E734F00B55447 /* AIRMapOverlayRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D3163C202E734F00B55447 /* AIRMapOverlayRenderer.m */; };
@@ -112,6 +113,8 @@
112
113
  4C99C9DD2226CF2800A8693E /* AIRWeakTimerReference.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIRWeakTimerReference.m; sourceTree = "<group>"; };
113
114
  4C99C9DF2226D8C400A8693E /* AIRWeakMapReference.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIRWeakMapReference.h; sourceTree = "<group>"; };
114
115
  4C99C9E02226D8C400A8693E /* AIRWeakMapReference.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIRWeakMapReference.m; sourceTree = "<group>"; };
116
+ 4E0CFBDC2B388F2B0017E126 /* RCTComponentData+Maps.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCTComponentData+Maps.h"; sourceTree = "<group>"; };
117
+ 4E0CFBDD2B388F2B0017E126 /* RCTComponentData+Maps.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCTComponentData+Maps.m"; sourceTree = "<group>"; };
115
118
  53D31635202E723B00B55447 /* AIRMapOverlayManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AIRMapOverlayManager.m; sourceTree = "<group>"; };
116
119
  53D31637202E725E00B55447 /* AIRMapOverlayManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIRMapOverlayManager.h; sourceTree = "<group>"; };
117
120
  53D31638202E72D500B55447 /* AIRMapOverlay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AIRMapOverlay.h; sourceTree = "<group>"; };
@@ -217,6 +220,8 @@
217
220
  11FA5C531C4A1296003AC2EE /* AirMaps */ = {
218
221
  isa = PBXGroup;
219
222
  children = (
223
+ 4E0CFBDC2B388F2B0017E126 /* RCTComponentData+Maps.h */,
224
+ 4E0CFBDD2B388F2B0017E126 /* RCTComponentData+Maps.m */,
220
225
  BE2E4EC72621F63C00CC7F2E /* AIRMapUrlTileCachedOverlay.h */,
221
226
  BE2E4EC82621F63C00CC7F2E /* AIRMapUrlTileCachedOverlay.m */,
222
227
  1125B2BD1C4AD3DA007D0023 /* AIRMap.h */,
@@ -399,6 +404,7 @@
399
404
  A8494E28218891020092506D /* AIRMapWMSTileManager.m in Sources */,
400
405
  1125B2DB1C4AD3DA007D0023 /* AIRMapCallout.m in Sources */,
401
406
  53D31636202E723B00B55447 /* AIRMapOverlayManager.m in Sources */,
407
+ 4E0CFBDE2B388F2B0017E126 /* RCTComponentData+Maps.m in Sources */,
402
408
  1125B2E01C4AD3DA007D0023 /* AIRMapManager.m in Sources */,
403
409
  1125B2E61C4AD3DA007D0023 /* AIRMapPolylineManager.m in Sources */,
404
410
  9B9498DA2017EFB800158761 /* AIRGoogleMapPolygon.m in Sources */,
package/lib/Geojson.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { Feature, FeatureCollection, Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon } from 'geojson';
3
3
  import { MapMarkerProps as MarkerProps } from './MapMarker';
4
4
  import { MapPolygonProps as PolygonProps } from './MapPolygon';
@@ -151,7 +151,7 @@ export type GeojsonProps = {
151
151
  */
152
152
  zIndex?: MarkerProps['zIndex'] | PolygonProps['zIndex'] | PolylineProps['zIndex'];
153
153
  };
154
- declare const Geojson: (props: GeojsonProps) => JSX.Element;
154
+ declare const Geojson: (props: GeojsonProps) => React.JSX.Element;
155
155
  export default Geojson;
156
156
  type OverlayPressEvent = {
157
157
  type: AnyPointOverlay['type'] | AnyLineStringOverlay['type'] | AnyPolygonOverlay['type'];
@@ -34,7 +34,7 @@ export declare class MapCallout extends React.Component<MapCalloutProps> {
34
34
  getNativeComponent: () => NativeComponent<NativeProps>;
35
35
  getMapManagerCommand: (name: string) => MapManagerCommand;
36
36
  getUIManagerCommand: (name: string) => UIManagerCommand;
37
- render(): JSX.Element;
37
+ render(): React.JSX.Element;
38
38
  }
39
39
  declare const _default: typeof MapCallout;
40
40
  export default _default;
@@ -17,7 +17,7 @@ export declare class MapCalloutSubview extends React.Component<MapCalloutSubview
17
17
  getNativeComponent: () => NativeComponent<NativeProps>;
18
18
  getMapManagerCommand: (name: string) => MapManagerCommand;
19
19
  getUIManagerCommand: (name: string) => UIManagerCommand;
20
- render(): JSX.Element;
20
+ render(): React.JSX.Element;
21
21
  }
22
22
  declare const _default: typeof MapCalloutSubview;
23
23
  export default _default;
@@ -111,7 +111,7 @@ export declare class MapCircle extends React.Component<MapCircleProps> {
111
111
  private circle;
112
112
  constructor(props: MapCircleProps);
113
113
  setNativeProps(props: Partial<NativeProps>): void;
114
- render(): JSX.Element;
114
+ render(): React.JSX.Element;
115
115
  }
116
116
  declare const _default: typeof MapCircle;
117
117
  export default _default;
@@ -69,7 +69,7 @@ export declare class MapHeatmap extends React.Component<MapHeatmapProps> {
69
69
  private heatmap;
70
70
  constructor(props: MapHeatmapProps);
71
71
  setNativeProps(props: Partial<NativeProps>): void;
72
- render(): JSX.Element;
72
+ render(): React.JSX.Element;
73
73
  }
74
74
  declare const _default: typeof MapHeatmap;
75
75
  export default _default;
@@ -29,7 +29,7 @@ export declare class MapLocalTile extends React.Component<MapLocalTileProps> {
29
29
  getNativeComponent: () => NativeComponent<NativeProps>;
30
30
  getMapManagerCommand: (name: string) => MapManagerCommand;
31
31
  getUIManagerCommand: (name: string) => UIManagerCommand;
32
- render(): JSX.Element;
32
+ render(): React.JSX.Element;
33
33
  }
34
34
  declare const _default: typeof MapLocalTile;
35
35
  export default _default;
@@ -276,17 +276,13 @@ export declare class MapMarker extends React.Component<MapMarkerProps> {
276
276
  static Animated: Animated.AnimatedComponent<typeof MapMarker>;
277
277
  private marker;
278
278
  constructor(props: MapMarkerProps);
279
- /**
280
- * @deprecated Will be removed in v2.0.0, as setNativeProps is not a thing in fabric.
281
- * See https://reactnative.dev/docs/new-architecture-library-intro#migrating-off-setnativeprops
282
- */
283
279
  setNativeProps(props: Partial<NativeProps>): void;
284
280
  showCallout(): void;
285
281
  hideCallout(): void;
286
282
  redrawCallout(): void;
287
283
  animateMarkerToCoordinate(coordinate: LatLng, duration?: number): void;
288
284
  redraw(): void;
289
- render(): JSX.Element;
285
+ render(): React.JSX.Element;
290
286
  }
291
287
  declare const _default: typeof MapMarker;
292
288
  export default _default;
package/lib/MapMarker.js CHANGED
@@ -42,12 +42,7 @@ class MapMarker extends React.Component {
42
42
  this.redrawCallout = this.redrawCallout.bind(this);
43
43
  this.animateMarkerToCoordinate = this.animateMarkerToCoordinate.bind(this);
44
44
  }
45
- /**
46
- * @deprecated Will be removed in v2.0.0, as setNativeProps is not a thing in fabric.
47
- * See https://reactnative.dev/docs/new-architecture-library-intro#migrating-off-setnativeprops
48
- */
49
45
  setNativeProps(props) {
50
- // setNativeProps is deprecated and will be removed in next major release
51
46
  // @ts-ignore
52
47
  this.marker.current?.setNativeProps(props);
53
48
  }
@@ -60,7 +60,7 @@ export declare class MapOverlay extends React.Component<MapOverlayProps> {
60
60
  getMapManagerCommand: (name: string) => MapManagerCommand;
61
61
  getUIManagerCommand: (name: string) => UIManagerCommand;
62
62
  static Animated: Animated.AnimatedComponent<typeof MapOverlay>;
63
- render(): JSX.Element;
63
+ render(): React.JSX.Element;
64
64
  }
65
65
  type Coordinate = [number, number];
66
66
  type OverlayPressEvent = NativeSyntheticEvent<{
@@ -134,7 +134,7 @@ export declare class MapPolygon extends React.Component<MapPolygonProps> {
134
134
  private polygon;
135
135
  constructor(props: MapPolygonProps);
136
136
  setNativeProps(props: Partial<MapPolygonProps>): void;
137
- render(): JSX.Element;
137
+ render(): React.JSX.Element;
138
138
  }
139
139
  declare const _default: typeof MapPolygon;
140
140
  export default _default;
@@ -135,7 +135,7 @@ export declare class MapPolyline extends React.Component<MapPolylineProps> {
135
135
  private polyline;
136
136
  constructor(props: MapPolylineProps);
137
137
  setNativeProps(props: Partial<NativeProps>): void;
138
- render(): JSX.Element;
138
+ render(): React.JSX.Element;
139
139
  }
140
140
  declare const _default: typeof MapPolyline;
141
141
  export default _default;
@@ -128,7 +128,7 @@ export declare class MapUrlTile extends React.Component<MapUrlTileProps> {
128
128
  getNativeComponent: () => NativeComponent<NativeProps>;
129
129
  getMapManagerCommand: (name: string) => MapManagerCommand;
130
130
  getUIManagerCommand: (name: string) => UIManagerCommand;
131
- render(): JSX.Element;
131
+ render(): React.JSX.Element;
132
132
  }
133
133
  declare const _default: typeof MapUrlTile;
134
134
  export default _default;
package/lib/MapView.d.ts CHANGED
@@ -95,6 +95,11 @@ export type MapViewProps = ViewProps & {
95
95
  * @platform Android: Supported
96
96
  */
97
97
  liteMode?: boolean;
98
+ /**
99
+ * https://developers.google.com/maps/documentation/get-map-id
100
+ * google cloud mapId to enable cloud styling and more
101
+ */
102
+ googleMapId?: string;
98
103
  /**
99
104
  * Sets loading background color.
100
105
  *
@@ -573,10 +578,6 @@ declare class MapView extends React.Component<MapViewProps, State> {
573
578
  static Animated: Animated.AnimatedComponent<typeof MapView>;
574
579
  private map;
575
580
  constructor(props: MapViewProps);
576
- /**
577
- * @deprecated Will be removed in v2.0.0, as setNativeProps is not a thing in fabric.
578
- * See https://reactnative.dev/docs/new-architecture-library-intro#migrating-off-setnativeprops
579
- */
580
581
  setNativeProps(props: Partial<NativeProps>): void;
581
582
  private _onMapReady;
582
583
  private _onChange;
@@ -666,7 +667,7 @@ declare class MapView extends React.Component<MapViewProps, State> {
666
667
  private _mapManagerCommand;
667
668
  private _getHandle;
668
669
  private _runCommand;
669
- render(): JSX.Element;
670
+ render(): React.JSX.Element;
670
671
  }
671
672
  export declare const AnimatedMapView: RNAnimated.AnimatedComponent<typeof MapView>;
672
673
  export declare const enableLatestRenderer: () => any;
package/lib/MapView.js CHANGED
@@ -50,12 +50,7 @@ class MapView extends React.Component {
50
50
  this._onMapReady = this._onMapReady.bind(this);
51
51
  this._onChange = this._onChange.bind(this);
52
52
  }
53
- /**
54
- * @deprecated Will be removed in v2.0.0, as setNativeProps is not a thing in fabric.
55
- * See https://reactnative.dev/docs/new-architecture-library-intro#migrating-off-setnativeprops
56
- */
57
53
  setNativeProps(props) {
58
- console.warn('setNativeProps is deprecated and will be removed in next major release');
59
54
  // @ts-ignore
60
55
  this.map.current?.setNativeProps(props);
61
56
  }
@@ -309,6 +304,8 @@ class MapView extends React.Component {
309
304
  initialRegion: null,
310
305
  onChange: this._onChange,
311
306
  onMapReady: this._onMapReady,
307
+ liteMode: this.props.liteMode,
308
+ googleMapId: this.props.googleMapId,
312
309
  ref: this.map,
313
310
  customMapStyleString: this.props.customMapStyle
314
311
  ? JSON.stringify(this.props.customMapStyle)
@@ -329,6 +326,8 @@ class MapView extends React.Component {
329
326
  props = {
330
327
  style: this.props.style,
331
328
  region: null,
329
+ liteMode: this.props.liteMode,
330
+ googleMapId: this.props.googleMapId,
332
331
  initialRegion: this.props.initialRegion || null,
333
332
  initialCamera: this.props.initialCamera,
334
333
  ref: this.map,
@@ -340,11 +339,6 @@ class MapView extends React.Component {
340
339
  : undefined,
341
340
  };
342
341
  }
343
- if (react_native_1.Platform.OS === 'android' && this.props.liteMode) {
344
- return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
345
- <AIRMapLite {...props}/>
346
- </decorateMapComponent_1.ProviderContext.Provider>);
347
- }
348
342
  const AIRMap = getNativeMapComponent(this.props.provider);
349
343
  return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
350
344
  <AIRMap {...props}/>
@@ -364,9 +358,6 @@ else {
364
358
  : (0, decorateMapComponent_1.createNotSupportedComponent)('react-native-maps: AirGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS.');
365
359
  }
366
360
  const getNativeMapComponent = (provider) => airMaps[provider || 'default'];
367
- const AIRMapLite = react_native_1.UIManager.getViewManagerConfig('AIRMapLite')
368
- ? (0, react_native_1.requireNativeComponent)('AIRMapLite')
369
- : () => null;
370
361
  exports.AnimatedMapView = react_native_1.Animated.createAnimatedComponent(MapView);
371
362
  const enableLatestRenderer = () => {
372
363
  if (react_native_1.Platform.OS !== 'android') {
@@ -110,7 +110,7 @@ export declare class MapWMSTile extends React.Component<MapWMSTileProps> {
110
110
  getNativeComponent: () => NativeComponent<NativeProps>;
111
111
  getMapManagerCommand: (name: string) => MapManagerCommand;
112
112
  getUIManagerCommand: (name: string) => UIManagerCommand;
113
- render(): JSX.Element;
113
+ render(): React.JSX.Element;
114
114
  }
115
115
  declare const _default: typeof MapWMSTile;
116
116
  export default _default;
package/lib/index.d.ts CHANGED
@@ -33,6 +33,6 @@ export * from './ProviderConstants';
33
33
  export * from './MapView.types';
34
34
  export * from './MapPolygon.types';
35
35
  export * from './sharedTypes';
36
- export declare const MarkerAnimated: import("react-native").Animated.AnimatedComponent<typeof import("./MapMarker").MapMarker>;
37
- export declare const OverlayAnimated: import("react-native").Animated.AnimatedComponent<typeof import("./MapOverlay").MapOverlay>;
36
+ export declare const MarkerAnimated: import("react-native/types").Animated.AnimatedComponent<typeof import("./MapMarker").MapMarker>;
37
+ export declare const OverlayAnimated: import("react-native/types").Animated.AnimatedComponent<typeof import("./MapOverlay").MapOverlay>;
38
38
  export default MapView;
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.8.4",
8
+ "version": "1.9.1",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",
@@ -57,24 +57,24 @@
57
57
  "devDependencies": {
58
58
  "@commitlint/cli": "17.6.1",
59
59
  "@commitlint/config-conventional": "17.6.1",
60
- "@react-native-community/eslint-config": "3.2.0",
60
+ "@react-native/eslint-config": "^0.73.1",
61
61
  "@semantic-release/changelog": "6.0.3",
62
62
  "@semantic-release/git": "10.0.1",
63
63
  "@types/jest": "29.5.1",
64
- "@types/react-native": "0.70.13",
65
- "babel-jest": "29.5.0",
64
+ "@types/react-native": "0.72.8",
65
+ "babel-jest": "^29.6.3",
66
66
  "detox": "20.7.0",
67
67
  "eslint": "8.38.0",
68
68
  "husky": "8.0.3",
69
- "jest": "29.5.0",
70
- "prettier": "2.8.7",
71
- "react": "18.1.0",
72
- "react-native": "0.70.9",
73
- "semantic-release": "21.0.1",
69
+ "jest": "^29.6.3",
70
+ "prettier": "2.8.8",
71
+ "react": "18.2.0",
72
+ "react-native": "0.73.0",
73
+ "semantic-release": "21.1.2",
74
74
  "typescript": "5.0.4"
75
75
  },
76
76
  "dependencies": {
77
- "@types/geojson": "^7946.0.10"
77
+ "@types/geojson": "^7946.0.13"
78
78
  },
79
79
  "jest": {
80
80
  "preset": "react-native",
@@ -82,5 +82,8 @@
82
82
  "/node_modules/",
83
83
  "e2e"
84
84
  ]
85
+ },
86
+ "engines": {
87
+ "node": ">=18"
85
88
  }
86
89
  }
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
9
9
  s.authors = package["author"]
10
10
  s.homepage = package["homepage"]
11
11
  s.license = package["license"]
12
- s.platform = :ios, "13.0"
12
+ s.platform = :ios, "13.4"
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}"
@@ -1,20 +0,0 @@
1
- package com.rnmaps.maps;
2
-
3
- import com.facebook.react.bridge.ReactApplicationContext;
4
- import com.google.android.gms.maps.GoogleMapOptions;
5
-
6
- public class MapLiteManager extends MapManager {
7
-
8
- private static final String REACT_CLASS = "AIRMapLite";
9
-
10
- @Override
11
- public String getName() {
12
- return REACT_CLASS;
13
- }
14
-
15
- public MapLiteManager(ReactApplicationContext context) {
16
- super(context);
17
- this.googleMapOptions = new GoogleMapOptions().liteMode(true);
18
- }
19
-
20
- }