react-native-maps 1.5.0 → 1.5.1-beta.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/ios/AirMaps/AIRMapPolyline.m +3 -2
- package/lib/MapPolygon.d.ts +3 -18
- package/lib/MapPolygon.types.d.ts +18 -0
- package/lib/MapPolygon.types.js +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/package.json +1 -1
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
|
|
71
71
|
- (void)setCoordinates:(NSArray<AIRMapCoordinate *> *)coordinates {
|
|
72
72
|
_coordinates = coordinates;
|
|
73
|
-
CLLocationCoordinate2D coords
|
|
73
|
+
CLLocationCoordinate2D *coords = calloc(coordinates.count, sizeof(CLLocationCoordinate2D));
|
|
74
74
|
for(int i = 0; i < coordinates.count; i++)
|
|
75
75
|
{
|
|
76
76
|
coords[i] = coordinates[i].coordinate;
|
|
@@ -80,7 +80,8 @@
|
|
|
80
80
|
} else {
|
|
81
81
|
self.polyline = [MKPolyline polylineWithCoordinates:coords count:coordinates.count];
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
free(coords);
|
|
84
|
+
|
|
84
85
|
self.renderer = [self createRenderer];
|
|
85
86
|
[self update];
|
|
86
87
|
}
|
package/lib/MapPolygon.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { View, ViewProps } from 'react-native';
|
|
3
3
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
|
-
import {
|
|
4
|
+
import { PolygonPressEvent } from './MapPolygon.types';
|
|
5
|
+
import { LatLng, LineCapType, LineJoinType } from './sharedTypes';
|
|
5
6
|
export type MapPolygonProps = ViewProps & {
|
|
6
7
|
/**
|
|
7
8
|
* An array of coordinates to describe the polygon
|
|
@@ -137,19 +138,3 @@ export declare class MapPolygon extends React.Component<MapPolygonProps> {
|
|
|
137
138
|
}
|
|
138
139
|
declare const _default: typeof MapPolygon;
|
|
139
140
|
export default _default;
|
|
140
|
-
type PolygonPressEvent = NativeSyntheticEvent<{
|
|
141
|
-
action: 'polygon-press';
|
|
142
|
-
/**
|
|
143
|
-
* @platform iOS: Google Maps
|
|
144
|
-
*/
|
|
145
|
-
id?: string;
|
|
146
|
-
/**
|
|
147
|
-
* @platform iOS: Apple Maps
|
|
148
|
-
* @platform Android
|
|
149
|
-
*/
|
|
150
|
-
coordinate?: LatLng;
|
|
151
|
-
/**
|
|
152
|
-
* @platform Android
|
|
153
|
-
*/
|
|
154
|
-
position?: Point;
|
|
155
|
-
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NativeSyntheticEvent } from 'react-native';
|
|
2
|
+
import { LatLng, Point } from './sharedTypes';
|
|
3
|
+
export type PolygonPressEvent = NativeSyntheticEvent<{
|
|
4
|
+
action: 'polygon-press';
|
|
5
|
+
/**
|
|
6
|
+
* @platform iOS: Google Maps
|
|
7
|
+
*/
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @platform iOS: Apple Maps
|
|
11
|
+
* @platform Android
|
|
12
|
+
*/
|
|
13
|
+
coordinate?: LatLng;
|
|
14
|
+
/**
|
|
15
|
+
* @platform Android
|
|
16
|
+
*/
|
|
17
|
+
position?: Point;
|
|
18
|
+
}>;
|
package/lib/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type { MapViewProps };
|
|
|
31
31
|
export { Animated, MAP_TYPES, enableLatestRenderer };
|
|
32
32
|
export * from './ProviderConstants';
|
|
33
33
|
export * from './MapView.types';
|
|
34
|
+
export * from './MapPolygon.types';
|
|
34
35
|
export * from './sharedTypes';
|
|
35
36
|
export declare const MarkerAnimated: import("react-native").Animated.AnimatedComponent<typeof import("./MapMarker").MapMarker>;
|
|
36
37
|
export declare const OverlayAnimated: import("react-native").Animated.AnimatedComponent<typeof import("./MapOverlay").MapOverlay>;
|
package/lib/index.js
CHANGED
|
@@ -75,6 +75,7 @@ var Geojson_1 = require("./Geojson");
|
|
|
75
75
|
Object.defineProperty(exports, "Geojson", { enumerable: true, get: function () { return __importDefault(Geojson_1).default; } });
|
|
76
76
|
__exportStar(require("./ProviderConstants"), exports);
|
|
77
77
|
__exportStar(require("./MapView.types"), exports);
|
|
78
|
+
__exportStar(require("./MapPolygon.types"), exports);
|
|
78
79
|
__exportStar(require("./sharedTypes"), exports);
|
|
79
80
|
exports.MarkerAnimated = MapMarker_1.default.Animated;
|
|
80
81
|
exports.OverlayAnimated = MapOverlay_1.default.Animated;
|
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.5.
|
|
8
|
+
"version": "1.5.1-beta.2",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|