react-native-maps 1.11.0 → 1.11.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.
|
@@ -18,12 +18,13 @@ public class ViewChangesTracker {
|
|
|
18
18
|
handler = new Handler(Looper.myLooper());
|
|
19
19
|
updateRunnable = new Runnable() {
|
|
20
20
|
@Override
|
|
21
|
-
public void run() {
|
|
22
|
-
hasScheduledFrame = false;
|
|
21
|
+
public void run() {
|
|
23
22
|
update();
|
|
24
23
|
|
|
25
24
|
if (markers.size() > 0) {
|
|
26
25
|
handler.postDelayed(updateRunnable, fps);
|
|
26
|
+
} else {
|
|
27
|
+
hasScheduledFrame = false;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
};
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@property (nonatomic, strong) AIRGMSPolyline *polyline;
|
|
20
20
|
@property (nonatomic, strong) NSArray<AIRMapCoordinate *> *coordinates;
|
|
21
21
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
22
|
+
@property (nonatomic, strong) GMSMapView *originalMap;
|
|
22
23
|
|
|
23
24
|
@property (nonatomic, strong) UIColor *strokeColor;
|
|
24
25
|
@property (nonatomic, strong) NSArray<UIColor *> *strokeColors;
|
|
@@ -29,11 +29,25 @@
|
|
|
29
29
|
_coordinates = coordinates;
|
|
30
30
|
|
|
31
31
|
GMSMutablePath *path = [GMSMutablePath path];
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
if (!coordinates || coordinates.count == 0)
|
|
33
34
|
{
|
|
35
|
+
_polyline.map = nil; // Remove polyline from the map
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
for (int i = 0; i < coordinates.count; i++) {
|
|
34
40
|
[path addCoordinate:coordinates[i].coordinate];
|
|
35
41
|
}
|
|
36
42
|
|
|
43
|
+
if (!_originalMap) {
|
|
44
|
+
_originalMap = _polyline.map; // Store the original map
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!_polyline.map) {
|
|
48
|
+
_polyline.map = _originalMap;
|
|
49
|
+
}
|
|
50
|
+
|
|
37
51
|
_polyline.path = path;
|
|
38
52
|
|
|
39
53
|
[self configureStyleSpansIfNeeded];
|
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.11.
|
|
8
|
+
"version": "1.11.2",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|