@lugg/maps 0.2.0-alpha.9 → 1.0.0-beta.0
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/README.md +20 -19
- package/android/src/main/java/com/luggmaps/LuggMapView.kt +290 -0
- package/android/src/main/java/com/luggmaps/{LuggGoogleMapViewManager.kt → LuggMapViewManager.kt} +99 -36
- package/android/src/main/java/com/luggmaps/LuggMapWrapperView.kt +13 -5
- package/android/src/main/java/com/luggmaps/LuggMarkerView.kt +157 -13
- package/android/src/main/java/com/luggmaps/LuggMarkerViewManager.kt +28 -0
- package/android/src/main/java/com/luggmaps/LuggPackage.kt +1 -4
- package/android/src/main/java/com/luggmaps/LuggPolygonView.kt +85 -0
- package/android/src/main/java/com/luggmaps/LuggPolygonViewManager.kt +100 -0
- package/android/src/main/java/com/luggmaps/LuggPolylineView.kt +16 -0
- package/android/src/main/java/com/luggmaps/LuggPolylineViewManager.kt +22 -0
- package/android/src/main/java/com/luggmaps/core/GoogleMapProvider.kt +698 -0
- package/android/src/main/java/com/luggmaps/core/MapProviderDelegate.kt +60 -0
- package/android/src/main/java/com/luggmaps/core/PolylineAnimator.kt +89 -24
- package/android/src/main/java/com/luggmaps/events/LongPressEvent.kt +29 -0
- package/android/src/main/java/com/luggmaps/events/MarkerDragEvent.kt +41 -0
- package/android/src/main/java/com/luggmaps/events/MarkerPressEvent.kt +34 -0
- package/android/src/main/java/com/luggmaps/events/PolygonPressEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/events/PressEvent.kt +29 -0
- package/ios/LuggMapView.h +9 -0
- package/ios/LuggMapView.mm +343 -0
- package/ios/LuggMarkerView.h +13 -0
- package/ios/LuggMarkerView.mm +119 -0
- package/ios/LuggPolygonView.h +31 -0
- package/ios/LuggPolygonView.mm +151 -0
- package/ios/LuggPolylineView.h +4 -0
- package/ios/LuggPolylineView.mm +23 -0
- package/ios/core/AppleMapProvider.h +15 -0
- package/ios/core/AppleMapProvider.mm +1029 -0
- package/ios/core/GMSPolylineAnimator.h +3 -0
- package/ios/core/GMSPolylineAnimator.m +101 -15
- package/ios/core/GoogleMapProvider.h +13 -0
- package/ios/core/GoogleMapProvider.mm +689 -0
- package/ios/core/MKPolylineAnimator.h +4 -0
- package/ios/core/MKPolylineAnimator.m +167 -42
- package/ios/core/MapProviderDelegate.h +84 -0
- package/ios/core/PolylineAnimatorBase.h +24 -1
- package/ios/core/PolylineAnimatorBase.m +82 -19
- package/ios/events/LongPressEvent.h +29 -0
- package/ios/events/MarkerDragEvent.h +69 -0
- package/ios/events/MarkerPressEvent.h +29 -0
- package/ios/events/PolygonPressEvent.h +20 -0
- package/ios/events/PressEvent.h +29 -0
- package/ios/extensions/MKMapView+Zoom.h +2 -0
- package/ios/extensions/MKMapView+Zoom.m +14 -4
- package/lib/module/MapProvider.js +2 -4
- package/lib/module/MapProvider.js.map +1 -1
- package/lib/module/MapProvider.web.js +12 -7
- package/lib/module/MapProvider.web.js.map +1 -1
- package/lib/module/MapView.js +33 -16
- package/lib/module/MapView.js.map +1 -1
- package/lib/module/MapView.web.js +283 -181
- package/lib/module/MapView.web.js.map +1 -1
- package/lib/module/components/GeoJson.js +159 -0
- package/lib/module/components/GeoJson.js.map +1 -0
- package/lib/module/components/GeoJson.types.js +4 -0
- package/lib/module/components/GeoJson.types.js.map +1 -0
- package/lib/module/components/Marker.js +28 -4
- package/lib/module/components/Marker.js.map +1 -1
- package/lib/module/components/Marker.types.js +4 -0
- package/lib/module/components/Marker.types.js.map +1 -0
- package/lib/module/components/Marker.web.js +98 -27
- package/lib/module/components/Marker.web.js.map +1 -1
- package/lib/module/components/Polygon.js +46 -0
- package/lib/module/components/Polygon.js.map +1 -0
- package/lib/module/components/Polygon.types.js +4 -0
- package/lib/module/components/Polygon.types.js.map +1 -0
- package/lib/module/components/Polygon.web.js +87 -0
- package/lib/module/components/Polygon.web.js.map +1 -0
- package/lib/module/components/Polyline.js +17 -4
- package/lib/module/components/Polyline.js.map +1 -1
- package/lib/module/components/Polyline.types.js +4 -0
- package/lib/module/components/Polyline.types.js.map +1 -0
- package/lib/module/components/Polyline.web.js +108 -31
- package/lib/module/components/Polyline.web.js.map +1 -1
- package/lib/module/components/index.js +4 -2
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/index.web.js +2 -0
- package/lib/module/components/index.web.js.map +1 -1
- package/lib/module/fabric/{LuggGoogleMapViewNativeComponent.ts → LuggMapViewNativeComponent.ts} +43 -7
- package/lib/module/fabric/LuggMarkerViewNativeComponent.ts +49 -1
- package/lib/module/fabric/LuggPolygonViewNativeComponent.ts +25 -0
- package/lib/module/fabric/LuggPolylineViewNativeComponent.ts +8 -0
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +4 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/typescript/src/MapProvider.d.ts +1 -1
- package/lib/typescript/src/MapProvider.d.ts.map +1 -1
- package/lib/typescript/src/MapProvider.web.d.ts +17 -1
- package/lib/typescript/src/MapProvider.web.d.ts.map +1 -1
- package/lib/typescript/src/MapView.d.ts +4 -4
- package/lib/typescript/src/MapView.d.ts.map +1 -1
- package/lib/typescript/src/MapView.types.d.ts +35 -9
- package/lib/typescript/src/MapView.types.d.ts.map +1 -1
- package/lib/typescript/src/MapView.web.d.ts +2 -11
- package/lib/typescript/src/MapView.web.d.ts.map +1 -1
- package/lib/typescript/src/components/GeoJson.d.ts +4 -0
- package/lib/typescript/src/components/GeoJson.d.ts.map +1 -0
- package/lib/typescript/src/components/GeoJson.types.d.ts +79 -0
- package/lib/typescript/src/components/GeoJson.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Marker.d.ts +6 -33
- package/lib/typescript/src/components/Marker.d.ts.map +1 -1
- package/lib/typescript/src/components/Marker.types.d.ts +74 -0
- package/lib/typescript/src/components/Marker.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Marker.web.d.ts +2 -5
- package/lib/typescript/src/components/Marker.web.d.ts.map +1 -1
- package/lib/typescript/src/components/Polygon.d.ts +10 -0
- package/lib/typescript/src/components/Polygon.d.ts.map +1 -0
- package/lib/typescript/src/components/Polygon.types.d.ts +33 -0
- package/lib/typescript/src/components/Polygon.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Polygon.web.d.ts +3 -0
- package/lib/typescript/src/components/Polygon.web.d.ts.map +1 -0
- package/lib/typescript/src/components/Polyline.d.ts +6 -21
- package/lib/typescript/src/components/Polyline.d.ts.map +1 -1
- package/lib/typescript/src/components/Polyline.types.d.ts +53 -0
- package/lib/typescript/src/components/Polyline.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Polyline.web.d.ts +2 -5
- package/lib/typescript/src/components/Polyline.web.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +8 -2
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/index.web.d.ts +6 -2
- package/lib/typescript/src/components/index.web.d.ts.map +1 -1
- package/lib/typescript/src/fabric/{LuggGoogleMapViewNativeComponent.d.ts → LuggMapViewNativeComponent.d.ts} +30 -4
- package/lib/typescript/src/fabric/LuggMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts +45 -1
- package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/fabric/LuggPolygonViewNativeComponent.d.ts +18 -0
- package/lib/typescript/src/fabric/LuggPolygonViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggPolylineViewNativeComponent.d.ts +7 -0
- package/lib/typescript/src/fabric/LuggPolylineViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +11 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +9 -1
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +11 -0
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/MapProvider.tsx +1 -3
- package/src/MapProvider.web.tsx +12 -3
- package/src/MapView.tsx +32 -26
- package/src/MapView.types.ts +43 -9
- package/src/MapView.web.tsx +345 -211
- package/src/components/GeoJson.tsx +221 -0
- package/src/components/GeoJson.types.ts +107 -0
- package/src/components/Marker.tsx +45 -36
- package/src/components/Marker.types.ts +75 -0
- package/src/components/Marker.web.tsx +116 -28
- package/src/components/Polygon.tsx +52 -0
- package/src/components/Polygon.types.ts +33 -0
- package/src/components/Polygon.web.tsx +104 -0
- package/src/components/Polyline.tsx +23 -22
- package/src/components/Polyline.types.ts +55 -0
- package/src/components/Polyline.web.tsx +151 -37
- package/src/components/index.ts +16 -2
- package/src/components/index.web.ts +6 -2
- package/src/fabric/{LuggGoogleMapViewNativeComponent.ts → LuggMapViewNativeComponent.ts} +43 -7
- package/src/fabric/LuggMarkerViewNativeComponent.ts +49 -1
- package/src/fabric/LuggPolygonViewNativeComponent.ts +25 -0
- package/src/fabric/LuggPolylineViewNativeComponent.ts +8 -0
- package/src/index.ts +28 -1
- package/src/index.web.ts +15 -1
- package/src/types.ts +13 -0
- package/android/src/main/java/com/luggmaps/LuggGoogleMapView.kt +0 -511
- package/ios/LuggAppleMapView.h +0 -16
- package/ios/LuggAppleMapView.mm +0 -592
- package/ios/LuggGoogleMapView.h +0 -13
- package/ios/LuggGoogleMapView.mm +0 -455
- package/lib/module/fabric/LuggAppleMapViewNativeComponent.ts +0 -83
- package/lib/typescript/src/fabric/LuggAppleMapViewNativeComponent.d.ts +0 -54
- package/lib/typescript/src/fabric/LuggAppleMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/fabric/LuggGoogleMapViewNativeComponent.d.ts.map +0 -1
- package/src/fabric/LuggAppleMapViewNativeComponent.ts +0 -83
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
3
|
-
import type { MapProvider, Coordinate, EdgeInsets } from './types';
|
|
3
|
+
import type { MapProvider, Coordinate, EdgeInsets, MapTheme, PressEventPayload } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Options for moving the camera
|
|
6
|
-
* @default duration -1
|
|
7
6
|
*/
|
|
8
7
|
export interface MoveCameraOptions {
|
|
9
|
-
zoom
|
|
8
|
+
zoom?: number;
|
|
10
9
|
duration?: number;
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
12
|
* Options for fitting coordinates in view
|
|
14
|
-
* @default duration -1
|
|
15
13
|
*/
|
|
16
14
|
export interface FitCoordinatesOptions {
|
|
17
15
|
padding?: EdgeInsets;
|
|
18
16
|
duration?: number;
|
|
19
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Options for setting edge insets
|
|
20
|
+
*/
|
|
21
|
+
export interface SetEdgeInsetsOptions {
|
|
22
|
+
duration?: number;
|
|
23
|
+
}
|
|
20
24
|
/**
|
|
21
25
|
* MapView ref methods
|
|
22
26
|
*/
|
|
23
27
|
export interface MapViewRef {
|
|
24
|
-
moveCamera(coordinate: Coordinate, options
|
|
28
|
+
moveCamera(coordinate: Coordinate, options?: MoveCameraOptions): void;
|
|
25
29
|
fitCoordinates(coordinates: Coordinate[], options?: FitCoordinatesOptions): void;
|
|
30
|
+
setEdgeInsets(edgeInsets: EdgeInsets, options?: SetEdgeInsetsOptions): void;
|
|
26
31
|
}
|
|
27
32
|
/**
|
|
28
33
|
* Camera event payload
|
|
@@ -32,6 +37,8 @@ export interface CameraEventPayload {
|
|
|
32
37
|
zoom: number;
|
|
33
38
|
gesture: boolean;
|
|
34
39
|
}
|
|
40
|
+
export type MapCameraEvent = NativeSyntheticEvent<CameraEventPayload>;
|
|
41
|
+
export type MapPressEvent = NativeSyntheticEvent<PressEventPayload>;
|
|
35
42
|
/**
|
|
36
43
|
* MapView component props
|
|
37
44
|
*/
|
|
@@ -83,23 +90,42 @@ export interface MapViewProps extends ViewProps {
|
|
|
83
90
|
*/
|
|
84
91
|
pitchEnabled?: boolean;
|
|
85
92
|
/**
|
|
86
|
-
* Map content
|
|
93
|
+
* Map content edge insets
|
|
87
94
|
*/
|
|
88
|
-
|
|
95
|
+
edgeInsets?: EdgeInsets;
|
|
89
96
|
/**
|
|
90
97
|
* Show current user location on the map.
|
|
91
98
|
* Requires location permission to be granted, otherwise silently ignored.
|
|
92
99
|
* @default false
|
|
93
100
|
*/
|
|
94
101
|
userLocationEnabled?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Show native my-location button when userLocationEnabled is true (Android only).
|
|
104
|
+
* @default false
|
|
105
|
+
* @platform android
|
|
106
|
+
*/
|
|
107
|
+
userLocationButtonEnabled?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Map color theme
|
|
110
|
+
* @default 'system'
|
|
111
|
+
*/
|
|
112
|
+
theme?: MapTheme;
|
|
113
|
+
/**
|
|
114
|
+
* Called when the map is pressed
|
|
115
|
+
*/
|
|
116
|
+
onPress?: (event: MapPressEvent) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Called when the map is long pressed
|
|
119
|
+
*/
|
|
120
|
+
onLongPress?: (event: MapPressEvent) => void;
|
|
95
121
|
/**
|
|
96
122
|
* Called when camera moves
|
|
97
123
|
*/
|
|
98
|
-
onCameraMove?: (event:
|
|
124
|
+
onCameraMove?: (event: MapCameraEvent) => void;
|
|
99
125
|
/**
|
|
100
126
|
* Called when camera stops moving
|
|
101
127
|
*/
|
|
102
|
-
onCameraIdle?: (event:
|
|
128
|
+
onCameraIdle?: (event: MapCameraEvent) => void;
|
|
103
129
|
/**
|
|
104
130
|
* Called when map is loaded and ready
|
|
105
131
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapView.types.d.ts","sourceRoot":"","sources":["../../../src/MapView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,cAA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type { Coordinate } from './types';
|
|
4
|
-
export declare class MapView extends Component<MapViewProps> implements MapViewRef {
|
|
5
|
-
static defaultProps: Partial<MapViewProps>;
|
|
6
|
-
private mapInstance;
|
|
7
|
-
private handleMapReady;
|
|
8
|
-
moveCamera(coordinate: Coordinate, options: MoveCameraOptions): void;
|
|
9
|
-
fitCoordinates(coordinates: Coordinate[], options?: FitCoordinatesOptions): void;
|
|
10
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
}
|
|
1
|
+
import type { MapViewProps, MapViewRef } from './MapView.types';
|
|
2
|
+
export declare const MapView: import("react").ForwardRefExoticComponent<MapViewProps & import("react").RefAttributes<MapViewRef>>;
|
|
12
3
|
//# sourceMappingURL=MapView.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapView.web.d.ts","sourceRoot":"","sources":["../../../src/MapView.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MapView.web.d.ts","sourceRoot":"","sources":["../../../src/MapView.web.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EAKX,MAAM,iBAAiB,CAAC;AAoEzB,eAAO,MAAM,OAAO,qGA8VlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoJson.d.ts","sourceRoot":"","sources":["../../../../src/components/GeoJson.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQpD,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAwLpD,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,4CAmB1C,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { MarkerProps } from './Marker.types';
|
|
3
|
+
import type { PolygonProps } from './Polygon.types';
|
|
4
|
+
import type { PolylineProps } from './Polyline.types';
|
|
5
|
+
/**
|
|
6
|
+
* GeoJSON types per RFC 7946
|
|
7
|
+
* Note: GeoJSON positions use [longitude, latitude] order
|
|
8
|
+
*/
|
|
9
|
+
export type Position = [longitude: number, latitude: number] | [longitude: number, latitude: number, altitude: number];
|
|
10
|
+
export interface Point {
|
|
11
|
+
type: 'Point';
|
|
12
|
+
coordinates: Position;
|
|
13
|
+
}
|
|
14
|
+
export interface MultiPoint {
|
|
15
|
+
type: 'MultiPoint';
|
|
16
|
+
coordinates: Position[];
|
|
17
|
+
}
|
|
18
|
+
export interface LineString {
|
|
19
|
+
type: 'LineString';
|
|
20
|
+
coordinates: Position[];
|
|
21
|
+
}
|
|
22
|
+
export interface MultiLineString {
|
|
23
|
+
type: 'MultiLineString';
|
|
24
|
+
coordinates: Position[][];
|
|
25
|
+
}
|
|
26
|
+
export interface Polygon {
|
|
27
|
+
type: 'Polygon';
|
|
28
|
+
coordinates: Position[][];
|
|
29
|
+
}
|
|
30
|
+
export interface MultiPolygon {
|
|
31
|
+
type: 'MultiPolygon';
|
|
32
|
+
coordinates: Position[][][];
|
|
33
|
+
}
|
|
34
|
+
export interface GeometryCollection {
|
|
35
|
+
type: 'GeometryCollection';
|
|
36
|
+
geometries: Geometry[];
|
|
37
|
+
}
|
|
38
|
+
export type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection;
|
|
39
|
+
export interface Feature<G extends Geometry = Geometry> {
|
|
40
|
+
type: 'Feature';
|
|
41
|
+
id?: string | number;
|
|
42
|
+
geometry: G;
|
|
43
|
+
properties: Record<string, any> | null;
|
|
44
|
+
}
|
|
45
|
+
export interface FeatureCollection<G extends Geometry = Geometry> {
|
|
46
|
+
type: 'FeatureCollection';
|
|
47
|
+
features: Feature<G>[];
|
|
48
|
+
}
|
|
49
|
+
export type GeoJSON = Geometry | Feature | FeatureCollection;
|
|
50
|
+
export interface GeoJsonProps {
|
|
51
|
+
/**
|
|
52
|
+
* GeoJSON data to render.
|
|
53
|
+
* Accepts a `FeatureCollection`, `Feature`, or bare `Geometry`.
|
|
54
|
+
*/
|
|
55
|
+
geojson: GeoJSON;
|
|
56
|
+
/**
|
|
57
|
+
* Z-index for all rendered features.
|
|
58
|
+
*/
|
|
59
|
+
zIndex?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Custom render function for `Point`/`MultiPoint` features.
|
|
62
|
+
* @param props - Default `MarkerProps` derived from the geometry.
|
|
63
|
+
* @param feature - The source GeoJSON `Feature`.
|
|
64
|
+
*/
|
|
65
|
+
renderMarker?: (props: MarkerProps, feature: Feature) => ReactElement | null;
|
|
66
|
+
/**
|
|
67
|
+
* Custom render function for `LineString`/`MultiLineString` features.
|
|
68
|
+
* @param props - Default `PolylineProps` derived from the geometry.
|
|
69
|
+
* @param feature - The source GeoJSON `Feature`.
|
|
70
|
+
*/
|
|
71
|
+
renderPolyline?: (props: PolylineProps, feature: Feature) => ReactElement | null;
|
|
72
|
+
/**
|
|
73
|
+
* Custom render function for `Polygon`/`MultiPolygon` features.
|
|
74
|
+
* @param props - Default `PolygonProps` derived from the geometry.
|
|
75
|
+
* @param feature - The source GeoJSON `Feature`.
|
|
76
|
+
*/
|
|
77
|
+
renderPolygon?: (props: PolygonProps, feature: Feature) => ReactElement | null;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=GeoJson.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoJson.types.d.ts","sourceRoot":"","sources":["../../../../src/components/GeoJson.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AAEH,MAAM,MAAM,QAAQ,GAChB,CAAC,SAAS,EAA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,CAAC,SAAS,QAAQ,GAAG,QAAQ;IAC9D,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;CACxB;AAED,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,KAAK,YAAY,GAAG,IAAI,CAAC;IAC7E;;;;OAIG;IACH,cAAc,CAAC,EAAE,CACf,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,OAAO,KACb,YAAY,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CACd,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,OAAO,KACb,YAAY,GAAG,IAAI,CAAC;CAC1B"}
|
|
@@ -1,37 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Marker position
|
|
11
|
-
*/
|
|
12
|
-
coordinate: Coordinate;
|
|
13
|
-
/**
|
|
14
|
-
* Callout title
|
|
15
|
-
*/
|
|
16
|
-
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Callout description
|
|
19
|
-
*/
|
|
20
|
-
description?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Anchor point for custom marker views
|
|
23
|
-
*/
|
|
24
|
-
anchor?: Point;
|
|
25
|
-
/**
|
|
26
|
-
* Z-index for marker ordering. Higher values render on top.
|
|
27
|
-
*/
|
|
28
|
-
zIndex?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Custom marker view
|
|
31
|
-
*/
|
|
32
|
-
children?: ReactNode;
|
|
33
|
-
}
|
|
34
|
-
export declare class Marker extends React.Component<MarkerProps> {
|
|
2
|
+
import type { MarkerProps } from './Marker.types';
|
|
3
|
+
export type { MarkerProps, MarkerPressEvent, MarkerDragEvent, } from './Marker.types';
|
|
4
|
+
export declare class Marker extends React.PureComponent<MarkerProps> {
|
|
5
|
+
private getStyle;
|
|
6
|
+
private _cachedZIndex;
|
|
7
|
+
private _cachedStyle;
|
|
35
8
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
36
9
|
}
|
|
37
10
|
//# sourceMappingURL=Marker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../../src/components/Marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../../src/components/Marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAExB,qBAAa,MAAO,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IAC1D,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,YAAY,CAAM;IAE1B,MAAM;CAwCP"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { NativeSyntheticEvent } from 'react-native';
|
|
3
|
+
import type { Coordinate, Point, PressEventPayload } from '../types';
|
|
4
|
+
export type MarkerPressEvent = NativeSyntheticEvent<PressEventPayload>;
|
|
5
|
+
export type MarkerDragEvent = NativeSyntheticEvent<PressEventPayload>;
|
|
6
|
+
export interface MarkerProps {
|
|
7
|
+
/**
|
|
8
|
+
* Name used for debugging purposes
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Marker position
|
|
13
|
+
*/
|
|
14
|
+
coordinate: Coordinate;
|
|
15
|
+
/**
|
|
16
|
+
* Callout title
|
|
17
|
+
*/
|
|
18
|
+
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Callout description
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Anchor point for custom marker views
|
|
25
|
+
*/
|
|
26
|
+
anchor?: Point;
|
|
27
|
+
/**
|
|
28
|
+
* Z-index for marker ordering. Higher values render on top.
|
|
29
|
+
*/
|
|
30
|
+
zIndex?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Rotation angle in degrees clockwise from north.
|
|
33
|
+
* @default 0
|
|
34
|
+
*/
|
|
35
|
+
rotate?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Scale factor for the marker.
|
|
38
|
+
* @default 1
|
|
39
|
+
*/
|
|
40
|
+
scale?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Rasterize custom marker view to bitmap for better performance.
|
|
43
|
+
* Set to false if you need live view updates (e.g., animations).
|
|
44
|
+
* @platform ios, android
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
rasterize?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the marker can be dragged by the user.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
draggable?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Called when the marker is pressed
|
|
55
|
+
*/
|
|
56
|
+
onPress?: (event: MarkerPressEvent) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Called when marker drag starts
|
|
59
|
+
*/
|
|
60
|
+
onDragStart?: (event: MarkerDragEvent) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Called continuously as the marker is dragged
|
|
63
|
+
*/
|
|
64
|
+
onDragChange?: (event: MarkerDragEvent) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Called when marker drag ends
|
|
67
|
+
*/
|
|
68
|
+
onDragEnd?: (event: MarkerDragEvent) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Custom marker view
|
|
71
|
+
*/
|
|
72
|
+
children?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=Marker.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Marker.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Marker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErE,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEtE,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare class Marker extends React.Component<MarkerProps> {
|
|
4
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
}
|
|
1
|
+
import type { MarkerProps } from './Marker.types';
|
|
2
|
+
export declare const Marker: ({ coordinate, title, anchor, zIndex, rotate, scale, draggable, onPress, onDragStart, onDragChange, onDragEnd, children, }: MarkerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
3
|
//# sourceMappingURL=Marker.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Marker.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Marker.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Marker.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Marker.web.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAqBlD,eAAO,MAAM,MAAM,GAAI,2HAapB,WAAW,4CAkFb,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PolygonProps } from './Polygon.types';
|
|
3
|
+
export type { PolygonProps } from './Polygon.types';
|
|
4
|
+
export declare class Polygon extends React.PureComponent<PolygonProps> {
|
|
5
|
+
private _cachedZIndex;
|
|
6
|
+
private _cachedStyle;
|
|
7
|
+
private getStyle;
|
|
8
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=Polygon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.d.ts","sourceRoot":"","sources":["../../../../src/components/Polygon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,qBAAa,OAAQ,SAAQ,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC;IAC5D,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,YAAY,CAAM;IAE1B,OAAO,CAAC,QAAQ;IAShB,MAAM;CAwBP"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ColorValue } from 'react-native';
|
|
2
|
+
import type { Coordinate } from '../types';
|
|
3
|
+
export interface PolygonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Array of coordinates forming the polygon boundary
|
|
6
|
+
*/
|
|
7
|
+
coordinates: Coordinate[];
|
|
8
|
+
/**
|
|
9
|
+
* Array of coordinate arrays representing interior holes
|
|
10
|
+
*/
|
|
11
|
+
holes?: Coordinate[][];
|
|
12
|
+
/**
|
|
13
|
+
* Stroke (outline) color
|
|
14
|
+
*/
|
|
15
|
+
strokeColor?: ColorValue;
|
|
16
|
+
/**
|
|
17
|
+
* Stroke width in points
|
|
18
|
+
*/
|
|
19
|
+
strokeWidth?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Fill color of the polygon
|
|
22
|
+
*/
|
|
23
|
+
fillColor?: ColorValue;
|
|
24
|
+
/**
|
|
25
|
+
* Z-index for layering
|
|
26
|
+
*/
|
|
27
|
+
zIndex?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Called when the polygon is tapped
|
|
30
|
+
*/
|
|
31
|
+
onPress?: () => void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=Polygon.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Polygon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,EAAE,EAAE,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Polygon.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,eAAO,MAAM,OAAO,GAAI,+EAQrB,YAAY,SA2Fd,CAAC"}
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
coordinates: Coordinate[];
|
|
9
|
-
/**
|
|
10
|
-
* Gradient colors along the polyline
|
|
11
|
-
*/
|
|
12
|
-
strokeColors?: ColorValue[];
|
|
13
|
-
/**
|
|
14
|
-
* Line width in points
|
|
15
|
-
*/
|
|
16
|
-
strokeWidth?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Animate the polyline with a snake effect
|
|
19
|
-
*/
|
|
20
|
-
animated?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare class Polyline extends React.Component<PolylineProps> {
|
|
2
|
+
import type { PolylineProps } from './Polyline.types';
|
|
3
|
+
export type { PolylineProps, PolylineEasing, PolylineAnimatedOptions, } from './Polyline.types';
|
|
4
|
+
export declare class Polyline extends React.PureComponent<PolylineProps> {
|
|
5
|
+
private getStyle;
|
|
6
|
+
private _cachedZIndex;
|
|
7
|
+
private _cachedStyle;
|
|
23
8
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
24
9
|
}
|
|
25
10
|
//# sourceMappingURL=Polyline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Polyline.d.ts","sourceRoot":"","sources":["../../../../src/components/Polyline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Polyline.d.ts","sourceRoot":"","sources":["../../../../src/components/Polyline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,YAAY,EACV,aAAa,EACb,cAAc,EACd,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,qBAAa,QAAS,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC;IAC9D,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,YAAY,CAAM;IAE1B,MAAM;CAqBP"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ColorValue } from 'react-native';
|
|
2
|
+
import type { Coordinate } from '../types';
|
|
3
|
+
export type PolylineEasing = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut';
|
|
4
|
+
export interface PolylineAnimatedOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Animation duration in milliseconds
|
|
7
|
+
* @default 2150
|
|
8
|
+
*/
|
|
9
|
+
duration?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Easing function for the animation
|
|
12
|
+
* @default 'linear'
|
|
13
|
+
*/
|
|
14
|
+
easing?: PolylineEasing;
|
|
15
|
+
/**
|
|
16
|
+
* Portion of the line visible as trail (0-1)
|
|
17
|
+
* 1.0 = full snake effect, 0.2 = short worm
|
|
18
|
+
* @default 1.0
|
|
19
|
+
*/
|
|
20
|
+
trailLength?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Delay before animation starts in milliseconds
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
delay?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface PolylineProps {
|
|
28
|
+
/**
|
|
29
|
+
* Array of coordinates forming the polyline
|
|
30
|
+
*/
|
|
31
|
+
coordinates: Coordinate[];
|
|
32
|
+
/**
|
|
33
|
+
* Gradient colors along the polyline
|
|
34
|
+
*/
|
|
35
|
+
strokeColors?: ColorValue[];
|
|
36
|
+
/**
|
|
37
|
+
* Line width in points
|
|
38
|
+
*/
|
|
39
|
+
strokeWidth?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Animate the polyline with a snake effect
|
|
42
|
+
*/
|
|
43
|
+
animated?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Animation configuration options
|
|
46
|
+
*/
|
|
47
|
+
animatedOptions?: PolylineAnimatedOptions;
|
|
48
|
+
/**
|
|
49
|
+
* Z-index for layering polylines
|
|
50
|
+
*/
|
|
51
|
+
zIndex?: number;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=Polyline.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polyline.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Polyline.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAE3E,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare class Polyline extends Component<PolylineProps> {
|
|
4
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
}
|
|
1
|
+
import type { PolylineProps } from './Polyline.types';
|
|
2
|
+
export declare const Polyline: ({ coordinates, strokeColors, strokeWidth, animated, animatedOptions, zIndex, }: PolylineProps) => null;
|
|
6
3
|
//# sourceMappingURL=Polyline.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Polyline.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Polyline.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Polyline.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Polyline.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,kBAAkB,CAAC;AAmDtE,eAAO,MAAM,QAAQ,GAAI,gFAOtB,aAAa,SAmQf,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { Marker } from './Marker';
|
|
2
|
+
export type { MarkerProps, MarkerPressEvent, MarkerDragEvent, } from './Marker.types';
|
|
3
|
+
export { Polygon } from './Polygon';
|
|
4
|
+
export type { PolygonProps } from './Polygon.types';
|
|
5
|
+
export { Polyline } from './Polyline';
|
|
6
|
+
export type { PolylineProps, PolylineEasing, PolylineAnimatedOptions, } from './Polyline.types';
|
|
7
|
+
export { GeoJson } from './GeoJson';
|
|
8
|
+
export type { GeoJsonProps } from './GeoJson.types';
|
|
3
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,aAAa,EACb,cAAc,EACd,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { Marker } from './Marker.web';
|
|
2
|
+
export { Polygon } from './Polygon.web';
|
|
2
3
|
export { Polyline } from './Polyline.web';
|
|
3
|
-
export type { MarkerProps } from './Marker';
|
|
4
|
-
export type {
|
|
4
|
+
export type { MarkerProps } from './Marker.types';
|
|
5
|
+
export type { PolygonProps } from './Polygon.types';
|
|
6
|
+
export type { PolylineProps } from './Polyline.types';
|
|
7
|
+
export { GeoJson } from './GeoJson';
|
|
8
|
+
export type { GeoJsonProps } from './GeoJson.types';
|
|
5
9
|
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/components/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/components/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|