react-native-maps 1.23.5 → 1.23.7
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/src/main/java/com/rnmaps/maps/MapPolyline.java +8 -1
- package/android/src/main/java/com/rnmaps/maps/MapView.java +3 -3
- package/android/src/main/java/com/rnmaps/maps/MapsPackage.java +84 -27
- package/ios/AirMaps/RNMapsMapView.mm +3 -1
- package/package.json +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +0 -98
|
@@ -41,6 +41,8 @@ public class MapPolyline extends MapFeature {
|
|
|
41
41
|
private ReadableArray patternValues;
|
|
42
42
|
private List<PatternItem> pattern;
|
|
43
43
|
|
|
44
|
+
private List<StyleSpan> spans;
|
|
45
|
+
|
|
44
46
|
public MapPolyline(Context context) {
|
|
45
47
|
super(context);
|
|
46
48
|
}
|
|
@@ -76,8 +78,10 @@ public class MapPolyline extends MapFeature {
|
|
|
76
78
|
}
|
|
77
79
|
spans.add(new StyleSpan(stroke));
|
|
78
80
|
}
|
|
79
|
-
|
|
81
|
+
this.spans = spans;
|
|
82
|
+
if (polyline != null){
|
|
80
83
|
polyline.setSpans(spans);
|
|
84
|
+
}
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
public void setWidth(float width) {
|
|
@@ -178,6 +182,9 @@ public class MapPolyline extends MapFeature {
|
|
|
178
182
|
PolylineManager.Collection polylineCollection = (PolylineManager.Collection) collection;
|
|
179
183
|
polyline = polylineCollection.addPolyline(getPolylineOptions());
|
|
180
184
|
polyline.setClickable(this.tappable);
|
|
185
|
+
if (spans != null){
|
|
186
|
+
polyline.setSpans(spans);
|
|
187
|
+
}
|
|
181
188
|
}
|
|
182
189
|
|
|
183
190
|
@Override
|
|
@@ -1512,7 +1512,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1512
1512
|
|
|
1513
1513
|
MapMarker markerView = getMarkerMap(marker);
|
|
1514
1514
|
event = makeClickEventData(marker.getPosition());
|
|
1515
|
-
dispatchEvent(event,
|
|
1515
|
+
markerView.dispatchEvent(event, OnDragStartEvent::new);
|
|
1516
1516
|
}
|
|
1517
1517
|
|
|
1518
1518
|
@Override
|
|
@@ -1522,7 +1522,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1522
1522
|
|
|
1523
1523
|
MapMarker markerView = getMarkerMap(marker);
|
|
1524
1524
|
event = makeClickEventData(marker.getPosition());
|
|
1525
|
-
dispatchEvent(event,
|
|
1525
|
+
markerView.dispatchEvent(event, OnDragEvent::new);
|
|
1526
1526
|
}
|
|
1527
1527
|
|
|
1528
1528
|
@Override
|
|
@@ -1531,7 +1531,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1531
1531
|
dispatchEvent(event, OnMarkerDragEndEvent::new);
|
|
1532
1532
|
MapMarker markerView = getMarkerMap(marker);
|
|
1533
1533
|
event = makeClickEventData(marker.getPosition());
|
|
1534
|
-
dispatchEvent(event,
|
|
1534
|
+
markerView.dispatchEvent(event, OnDragEndEvent::new);
|
|
1535
1535
|
}
|
|
1536
1536
|
|
|
1537
1537
|
@Override
|
|
@@ -1,45 +1,102 @@
|
|
|
1
1
|
package com.rnmaps.maps;
|
|
2
2
|
|
|
3
|
+
import androidx.annotation.NonNull;
|
|
4
|
+
|
|
5
|
+
import com.facebook.fbreact.specs.NativeAirMapsModuleSpec;
|
|
6
|
+
import com.facebook.react.BaseReactPackage;
|
|
3
7
|
import com.facebook.react.ReactPackage;
|
|
4
8
|
import com.facebook.react.bridge.NativeModule;
|
|
5
9
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
10
|
+
import com.facebook.react.module.model.ReactModuleInfo;
|
|
11
|
+
import com.facebook.react.module.model.ReactModuleInfoProvider;
|
|
6
12
|
import com.facebook.react.uimanager.ViewManager;
|
|
13
|
+
import com.rnmaps.fabric.CalloutManager;
|
|
14
|
+
import com.rnmaps.fabric.CircleManager;
|
|
15
|
+
import com.rnmaps.fabric.MapViewManager;
|
|
16
|
+
import com.rnmaps.fabric.MarkerManager;
|
|
17
|
+
import com.rnmaps.fabric.NativeAirMapsModule;
|
|
18
|
+
import com.rnmaps.fabric.OverlayManager;
|
|
19
|
+
import com.rnmaps.fabric.PolygonManager;
|
|
20
|
+
import com.rnmaps.fabric.PolylineManager;
|
|
21
|
+
import com.rnmaps.fabric.UrlTileManager;
|
|
22
|
+
import com.rnmaps.fabric.WMSTileManager;
|
|
7
23
|
|
|
8
|
-
import java.util.
|
|
24
|
+
import java.util.HashMap;
|
|
9
25
|
import java.util.List;
|
|
26
|
+
import java.util.Map;
|
|
10
27
|
|
|
11
|
-
public class MapsPackage implements ReactPackage {
|
|
28
|
+
public class MapsPackage extends BaseReactPackage implements ReactPackage {
|
|
12
29
|
|
|
13
30
|
@Override
|
|
14
|
-
public List<
|
|
15
|
-
List
|
|
31
|
+
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
32
|
+
return List.of(new MapViewManager(reactContext),
|
|
33
|
+
new MarkerManager(reactContext),
|
|
34
|
+
new CalloutManager(reactContext),
|
|
35
|
+
new PolygonManager(reactContext),
|
|
36
|
+
new PolylineManager(reactContext),
|
|
37
|
+
new CircleManager(reactContext),
|
|
38
|
+
new OverlayManager(reactContext),
|
|
39
|
+
new UrlTileManager(reactContext),
|
|
40
|
+
new WMSTileManager(reactContext),
|
|
41
|
+
new MapGradientPolylineManager(reactContext),
|
|
42
|
+
new MapLocalTileManager(reactContext),
|
|
43
|
+
new MapHeatmapManager());
|
|
44
|
+
}
|
|
16
45
|
|
|
17
|
-
modules.add(new MapModule(reactContext));
|
|
18
46
|
|
|
19
|
-
|
|
47
|
+
@Override
|
|
48
|
+
public NativeModule getModule(String name, ReactApplicationContext reactContext) {
|
|
49
|
+
if (OverlayManager.REACT_CLASS.equals(name)) {
|
|
50
|
+
return new OverlayManager(reactContext);
|
|
51
|
+
}
|
|
52
|
+
if (CircleManager.REACT_CLASS.equals(name)) {
|
|
53
|
+
return new CircleManager(reactContext);
|
|
54
|
+
}
|
|
55
|
+
if (PolylineManager.REACT_CLASS.equals(name)) {
|
|
56
|
+
return new PolylineManager(reactContext);
|
|
57
|
+
}
|
|
58
|
+
if (PolygonManager.REACT_CLASS.equals(name)) {
|
|
59
|
+
return new PolygonManager(reactContext);
|
|
60
|
+
}
|
|
61
|
+
if (CalloutManager.REACT_CLASS.equals(name)) {
|
|
62
|
+
return new CalloutManager(reactContext);
|
|
63
|
+
}
|
|
64
|
+
if (MarkerManager.REACT_CLASS.equals(name)) {
|
|
65
|
+
return new MarkerManager(reactContext);
|
|
66
|
+
}
|
|
67
|
+
if (MapViewManager.REACT_CLASS.equals(name)) {
|
|
68
|
+
return new MapViewManager(reactContext);
|
|
69
|
+
}
|
|
70
|
+
if (UrlTileManager.REACT_CLASS.equals(name)) {
|
|
71
|
+
return new UrlTileManager(reactContext);
|
|
72
|
+
}
|
|
73
|
+
if (WMSTileManager.REACT_CLASS.equals(name)) {
|
|
74
|
+
return new WMSTileManager(reactContext);
|
|
75
|
+
}
|
|
76
|
+
if (NativeAirMapsModuleSpec.NAME.equals(name)) {
|
|
77
|
+
return new NativeAirMapsModule(reactContext);
|
|
78
|
+
} else {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
20
81
|
}
|
|
21
82
|
|
|
22
83
|
@Override
|
|
23
|
-
public
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
viewManagers.add(new MapOverlayManager(reactContext));
|
|
41
|
-
viewManagers.add(new MapHeatmapManager());
|
|
42
|
-
|
|
43
|
-
return viewManagers;
|
|
84
|
+
public ReactModuleInfoProvider getReactModuleInfoProvider() {
|
|
85
|
+
return new ReactModuleInfoProvider() {
|
|
86
|
+
@NonNull
|
|
87
|
+
@Override
|
|
88
|
+
public Map<String, ReactModuleInfo> getReactModuleInfos() {
|
|
89
|
+
Map<String, ReactModuleInfo> map = new HashMap<>();
|
|
90
|
+
map.put(NativeAirMapsModuleSpec.NAME, new ReactModuleInfo(
|
|
91
|
+
NativeAirMapsModuleSpec.NAME, // name
|
|
92
|
+
NativeAirMapsModuleSpec.NAME, // className
|
|
93
|
+
false, // canOverrideExistingModule
|
|
94
|
+
false, // needsEagerInit
|
|
95
|
+
false, // isCXXModule
|
|
96
|
+
true // isTurboModule
|
|
97
|
+
));
|
|
98
|
+
return map;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
44
101
|
}
|
|
45
102
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
#import "AIRMapManager.h"
|
|
13
13
|
#import "RNMapsMarkerView.h"
|
|
14
14
|
#if __has_include(<ReactNativeMaps/generated/RNMapsAirModuleDelegate.h>)
|
|
15
|
+
#import <ReactNativeMaps/generated/RNMapsAirModuleDelegate.h>
|
|
15
16
|
#import <ReactNativeMaps/generated/RNMapsSpecs.h>
|
|
16
17
|
#import <ReactNativeMaps/generated/RNMapsHostVewDelegate.h>
|
|
17
18
|
#import <ReactNativeMaps/generated/ComponentDescriptors.h>
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
#import <ReactNativeMaps/generated/Props.h>
|
|
20
21
|
#import <ReactNativeMaps/generated/RCTComponentViewHelpers.h>
|
|
21
22
|
#else
|
|
23
|
+
#import "../generated/RNMapsAirModuleDelegate.h"
|
|
22
24
|
#import "../generated/RNMapsSpecs/RNMapsSpecs.h"
|
|
23
25
|
#import "../generated/RNMapsSpecs/ComponentDescriptors.h"
|
|
24
26
|
#import "../generated/RNMapsSpecs/EventEmitters.h"
|
|
@@ -41,7 +43,7 @@ using namespace facebook::react;
|
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
- (id<RNMapsAirModuleDelegate>) mapView {
|
|
44
|
-
return
|
|
46
|
+
return (id<RNMapsAirModuleDelegate>)_view;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
- (void) prepareForRecycle
|
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.23.
|
|
8
|
+
"version": "1.23.7",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
package com.rnmaps.maps;
|
|
2
|
-
|
|
3
|
-
import androidx.annotation.NonNull;
|
|
4
|
-
|
|
5
|
-
import com.facebook.react.TurboReactPackage;
|
|
6
|
-
import com.facebook.react.bridge.NativeModule;
|
|
7
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
8
|
-
import com.facebook.react.module.model.ReactModuleInfo;
|
|
9
|
-
import com.facebook.react.module.model.ReactModuleInfoProvider;
|
|
10
|
-
import com.facebook.react.uimanager.ViewManager;
|
|
11
|
-
import com.facebook.fbreact.specs.NativeAirMapsModuleSpec;
|
|
12
|
-
import com.rnmaps.fabric.CalloutManager;
|
|
13
|
-
import com.rnmaps.fabric.CircleManager;
|
|
14
|
-
import com.rnmaps.fabric.MapViewManager;
|
|
15
|
-
import com.rnmaps.fabric.MarkerManager;
|
|
16
|
-
import com.rnmaps.fabric.NativeAirMapsModule;
|
|
17
|
-
import com.rnmaps.fabric.OverlayManager;
|
|
18
|
-
import com.rnmaps.fabric.PolygonManager;
|
|
19
|
-
import com.rnmaps.fabric.PolylineManager;
|
|
20
|
-
import com.rnmaps.fabric.UrlTileManager;
|
|
21
|
-
import com.rnmaps.fabric.WMSTileManager;
|
|
22
|
-
|
|
23
|
-
import java.util.HashMap;
|
|
24
|
-
import java.util.List;
|
|
25
|
-
import java.util.Map;
|
|
26
|
-
|
|
27
|
-
public class MapAirModulePackage extends TurboReactPackage {
|
|
28
|
-
|
|
29
|
-
@Override
|
|
30
|
-
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
31
|
-
return List.of(new MapViewManager(reactContext),
|
|
32
|
-
new MarkerManager(reactContext),
|
|
33
|
-
new CalloutManager(reactContext),
|
|
34
|
-
new PolygonManager(reactContext),
|
|
35
|
-
new PolylineManager(reactContext),
|
|
36
|
-
new CircleManager(reactContext),
|
|
37
|
-
new OverlayManager(reactContext),
|
|
38
|
-
new UrlTileManager(reactContext),
|
|
39
|
-
new WMSTileManager(reactContext));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
@Override
|
|
44
|
-
public NativeModule getModule(String name, ReactApplicationContext reactContext) {
|
|
45
|
-
if (OverlayManager.REACT_CLASS.equals(name)) {
|
|
46
|
-
return new OverlayManager(reactContext);
|
|
47
|
-
}
|
|
48
|
-
if (CircleManager.REACT_CLASS.equals(name)) {
|
|
49
|
-
return new CircleManager(reactContext);
|
|
50
|
-
}
|
|
51
|
-
if (PolylineManager.REACT_CLASS.equals(name)) {
|
|
52
|
-
return new PolylineManager(reactContext);
|
|
53
|
-
}
|
|
54
|
-
if (PolygonManager.REACT_CLASS.equals(name)) {
|
|
55
|
-
return new PolygonManager(reactContext);
|
|
56
|
-
}
|
|
57
|
-
if (CalloutManager.REACT_CLASS.equals(name)) {
|
|
58
|
-
return new CalloutManager(reactContext);
|
|
59
|
-
}
|
|
60
|
-
if (MarkerManager.REACT_CLASS.equals(name)) {
|
|
61
|
-
return new MarkerManager(reactContext);
|
|
62
|
-
}
|
|
63
|
-
if (MapViewManager.REACT_CLASS.equals(name)) {
|
|
64
|
-
return new MapViewManager(reactContext);
|
|
65
|
-
}
|
|
66
|
-
if (UrlTileManager.REACT_CLASS.equals(name)) {
|
|
67
|
-
return new UrlTileManager(reactContext);
|
|
68
|
-
}
|
|
69
|
-
if (WMSTileManager.REACT_CLASS.equals(name)) {
|
|
70
|
-
return new WMSTileManager(reactContext);
|
|
71
|
-
}
|
|
72
|
-
if (NativeAirMapsModuleSpec.NAME.equals(name)) {
|
|
73
|
-
return new NativeAirMapsModule(reactContext);
|
|
74
|
-
} else {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@Override
|
|
80
|
-
public ReactModuleInfoProvider getReactModuleInfoProvider() {
|
|
81
|
-
return new ReactModuleInfoProvider() {
|
|
82
|
-
@NonNull
|
|
83
|
-
@Override
|
|
84
|
-
public Map<String, ReactModuleInfo> getReactModuleInfos() {
|
|
85
|
-
Map<String, ReactModuleInfo> map = new HashMap<>();
|
|
86
|
-
map.put(NativeAirMapsModuleSpec.NAME, new ReactModuleInfo(
|
|
87
|
-
NativeAirMapsModuleSpec.NAME, // name
|
|
88
|
-
NativeAirMapsModuleSpec.NAME, // className
|
|
89
|
-
false, // canOverrideExistingModule
|
|
90
|
-
false, // needsEagerInit
|
|
91
|
-
false, // isCXXModule
|
|
92
|
-
true // isTurboModule
|
|
93
|
-
));
|
|
94
|
-
return map;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|