react-native-maps 1.21.0-alpha.76 → 1.21.0-alpha.78
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/generated/ReactAppDependencyProvider.podspec +1 -1
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +2 -1
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +24 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +2 -1
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +2 -1
- package/android/src/main/java/com/rnmaps/fabric/PolygonManager.java +89 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +5 -1
- package/android/src/main/java/com/rnmaps/maps/MapPolygon.java +29 -0
- package/android/src/main/java/com/rnmaps/maps/MapView.java +6 -2
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +2 -2
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +1 -1
- package/lib/decorateMapComponent.js +8 -7
- package/lib/specs/NativeComponentGooglePolygon.js +1 -3
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This source code is licensed under the MIT license found in the
|
|
4
4
|
# LICENSE file in the root directory of this source tree.
|
|
5
5
|
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.78.0"
|
|
7
7
|
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
8
8
|
if version == '1000.0.0'
|
|
9
9
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
package/android/generated/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
package com.facebook.react.viewmanagers;
|
|
11
11
|
|
|
12
12
|
import android.view.View;
|
|
13
|
+
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
|
13
14
|
|
|
14
|
-
public interface RNMapsCalloutManagerInterface<T extends View> {
|
|
15
|
+
public interface RNMapsCalloutManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
15
16
|
void setAlphaHitTest(T view, boolean value);
|
|
16
17
|
void setTooltip(T view, boolean value);
|
|
17
18
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
package com.facebook.react.viewmanagers;
|
|
11
|
+
|
|
12
|
+
import android.view.View;
|
|
13
|
+
import androidx.annotation.Nullable;
|
|
14
|
+
import com.facebook.react.bridge.ColorPropConverter;
|
|
15
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
16
|
+
import com.facebook.react.uimanager.BaseViewManager;
|
|
17
|
+
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
|
18
|
+
import com.facebook.react.uimanager.LayoutShadowNode;
|
|
19
|
+
|
|
20
|
+
public class RNMapsGooglePolygonManagerDelegate<T extends View, U extends BaseViewManager<T, ? extends LayoutShadowNode> & RNMapsGooglePolygonManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
|
21
|
+
public RNMapsGooglePolygonManagerDelegate(U viewManager) {
|
|
22
|
+
super(viewManager);
|
|
23
|
+
}
|
|
24
|
+
@Override
|
|
25
|
+
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
26
|
+
switch (propName) {
|
|
27
|
+
case "coordinates":
|
|
28
|
+
mViewManager.setCoordinates(view, (ReadableArray) value);
|
|
29
|
+
break;
|
|
30
|
+
case "fillColor":
|
|
31
|
+
mViewManager.setFillColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
|
32
|
+
break;
|
|
33
|
+
case "strokeColor":
|
|
34
|
+
mViewManager.setStrokeColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
|
35
|
+
break;
|
|
36
|
+
case "geodesic":
|
|
37
|
+
mViewManager.setGeodesic(view, value == null ? false : (boolean) value);
|
|
38
|
+
break;
|
|
39
|
+
case "holes":
|
|
40
|
+
mViewManager.setHoles(view, (ReadableArray) value);
|
|
41
|
+
break;
|
|
42
|
+
case "tappable":
|
|
43
|
+
mViewManager.setTappable(view, value == null ? false : (boolean) value);
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
super.setProperty(view, propName, value);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GeneratePropsJavaInterface.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
package com.facebook.react.viewmanagers;
|
|
11
|
+
|
|
12
|
+
import android.view.View;
|
|
13
|
+
import androidx.annotation.Nullable;
|
|
14
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
15
|
+
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
|
16
|
+
|
|
17
|
+
public interface RNMapsGooglePolygonManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
18
|
+
void setCoordinates(T view, @Nullable ReadableArray value);
|
|
19
|
+
void setFillColor(T view, @Nullable Integer value);
|
|
20
|
+
void setStrokeColor(T view, @Nullable Integer value);
|
|
21
|
+
void setGeodesic(T view, boolean value);
|
|
22
|
+
void setHoles(T view, @Nullable ReadableArray value);
|
|
23
|
+
void setTappable(T view, boolean value);
|
|
24
|
+
}
|
package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java
CHANGED
|
@@ -12,8 +12,9 @@ package com.facebook.react.viewmanagers;
|
|
|
12
12
|
import android.view.View;
|
|
13
13
|
import androidx.annotation.Nullable;
|
|
14
14
|
import com.facebook.react.bridge.ReadableMap;
|
|
15
|
+
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
|
15
16
|
|
|
16
|
-
public interface RNMapsMapViewManagerInterface<T extends View> {
|
|
17
|
+
public interface RNMapsMapViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
17
18
|
void setCacheEnabled(T view, boolean value);
|
|
18
19
|
void setCamera(T view, @Nullable ReadableMap value);
|
|
19
20
|
void setCompassOffset(T view, @Nullable ReadableMap value);
|
package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java
CHANGED
|
@@ -12,8 +12,9 @@ package com.facebook.react.viewmanagers;
|
|
|
12
12
|
import android.view.View;
|
|
13
13
|
import androidx.annotation.Nullable;
|
|
14
14
|
import com.facebook.react.bridge.ReadableMap;
|
|
15
|
+
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
|
15
16
|
|
|
16
|
-
public interface RNMapsMarkerManagerInterface<T extends View> {
|
|
17
|
+
public interface RNMapsMarkerManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
17
18
|
void setAnchor(T view, @Nullable ReadableMap value);
|
|
18
19
|
void setCalloutAnchor(T view, @Nullable ReadableMap value);
|
|
19
20
|
void setImage(T view, @Nullable ReadableMap value);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
package com.rnmaps.fabric;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import androidx.annotation.Nullable;
|
|
5
|
+
|
|
6
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
8
|
+
import com.facebook.react.module.annotations.ReactModule;
|
|
9
|
+
import com.facebook.react.uimanager.ThemedReactContext;
|
|
10
|
+
import com.facebook.react.uimanager.ViewGroupManager;
|
|
11
|
+
import com.facebook.react.uimanager.ViewManagerDelegate;
|
|
12
|
+
import com.facebook.react.viewmanagers.RNMapsGooglePolygonManagerDelegate;
|
|
13
|
+
import com.facebook.react.viewmanagers.RNMapsGooglePolygonManagerInterface;
|
|
14
|
+
import com.rnmaps.maps.MapPolygon;
|
|
15
|
+
|
|
16
|
+
import java.util.HashMap;
|
|
17
|
+
import java.util.Map;
|
|
18
|
+
|
|
19
|
+
@ReactModule(name = PolygonManager.REACT_CLASS)
|
|
20
|
+
public class PolygonManager extends ViewGroupManager<MapPolygon> implements RNMapsGooglePolygonManagerInterface<MapPolygon> {
|
|
21
|
+
|
|
22
|
+
public PolygonManager(ReactApplicationContext context){
|
|
23
|
+
super(context);
|
|
24
|
+
}//
|
|
25
|
+
private final RNMapsGooglePolygonManagerDelegate<MapPolygon, PolygonManager> delegate =
|
|
26
|
+
new RNMapsGooglePolygonManagerDelegate<>(this);
|
|
27
|
+
|
|
28
|
+
@Override
|
|
29
|
+
public ViewManagerDelegate<MapPolygon> getDelegate() {
|
|
30
|
+
return delegate;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Override
|
|
34
|
+
public String getName() {
|
|
35
|
+
return REACT_CLASS;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@Override
|
|
39
|
+
public MapPolygon createViewInstance(ThemedReactContext context) {
|
|
40
|
+
return new MapPolygon(context);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
public static final String REACT_CLASS = "RNMapsGooglePolygon";
|
|
46
|
+
|
|
47
|
+
@Nullable
|
|
48
|
+
@Override
|
|
49
|
+
public Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
|
|
50
|
+
return MapPolygon.getExportedCustomBubblingEventTypeConstants();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@Nullable
|
|
54
|
+
@Override
|
|
55
|
+
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
|
56
|
+
return new HashMap<>();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@Override
|
|
61
|
+
public void setCoordinates(MapPolygon view, @Nullable ReadableArray value) {
|
|
62
|
+
view.setCoordinates(value);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@Override
|
|
66
|
+
public void setFillColor(MapPolygon view, @Nullable Integer value) {
|
|
67
|
+
view.setFillColor(value);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@Override
|
|
71
|
+
public void setStrokeColor(MapPolygon view, @Nullable Integer value) {
|
|
72
|
+
view.setStrokeColor(value);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@Override
|
|
76
|
+
public void setGeodesic(MapPolygon view, boolean value) {
|
|
77
|
+
view.setGeodesic(value);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@Override
|
|
81
|
+
public void setHoles(MapPolygon view, @Nullable ReadableArray value) {
|
|
82
|
+
view.setHoles(value);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@Override
|
|
86
|
+
public void setTappable(MapPolygon view, boolean value) {
|
|
87
|
+
view.setTappable(value);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -13,6 +13,7 @@ import com.rnmaps.fabric.MapViewManager;
|
|
|
13
13
|
import com.rnmaps.fabric.MarkerManager;
|
|
14
14
|
import com.rnmaps.fabric.NativeAirMapsModule;
|
|
15
15
|
import com.facebook.fbreact.specs.NativeAirMapsModuleSpec;
|
|
16
|
+
import com.rnmaps.fabric.PolygonManager;
|
|
16
17
|
|
|
17
18
|
import java.util.HashMap;
|
|
18
19
|
import java.util.List;
|
|
@@ -22,12 +23,15 @@ public class MapAirModulePackage extends TurboReactPackage {
|
|
|
22
23
|
|
|
23
24
|
@Override
|
|
24
25
|
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
25
|
-
return List.of(new MapViewManager(reactContext), new MarkerManager(reactContext), new CalloutManager(reactContext));
|
|
26
|
+
return List.of(new MapViewManager(reactContext), new MarkerManager(reactContext), new CalloutManager(reactContext), new PolygonManager(reactContext));
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
@Override
|
|
30
31
|
public NativeModule getModule(String name, ReactApplicationContext reactContext) {
|
|
32
|
+
if (PolygonManager.REACT_CLASS.equals(name)) {
|
|
33
|
+
return new PolygonManager(reactContext);
|
|
34
|
+
}
|
|
31
35
|
if (CalloutManager.REACT_CLASS.equals(name)) {
|
|
32
36
|
return new CalloutManager(reactContext);
|
|
33
37
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
package com.rnmaps.maps;
|
|
2
2
|
|
|
3
3
|
import android.content.Context;
|
|
4
|
+
import android.util.Log;
|
|
4
5
|
|
|
6
|
+
import com.facebook.react.bridge.ReactContext;
|
|
5
7
|
import com.facebook.react.bridge.ReadableArray;
|
|
6
8
|
import com.facebook.react.bridge.ReadableMap;
|
|
9
|
+
import com.facebook.react.bridge.WritableMap;
|
|
10
|
+
import com.facebook.react.common.MapBuilder;
|
|
11
|
+
import com.facebook.react.uimanager.UIManagerHelper;
|
|
12
|
+
import com.facebook.react.uimanager.events.Event;
|
|
13
|
+
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
7
14
|
import com.google.android.gms.maps.model.Dash;
|
|
8
15
|
import com.google.android.gms.maps.model.Gap;
|
|
9
16
|
import com.google.android.gms.maps.model.LatLng;
|
|
@@ -11,9 +18,11 @@ import com.google.android.gms.maps.model.PatternItem;
|
|
|
11
18
|
import com.google.android.gms.maps.model.Polygon;
|
|
12
19
|
import com.google.android.gms.maps.model.PolygonOptions;
|
|
13
20
|
import com.google.maps.android.collections.PolygonManager;
|
|
21
|
+
import com.rnmaps.fabric.event.OnPressEvent;
|
|
14
22
|
|
|
15
23
|
import java.util.ArrayList;
|
|
16
24
|
import java.util.List;
|
|
25
|
+
import java.util.Map;
|
|
17
26
|
|
|
18
27
|
public class MapPolygon extends MapFeature {
|
|
19
28
|
|
|
@@ -35,6 +44,26 @@ public class MapPolygon extends MapFeature {
|
|
|
35
44
|
super(context);
|
|
36
45
|
}
|
|
37
46
|
|
|
47
|
+
public static Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
|
|
48
|
+
MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
|
|
49
|
+
builder.put(OnPressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnPressEvent.EVENT_NAME));
|
|
50
|
+
return builder.build();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public <T extends Event> void dispatchEvent(WritableMap payload, MapView.EventCreator<T> creator, ReactContext reactContext) {
|
|
54
|
+
|
|
55
|
+
// Get the event dispatcher
|
|
56
|
+
EventDispatcher eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(reactContext, getId());
|
|
57
|
+
|
|
58
|
+
// If there is a dispatcher, create and dispatch the event
|
|
59
|
+
if (eventDispatcher != null) {
|
|
60
|
+
int surfaceId = UIManagerHelper.getSurfaceId(reactContext);
|
|
61
|
+
T event = creator.create(surfaceId, getId(), payload);
|
|
62
|
+
eventDispatcher.dispatchEvent(event);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
38
67
|
public void setCoordinates(ReadableArray coordinates) {
|
|
39
68
|
// it's kind of a bummer that we can't run map() or anything on the ReadableArray
|
|
40
69
|
this.coordinates = new ArrayList<>(coordinates.size());
|
|
@@ -486,8 +486,12 @@ public void onCreate(LifecycleOwner owner) {
|
|
|
486
486
|
public void onPolygonClick(@NonNull Polygon polygon) {
|
|
487
487
|
WritableMap event = makeClickEventData(tapLocation);
|
|
488
488
|
event.putString("action", "polygon-press");
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
MapPolygon mapPolygon = polygonMap.get(polygon);
|
|
490
|
+
mapPolygon.dispatchEvent(event, OnPressEvent::new, context);
|
|
491
|
+
event = makeClickEventData(tapLocation);
|
|
492
|
+
event.putString("action", "polygon-press");
|
|
493
|
+
event.putString("id", String.valueOf(mapPolygon.getId()));
|
|
494
|
+
dispatchEvent(event, OnPressEvent::new);
|
|
491
495
|
}
|
|
492
496
|
});
|
|
493
497
|
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
#import "RNMapsGoogleMapView.h"
|
|
11
11
|
#import "RNMapsGooglePolygonView.h"
|
|
12
|
-
#import "
|
|
12
|
+
#import "AIRGoogleMap.h"
|
|
13
13
|
#import "AIRMapMarker.h"
|
|
14
|
-
#import "
|
|
14
|
+
#import "AIRGoogleMapManager.h"
|
|
15
15
|
|
|
16
16
|
#import <react-native-maps-generated/ComponentDescriptors.h>
|
|
17
17
|
#import <react-native-maps-generated/EventEmitters.h>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
|
|
12
|
+
#import <React-RCTAppDelegate/RCTDependencyProvider.h>
|
|
13
|
+
#elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
|
|
14
|
+
#import <React_RCTAppDelegate/RCTDependencyProvider.h>
|
|
15
|
+
#else
|
|
16
|
+
#import "RCTDependencyProvider.h"
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
@interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
|
|
22
|
+
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import "RCTAppDependencyProvider.h"
|
|
9
|
+
#import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
|
|
10
|
+
#import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
|
|
11
|
+
|
|
12
|
+
@implementation RCTAppDependencyProvider {
|
|
13
|
+
NSArray<NSString *> * _URLRequestHandlerClassNames;
|
|
14
|
+
NSArray<NSString *> * _imageDataDecoderClassNames;
|
|
15
|
+
NSArray<NSString *> * _imageURLLoaderClassNames;
|
|
16
|
+
NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
|
|
20
|
+
static dispatch_once_t requestUrlToken;
|
|
21
|
+
dispatch_once(&requestUrlToken, ^{
|
|
22
|
+
self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return _URLRequestHandlerClassNames;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
|
|
29
|
+
static dispatch_once_t dataDecoderToken;
|
|
30
|
+
dispatch_once(&dataDecoderToken, ^{
|
|
31
|
+
_imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return _imageDataDecoderClassNames;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
- (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
|
|
38
|
+
static dispatch_once_t urlLoaderToken;
|
|
39
|
+
dispatch_once(&urlLoaderToken, ^{
|
|
40
|
+
_imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return _imageURLLoaderClassNames;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
- (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
|
|
47
|
+
static dispatch_once_t nativeComponentsToken;
|
|
48
|
+
dispatch_once(&nativeComponentsToken, ^{
|
|
49
|
+
_thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return _thirdPartyFabricComponents;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@interface RCTModulesConformingToProtocolsProvider: NSObject
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames;
|
|
13
|
+
|
|
14
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames;
|
|
15
|
+
|
|
16
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
|
|
17
|
+
|
|
18
|
+
@end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import "RCTModulesConformingToProtocolsProvider.h"
|
|
9
|
+
|
|
10
|
+
@implementation RCTModulesConformingToProtocolsProvider
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames
|
|
13
|
+
{
|
|
14
|
+
return @[
|
|
15
|
+
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames
|
|
20
|
+
{
|
|
21
|
+
return @[
|
|
22
|
+
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames
|
|
27
|
+
{
|
|
28
|
+
return @[
|
|
29
|
+
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@protocol RCTComponentViewProtocol;
|
|
11
|
+
|
|
12
|
+
@interface RCTThirdPartyComponentsProvider: NSObject
|
|
13
|
+
|
|
14
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
|
|
15
|
+
|
|
16
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import "RCTThirdPartyComponentsProvider.h"
|
|
12
|
+
#import <React/RCTComponentViewProtocol.h>
|
|
13
|
+
|
|
14
|
+
@implementation RCTThirdPartyComponentsProvider
|
|
15
|
+
|
|
16
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
17
|
+
{
|
|
18
|
+
return @{
|
|
19
|
+
@"RNMapsGoogleMapView": NSClassFromString(@"RNMapsGoogleMapView"), // react-native-maps
|
|
20
|
+
@"RNMapsGooglePolygon": NSClassFromString(@"RNMapsGooglePolygonView"), // react-native-maps
|
|
21
|
+
@"RNMapsMapView": NSClassFromString(@"RNMapsMapView"), // react-native-maps
|
|
22
|
+
@"RNMapsMarker": NSClassFromString(@"RNMapsMarkerView"), // react-native-maps
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This source code is licensed under the MIT license found in the
|
|
4
4
|
# LICENSE file in the root directory of this source tree.
|
|
5
5
|
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.78.0"
|
|
7
7
|
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
8
8
|
if version == '1000.0.0'
|
|
9
9
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
@@ -45,6 +45,14 @@ function decorateMapComponent(Component, componentName, providers) {
|
|
|
45
45
|
// @ts-ignore
|
|
46
46
|
return NativeComponentMarker_1.default;
|
|
47
47
|
}
|
|
48
|
+
if (componentName === 'Polygon' &&
|
|
49
|
+
((provider === ProviderConstants_1.PROVIDER_GOOGLE &&
|
|
50
|
+
react_native_1.Platform.OS === 'ios' &&
|
|
51
|
+
exports.googleMapIsInstalled) ||
|
|
52
|
+
react_native_1.Platform.OS === 'android')) {
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
return NativeComponentGooglePolygon_1.default;
|
|
55
|
+
}
|
|
48
56
|
if (componentName === 'Callout' && react_native_1.Platform.OS === 'android') {
|
|
49
57
|
// @ts-ignore
|
|
50
58
|
return NativeComponentCallout_1.default;
|
|
@@ -62,13 +70,6 @@ function decorateMapComponent(Component, componentName, providers) {
|
|
|
62
70
|
if (react_native_1.Platform.OS !== 'android' && react_native_1.Platform.OS !== 'ios') {
|
|
63
71
|
throw new Error(`react-native-maps doesn't support ${react_native_1.Platform.OS}`);
|
|
64
72
|
}
|
|
65
|
-
if (componentName === 'Polygon' &&
|
|
66
|
-
provider === ProviderConstants_1.PROVIDER_GOOGLE &&
|
|
67
|
-
react_native_1.Platform.OS === 'ios' &&
|
|
68
|
-
exports.googleMapIsInstalled) {
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
return NativeComponentGooglePolygon_1.default;
|
|
71
|
-
}
|
|
72
73
|
const platformSupport = providerInfo[react_native_1.Platform.OS];
|
|
73
74
|
const nativeComponentName = getNativeComponentName(provider, componentName);
|
|
74
75
|
if (platformSupport === exports.NOT_SUPPORTED) {
|
|
@@ -4,6 +4,4 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
7
|
-
exports.default = (0, codegenNativeComponent_1.default)('RNMapsGooglePolygon', {
|
|
8
|
-
excludedPlatforms: ['android'],
|
|
9
|
-
});
|
|
7
|
+
exports.default = (0, codegenNativeComponent_1.default)('RNMapsGooglePolygon', {});
|
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.
|
|
8
|
+
"version": "1.21.0-alpha.78",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|