@lugg/maps 0.2.0-alpha.0 → 0.2.0-alpha.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/android/src/main/java/com/luggmaps/{LuggMapsGoogleMapView.kt → LuggGoogleMapView.kt} +107 -30
- package/android/src/main/java/com/luggmaps/{LuggMapsGoogleMapViewManager.kt → LuggGoogleMapViewManager.kt} +66 -39
- package/android/src/main/java/com/luggmaps/{LuggMapsWrapperView.kt → LuggMapWrapperView.kt} +1 -1
- package/android/src/main/java/com/luggmaps/LuggMapWrapperViewManager.kt +25 -0
- package/android/src/main/java/com/luggmaps/{LuggMapsMarkerView.kt → LuggMarkerView.kt} +6 -6
- package/android/src/main/java/com/luggmaps/{LuggMapsMarkerViewManager.kt → LuggMarkerViewManager.kt} +17 -17
- package/android/src/main/java/com/luggmaps/{LuggMapsPackage.kt → LuggPackage.kt} +2 -2
- package/android/src/main/java/com/luggmaps/{LuggMapsPolylineView.kt → LuggPolylineView.kt} +4 -4
- package/android/src/main/java/com/luggmaps/{LuggMapsPolylineViewManager.kt → LuggPolylineViewManager.kt} +16 -16
- package/android/src/main/java/com/luggmaps/events/CameraIdleEvent.kt +10 -2
- package/android/src/main/java/com/luggmaps/events/CameraMoveEvent.kt +6 -5
- package/android/src/main/java/com/luggmaps/events/ReadyEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/extensions/ViewExtensions.kt +14 -0
- package/ios/{LuggMapsAppleMapView.h → LuggAppleMapView.h} +2 -2
- package/ios/{LuggMapsAppleMapView.mm → LuggAppleMapView.mm} +104 -68
- package/ios/{LuggMapsGoogleMapView.h → LuggGoogleMapView.h} +1 -1
- package/ios/{LuggMapsGoogleMapView.mm → LuggGoogleMapView.mm} +75 -60
- package/ios/{LuggMapsWrapperView.h → LuggMapWrapperView.h} +1 -1
- package/ios/{LuggMapsWrapperView.mm → LuggMapWrapperView.mm} +7 -7
- package/ios/{LuggMapsMarkerView.h → LuggMarkerView.h} +6 -6
- package/ios/{LuggMapsMarkerView.mm → LuggMarkerView.mm} +8 -8
- package/ios/{LuggMapsPolylineView.h → LuggPolylineView.h} +5 -5
- package/ios/{LuggMapsPolylineView.mm → LuggPolylineView.mm} +8 -8
- package/ios/events/CameraIdleEvent.h +6 -1
- package/ios/events/CameraMoveEvent.h +6 -3
- package/ios/events/ReadyEvent.h +20 -0
- package/lib/module/MapView.js +21 -7
- package/lib/module/MapView.js.map +1 -1
- package/lib/module/{Marker.js → components/Marker.js} +2 -2
- package/lib/module/components/Marker.js.map +1 -0
- package/lib/module/{Polyline.js → components/Polyline.js} +2 -2
- package/lib/module/components/Polyline.js.map +1 -0
- package/lib/module/components/index.js +5 -0
- package/lib/module/components/index.js.map +1 -0
- package/{src/fabric/LuggMapsAppleMapViewNativeComponent.ts → lib/module/fabric/LuggAppleMapViewNativeComponent.ts} +13 -3
- package/lib/module/fabric/{LuggMapsGoogleMapViewNativeComponent.ts → LuggGoogleMapViewNativeComponent.ts} +13 -3
- package/{src/fabric/LuggMapsWrapperViewNativeComponent.ts → lib/module/fabric/LuggMapWrapperViewNativeComponent.ts} +1 -1
- package/lib/module/fabric/{LuggMapsMarkerViewNativeComponent.ts → LuggMarkerViewNativeComponent.ts} +1 -1
- package/{src/fabric/LuggMapsPolylineViewNativeComponent.ts → lib/module/fabric/LuggPolylineViewNativeComponent.ts} +1 -1
- package/lib/module/index.js +1 -2
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/plugin/src/withLuggMapsAndroid.d.ts +6 -0
- package/lib/typescript/plugin/src/withLuggMapsAndroid.d.ts.map +1 -0
- package/lib/typescript/plugin/src/withLuggMapsIOS.d.ts +6 -0
- package/lib/typescript/plugin/src/withLuggMapsIOS.d.ts.map +1 -0
- package/lib/typescript/src/MapView.d.ts.map +1 -1
- package/lib/typescript/src/MapView.types.d.ts +24 -14
- package/lib/typescript/src/MapView.types.d.ts.map +1 -1
- package/lib/typescript/src/{Marker.types.d.ts → components/Marker.d.ts} +6 -5
- package/lib/typescript/src/components/Marker.d.ts.map +1 -0
- package/lib/typescript/src/{Polyline.types.d.ts → components/Polyline.d.ts} +6 -5
- package/lib/typescript/src/components/Polyline.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +3 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/fabric/{LuggMapsAppleMapViewNativeComponent.d.ts → LuggAppleMapViewNativeComponent.d.ts} +10 -3
- package/lib/typescript/src/fabric/LuggAppleMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/{LuggMapsGoogleMapViewNativeComponent.d.ts → LuggGoogleMapViewNativeComponent.d.ts} +10 -3
- package/lib/typescript/src/fabric/LuggGoogleMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/{LuggMapsWrapperViewNativeComponent.d.ts → LuggMapWrapperViewNativeComponent.d.ts} +1 -1
- package/lib/typescript/src/fabric/LuggMapWrapperViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/{LuggMapsMarkerViewNativeComponent.d.ts → LuggMarkerViewNativeComponent.d.ts} +1 -1
- package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/{LuggMapsPolylineViewNativeComponent.d.ts → LuggPolylineViewNativeComponent.d.ts} +1 -1
- package/lib/typescript/src/fabric/LuggPolylineViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -5
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/plugin/build/index.js +4 -4
- package/{lib/typescript/plugin/src/withMapsAndroid.d.ts → plugin/build/withLuggMapsAndroid.d.ts} +0 -1
- package/plugin/build/withLuggMapsAndroid.js +15 -0
- package/{lib/typescript/plugin/src/withMapsIOS.d.ts → plugin/build/withLuggMapsIOS.d.ts} +0 -1
- package/plugin/build/withLuggMapsIOS.js +27 -0
- package/plugin/build/withMapsAndroid.d.ts +1 -1
- package/plugin/build/withMapsIOS.d.ts +1 -1
- package/src/MapView.tsx +27 -10
- package/src/MapView.types.ts +24 -15
- package/src/components/Marker.tsx +59 -0
- package/src/{Polyline.tsx → components/Polyline.tsx} +23 -3
- package/src/components/index.ts +2 -0
- package/{lib/module/fabric/LuggMapsAppleMapViewNativeComponent.ts → src/fabric/LuggAppleMapViewNativeComponent.ts} +13 -3
- package/src/fabric/{LuggMapsGoogleMapViewNativeComponent.ts → LuggGoogleMapViewNativeComponent.ts} +13 -3
- package/{lib/module/fabric/LuggMapsWrapperViewNativeComponent.ts → src/fabric/LuggMapWrapperViewNativeComponent.ts} +1 -1
- package/src/fabric/{LuggMapsMarkerViewNativeComponent.ts → LuggMarkerViewNativeComponent.ts} +1 -1
- package/{lib/module/fabric/LuggMapsPolylineViewNativeComponent.ts → src/fabric/LuggPolylineViewNativeComponent.ts} +1 -1
- package/src/index.ts +3 -6
- package/android/src/main/java/com/luggmaps/LuggMapsWrapperViewManager.kt +0 -25
- package/lib/module/Marker.js.map +0 -1
- package/lib/module/Marker.types.js +0 -4
- package/lib/module/Marker.types.js.map +0 -1
- package/lib/module/Polyline.js.map +0 -1
- package/lib/module/Polyline.types.js +0 -4
- package/lib/module/Polyline.types.js.map +0 -1
- package/lib/typescript/plugin/src/withMapsAndroid.d.ts.map +0 -1
- package/lib/typescript/plugin/src/withMapsIOS.d.ts.map +0 -1
- package/lib/typescript/src/Marker.d.ts +0 -6
- package/lib/typescript/src/Marker.d.ts.map +0 -1
- package/lib/typescript/src/Marker.types.d.ts.map +0 -1
- package/lib/typescript/src/Polyline.d.ts +0 -6
- package/lib/typescript/src/Polyline.d.ts.map +0 -1
- package/lib/typescript/src/Polyline.types.d.ts.map +0 -1
- package/lib/typescript/src/fabric/LuggMapsAppleMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/fabric/LuggMapsGoogleMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/fabric/LuggMapsMarkerViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/fabric/LuggMapsPolylineViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/fabric/LuggMapsWrapperViewNativeComponent.d.ts.map +0 -1
- package/src/Marker.tsx +0 -31
- package/src/Marker.types.ts +0 -32
- package/src/Polyline.types.ts +0 -24
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withLuggMapsIOS = void 0;
|
|
4
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
const withLuggMapsIOS = (config, { apiKey }) => {
|
|
6
|
+
if (!apiKey) {
|
|
7
|
+
return config;
|
|
8
|
+
}
|
|
9
|
+
config = (0, config_plugins_1.withInfoPlist)(config, (c) => {
|
|
10
|
+
c.modResults.GMSApiKey = apiKey;
|
|
11
|
+
return c;
|
|
12
|
+
});
|
|
13
|
+
config = (0, config_plugins_1.withAppDelegate)(config, (c) => {
|
|
14
|
+
const contents = c.modResults.contents;
|
|
15
|
+
// Add import for GoogleMaps
|
|
16
|
+
if (!contents.includes('import GoogleMaps')) {
|
|
17
|
+
c.modResults.contents = contents.replace(/(import (?:UIKit|Expo))/, '$1\nimport GoogleMaps');
|
|
18
|
+
}
|
|
19
|
+
// Add GMSServices.provideAPIKey call
|
|
20
|
+
if (!c.modResults.contents.includes('GMSServices.provideAPIKey')) {
|
|
21
|
+
c.modResults.contents = c.modResults.contents.replace(/(func application\([^)]+\)[^{]*\{)/, `$1\n GMSServices.provideAPIKey("${apiKey}")\n`);
|
|
22
|
+
}
|
|
23
|
+
return c;
|
|
24
|
+
});
|
|
25
|
+
return config;
|
|
26
|
+
};
|
|
27
|
+
exports.withLuggMapsIOS = withLuggMapsIOS;
|
package/src/MapView.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform, StyleSheet } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import LuggGoogleMapViewNativeComponent, {
|
|
4
4
|
Commands as GoogleMapCommands,
|
|
5
|
-
} from './fabric/
|
|
6
|
-
import
|
|
5
|
+
} from './fabric/LuggGoogleMapViewNativeComponent';
|
|
6
|
+
import LuggAppleMapViewNativeComponent, {
|
|
7
7
|
Commands as AppleMapCommands,
|
|
8
|
-
} from './fabric/
|
|
9
|
-
import
|
|
8
|
+
} from './fabric/LuggAppleMapViewNativeComponent';
|
|
9
|
+
import LuggMapWrapperViewNativeComponent from './fabric/LuggMapWrapperViewNativeComponent';
|
|
10
10
|
import type {
|
|
11
11
|
MapViewProps,
|
|
12
12
|
MapViewRef,
|
|
@@ -55,7 +55,8 @@ export class MapView
|
|
|
55
55
|
const first = coordinates[0];
|
|
56
56
|
if (!ref || !first) return;
|
|
57
57
|
|
|
58
|
-
const { padding
|
|
58
|
+
const { padding, duration = -1 } = options ?? {};
|
|
59
|
+
const { top = 0, left = 0, bottom = 0, right = 0 } = padding ?? {};
|
|
59
60
|
|
|
60
61
|
if (coordinates.length === 1) {
|
|
61
62
|
const zoom = this.props.initialZoom ?? 10;
|
|
@@ -63,7 +64,15 @@ export class MapView
|
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
this.nativeCommands.fitCoordinates(
|
|
67
|
+
this.nativeCommands.fitCoordinates(
|
|
68
|
+
ref,
|
|
69
|
+
coordinates,
|
|
70
|
+
top,
|
|
71
|
+
left,
|
|
72
|
+
bottom,
|
|
73
|
+
right,
|
|
74
|
+
duration
|
|
75
|
+
);
|
|
67
76
|
}
|
|
68
77
|
|
|
69
78
|
render() {
|
|
@@ -72,21 +81,25 @@ export class MapView
|
|
|
72
81
|
mapId,
|
|
73
82
|
initialCoordinate,
|
|
74
83
|
initialZoom,
|
|
84
|
+
minZoom,
|
|
85
|
+
maxZoom,
|
|
75
86
|
zoomEnabled,
|
|
76
87
|
scrollEnabled,
|
|
77
88
|
rotateEnabled,
|
|
78
89
|
pitchEnabled,
|
|
79
90
|
padding,
|
|
91
|
+
userLocationEnabled,
|
|
80
92
|
onCameraMove,
|
|
81
93
|
onCameraIdle,
|
|
94
|
+
onReady,
|
|
82
95
|
children,
|
|
83
96
|
...rest
|
|
84
97
|
} = this.props;
|
|
85
98
|
|
|
86
99
|
const NativeMapView =
|
|
87
100
|
Platform.OS === 'ios' && provider === 'apple'
|
|
88
|
-
?
|
|
89
|
-
:
|
|
101
|
+
? LuggAppleMapViewNativeComponent
|
|
102
|
+
: LuggGoogleMapViewNativeComponent;
|
|
90
103
|
|
|
91
104
|
return (
|
|
92
105
|
<NativeMapView
|
|
@@ -95,15 +108,19 @@ export class MapView
|
|
|
95
108
|
mapId={mapId}
|
|
96
109
|
initialCoordinate={initialCoordinate}
|
|
97
110
|
initialZoom={initialZoom}
|
|
111
|
+
minZoom={minZoom}
|
|
112
|
+
maxZoom={maxZoom}
|
|
98
113
|
zoomEnabled={zoomEnabled}
|
|
99
114
|
scrollEnabled={scrollEnabled}
|
|
100
115
|
rotateEnabled={rotateEnabled}
|
|
101
116
|
pitchEnabled={pitchEnabled}
|
|
102
117
|
padding={padding}
|
|
118
|
+
userLocationEnabled={userLocationEnabled}
|
|
103
119
|
onCameraMove={onCameraMove}
|
|
104
120
|
onCameraIdle={onCameraIdle}
|
|
121
|
+
onReady={onReady}
|
|
105
122
|
>
|
|
106
|
-
<
|
|
123
|
+
<LuggMapWrapperViewNativeComponent style={StyleSheet.absoluteFill} />
|
|
107
124
|
{children}
|
|
108
125
|
</NativeMapView>
|
|
109
126
|
);
|
package/src/MapView.types.ts
CHANGED
|
@@ -13,11 +13,10 @@ export interface MoveCameraOptions {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Options for fitting coordinates in view
|
|
16
|
-
* @default padding 0
|
|
17
16
|
* @default duration -1
|
|
18
17
|
*/
|
|
19
18
|
export interface FitCoordinatesOptions {
|
|
20
|
-
padding?:
|
|
19
|
+
padding?: EdgeInsets;
|
|
21
20
|
duration?: number;
|
|
22
21
|
}
|
|
23
22
|
|
|
@@ -33,20 +32,12 @@ export interface MapViewRef {
|
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
|
-
* Camera
|
|
37
|
-
*/
|
|
38
|
-
export interface CameraMoveEvent {
|
|
39
|
-
coordinate: Coordinate;
|
|
40
|
-
zoom: number;
|
|
41
|
-
dragging: boolean;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Camera idle event data
|
|
35
|
+
* Camera event payload
|
|
46
36
|
*/
|
|
47
|
-
export interface
|
|
37
|
+
export interface CameraEventPayload {
|
|
48
38
|
coordinate: Coordinate;
|
|
49
39
|
zoom: number;
|
|
40
|
+
gesture: boolean;
|
|
50
41
|
}
|
|
51
42
|
|
|
52
43
|
/**
|
|
@@ -71,6 +62,14 @@ export interface MapViewProps extends ViewProps {
|
|
|
71
62
|
* @default 10
|
|
72
63
|
*/
|
|
73
64
|
initialZoom?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Minimum zoom level
|
|
67
|
+
*/
|
|
68
|
+
minZoom?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Maximum zoom level
|
|
71
|
+
*/
|
|
72
|
+
maxZoom?: number;
|
|
74
73
|
/**
|
|
75
74
|
* Enable zoom gestures
|
|
76
75
|
* @default true
|
|
@@ -95,14 +94,24 @@ export interface MapViewProps extends ViewProps {
|
|
|
95
94
|
* Map content padding
|
|
96
95
|
*/
|
|
97
96
|
padding?: EdgeInsets;
|
|
97
|
+
/**
|
|
98
|
+
* Show current user location on the map.
|
|
99
|
+
* Requires location permission to be granted, otherwise silently ignored.
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
userLocationEnabled?: boolean;
|
|
98
103
|
/**
|
|
99
104
|
* Called when camera moves
|
|
100
105
|
*/
|
|
101
|
-
onCameraMove?: (event: NativeSyntheticEvent<
|
|
106
|
+
onCameraMove?: (event: NativeSyntheticEvent<CameraEventPayload>) => void;
|
|
102
107
|
/**
|
|
103
108
|
* Called when camera stops moving
|
|
104
109
|
*/
|
|
105
|
-
onCameraIdle?: (event: NativeSyntheticEvent<
|
|
110
|
+
onCameraIdle?: (event: NativeSyntheticEvent<CameraEventPayload>) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Called when map is loaded and ready
|
|
113
|
+
*/
|
|
114
|
+
onReady?: () => void;
|
|
106
115
|
/**
|
|
107
116
|
* Map children (markers, polylines, etc.)
|
|
108
117
|
*/
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import LuggMarkerViewNativeComponent from '../fabric/LuggMarkerViewNativeComponent';
|
|
5
|
+
import type { Coordinate, Point } from '../types';
|
|
6
|
+
|
|
7
|
+
export interface MarkerProps {
|
|
8
|
+
/**
|
|
9
|
+
* Name used for debugging purposes
|
|
10
|
+
*/
|
|
11
|
+
name?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Marker position
|
|
14
|
+
*/
|
|
15
|
+
coordinate: Coordinate;
|
|
16
|
+
/**
|
|
17
|
+
* Callout title
|
|
18
|
+
*/
|
|
19
|
+
title?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Callout description
|
|
22
|
+
*/
|
|
23
|
+
description?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Anchor point for custom marker views
|
|
26
|
+
*/
|
|
27
|
+
anchor?: Point;
|
|
28
|
+
/**
|
|
29
|
+
* Custom marker view
|
|
30
|
+
*/
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class Marker extends React.Component<MarkerProps> {
|
|
35
|
+
render() {
|
|
36
|
+
const { name, coordinate, title, description, anchor, children } =
|
|
37
|
+
this.props;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<LuggMarkerViewNativeComponent
|
|
41
|
+
style={styles.marker}
|
|
42
|
+
name={name}
|
|
43
|
+
coordinate={coordinate}
|
|
44
|
+
title={title}
|
|
45
|
+
description={description}
|
|
46
|
+
anchor={anchor}
|
|
47
|
+
>
|
|
48
|
+
{children}
|
|
49
|
+
</LuggMarkerViewNativeComponent>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
marker: {
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
pointerEvents: 'box-none',
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import type { PolylineProps } from './Polyline.types';
|
|
2
|
+
import type { ColorValue } from 'react-native';
|
|
4
3
|
import { StyleSheet } from 'react-native';
|
|
4
|
+
import LuggPolylineViewNativeComponent from '../fabric/LuggPolylineViewNativeComponent';
|
|
5
|
+
import type { Coordinate } from '../types';
|
|
6
|
+
|
|
7
|
+
export interface PolylineProps {
|
|
8
|
+
/**
|
|
9
|
+
* Array of coordinates forming the polyline
|
|
10
|
+
*/
|
|
11
|
+
coordinates: Coordinate[];
|
|
12
|
+
/**
|
|
13
|
+
* Gradient colors along the polyline
|
|
14
|
+
*/
|
|
15
|
+
strokeColors?: ColorValue[];
|
|
16
|
+
/**
|
|
17
|
+
* Line width in points
|
|
18
|
+
*/
|
|
19
|
+
strokeWidth?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Animate the polyline with a snake effect
|
|
22
|
+
*/
|
|
23
|
+
animated?: boolean;
|
|
24
|
+
}
|
|
5
25
|
|
|
6
26
|
export class Polyline extends React.Component<PolylineProps> {
|
|
7
27
|
render() {
|
|
@@ -13,7 +33,7 @@ export class Polyline extends React.Component<PolylineProps> {
|
|
|
13
33
|
} = this.props;
|
|
14
34
|
|
|
15
35
|
return (
|
|
16
|
-
<
|
|
36
|
+
<LuggPolylineViewNativeComponent
|
|
17
37
|
style={styles.polyline}
|
|
18
38
|
coordinates={coordinates}
|
|
19
39
|
strokeColors={strokeColors}
|
|
@@ -23,7 +23,7 @@ export interface CameraMoveEvent {
|
|
|
23
23
|
longitude: Double;
|
|
24
24
|
};
|
|
25
25
|
zoom: Double;
|
|
26
|
-
|
|
26
|
+
gesture: boolean;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export interface CameraIdleEvent {
|
|
@@ -32,18 +32,25 @@ export interface CameraIdleEvent {
|
|
|
32
32
|
longitude: Double;
|
|
33
33
|
};
|
|
34
34
|
zoom: Double;
|
|
35
|
+
gesture: boolean;
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
export interface ReadyEvent {}
|
|
39
|
+
|
|
37
40
|
export interface NativeProps extends ViewProps {
|
|
38
41
|
initialCoordinate?: Coordinate;
|
|
39
42
|
initialZoom?: Double;
|
|
43
|
+
minZoom?: Double;
|
|
44
|
+
maxZoom?: Double;
|
|
40
45
|
zoomEnabled?: boolean;
|
|
41
46
|
scrollEnabled?: boolean;
|
|
42
47
|
rotateEnabled?: boolean;
|
|
43
48
|
pitchEnabled?: boolean;
|
|
44
49
|
padding?: EdgeInsets;
|
|
50
|
+
userLocationEnabled?: boolean;
|
|
45
51
|
onCameraMove?: DirectEventHandler<CameraMoveEvent>;
|
|
46
52
|
onCameraIdle?: DirectEventHandler<CameraIdleEvent>;
|
|
53
|
+
onReady?: DirectEventHandler<ReadyEvent>;
|
|
47
54
|
}
|
|
48
55
|
|
|
49
56
|
type ComponentType = HostComponent<NativeProps>;
|
|
@@ -59,7 +66,10 @@ interface NativeCommands {
|
|
|
59
66
|
fitCoordinates: (
|
|
60
67
|
viewRef: React.ElementRef<ComponentType>,
|
|
61
68
|
coordinates: Coordinate[],
|
|
62
|
-
|
|
69
|
+
paddingTop: Double,
|
|
70
|
+
paddingLeft: Double,
|
|
71
|
+
paddingBottom: Double,
|
|
72
|
+
paddingRight: Double,
|
|
63
73
|
duration: Double
|
|
64
74
|
) => void;
|
|
65
75
|
}
|
|
@@ -69,5 +79,5 @@ export const Commands = codegenNativeCommands<NativeCommands>({
|
|
|
69
79
|
});
|
|
70
80
|
|
|
71
81
|
export default codegenNativeComponent<NativeProps>(
|
|
72
|
-
'
|
|
82
|
+
'LuggAppleMapView'
|
|
73
83
|
) as ComponentType;
|
package/src/fabric/{LuggMapsGoogleMapViewNativeComponent.ts → LuggGoogleMapViewNativeComponent.ts}
RENAMED
|
@@ -23,7 +23,7 @@ export interface CameraMoveEvent {
|
|
|
23
23
|
longitude: Double;
|
|
24
24
|
};
|
|
25
25
|
zoom: Double;
|
|
26
|
-
|
|
26
|
+
gesture: boolean;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export interface CameraIdleEvent {
|
|
@@ -32,19 +32,26 @@ export interface CameraIdleEvent {
|
|
|
32
32
|
longitude: Double;
|
|
33
33
|
};
|
|
34
34
|
zoom: Double;
|
|
35
|
+
gesture: boolean;
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
export interface ReadyEvent {}
|
|
39
|
+
|
|
37
40
|
export interface NativeProps extends ViewProps {
|
|
38
41
|
mapId?: string;
|
|
39
42
|
initialCoordinate?: Coordinate;
|
|
40
43
|
initialZoom?: Double;
|
|
44
|
+
minZoom?: Double;
|
|
45
|
+
maxZoom?: Double;
|
|
41
46
|
zoomEnabled?: boolean;
|
|
42
47
|
scrollEnabled?: boolean;
|
|
43
48
|
rotateEnabled?: boolean;
|
|
44
49
|
pitchEnabled?: boolean;
|
|
45
50
|
padding?: EdgeInsets;
|
|
51
|
+
userLocationEnabled?: boolean;
|
|
46
52
|
onCameraMove?: DirectEventHandler<CameraMoveEvent>;
|
|
47
53
|
onCameraIdle?: DirectEventHandler<CameraIdleEvent>;
|
|
54
|
+
onReady?: DirectEventHandler<ReadyEvent>;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
type ComponentType = HostComponent<NativeProps>;
|
|
@@ -60,7 +67,10 @@ interface NativeCommands {
|
|
|
60
67
|
fitCoordinates: (
|
|
61
68
|
viewRef: React.ElementRef<ComponentType>,
|
|
62
69
|
coordinates: Coordinate[],
|
|
63
|
-
|
|
70
|
+
paddingTop: Double,
|
|
71
|
+
paddingLeft: Double,
|
|
72
|
+
paddingBottom: Double,
|
|
73
|
+
paddingRight: Double,
|
|
64
74
|
duration: Double
|
|
65
75
|
) => void;
|
|
66
76
|
}
|
|
@@ -70,5 +80,5 @@ export const Commands = codegenNativeCommands<NativeCommands>({
|
|
|
70
80
|
});
|
|
71
81
|
|
|
72
82
|
export default codegenNativeComponent<NativeProps>(
|
|
73
|
-
'
|
|
83
|
+
'LuggGoogleMapView'
|
|
74
84
|
) as ComponentType;
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
export { MapView } from './MapView';
|
|
2
|
-
export
|
|
3
|
-
export { Polyline } from './Polyline';
|
|
2
|
+
export * from './components';
|
|
4
3
|
export type {
|
|
5
4
|
MapViewProps,
|
|
6
5
|
MapViewRef,
|
|
7
6
|
MoveCameraOptions,
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
FitCoordinatesOptions,
|
|
8
|
+
CameraEventPayload,
|
|
10
9
|
} from './MapView.types';
|
|
11
|
-
export type { MarkerProps } from './Marker.types';
|
|
12
|
-
export type { PolylineProps } from './Polyline.types';
|
|
13
10
|
export type { MapProvider, Coordinate, Point, EdgeInsets } from './types';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
package com.luggmaps
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.module.annotations.ReactModule
|
|
4
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
5
|
-
import com.facebook.react.uimanager.ViewGroupManager
|
|
6
|
-
import com.facebook.react.uimanager.ViewManagerDelegate
|
|
7
|
-
import com.facebook.react.viewmanagers.LuggMapsWrapperViewManagerDelegate
|
|
8
|
-
import com.facebook.react.viewmanagers.LuggMapsWrapperViewManagerInterface
|
|
9
|
-
|
|
10
|
-
@ReactModule(name = LuggMapsWrapperViewManager.NAME)
|
|
11
|
-
class LuggMapsWrapperViewManager :
|
|
12
|
-
ViewGroupManager<LuggMapsWrapperView>(),
|
|
13
|
-
LuggMapsWrapperViewManagerInterface<LuggMapsWrapperView> {
|
|
14
|
-
private val delegate: ViewManagerDelegate<LuggMapsWrapperView> = LuggMapsWrapperViewManagerDelegate(this)
|
|
15
|
-
|
|
16
|
-
override fun getDelegate(): ViewManagerDelegate<LuggMapsWrapperView> = delegate
|
|
17
|
-
|
|
18
|
-
override fun getName(): String = NAME
|
|
19
|
-
|
|
20
|
-
override fun createViewInstance(context: ThemedReactContext): LuggMapsWrapperView = LuggMapsWrapperView(context)
|
|
21
|
-
|
|
22
|
-
companion object {
|
|
23
|
-
const val NAME = "LuggMapsWrapperView"
|
|
24
|
-
}
|
|
25
|
-
}
|
package/lib/module/Marker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","LuggMapsMarkerViewNativeComponent","StyleSheet","jsx","_jsx","Marker","Component","render","name","coordinate","title","description","anchor","children","props","style","styles","marker","create","position","pointerEvents"],"sourceRoot":"../../src","sources":["Marker.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,iCAAiC,MAAM,4CAA4C;AAE1F,SAASC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,OAAO,MAAMC,MAAM,SAASL,KAAK,CAACM,SAAS,CAAc;EACvDC,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEC,IAAI;MAAEC,UAAU;MAAEC,KAAK;MAAEC,WAAW;MAAEC,MAAM;MAAEC;IAAS,CAAC,GAC9D,IAAI,CAACC,KAAK;IAEZ,oBACEV,IAAA,CAACH,iCAAiC;MAChCc,KAAK,EAAEC,MAAM,CAACC,MAAO;MACrBT,IAAI,EAAEA,IAAK;MACXC,UAAU,EAAEA,UAAW;MACvBC,KAAK,EAAEA,KAAM;MACbC,WAAW,EAAEA,WAAY;MACzBC,MAAM,EAAEA,MAAO;MAAAC,QAAA,EAEdA;IAAQ,CACwB,CAAC;EAExC;AACF;AAEA,MAAMG,MAAM,GAAGd,UAAU,CAACgB,MAAM,CAAC;EAC/BD,MAAM,EAAE;IACNE,QAAQ,EAAE,UAAU;IACpBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["Marker.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","LuggMapsPolylineViewNativeComponent","StyleSheet","jsx","_jsx","Polyline","Component","render","coordinates","strokeColors","strokeWidth","animated","props","style","styles","polyline","create","position","pointerEvents"],"sourceRoot":"../../src","sources":["Polyline.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,mCAAmC,MAAM,8CAA8C;AAE9F,SAASC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1C,OAAO,MAAMC,QAAQ,SAASL,KAAK,CAACM,SAAS,CAAgB;EAC3DC,MAAMA,CAAA,EAAG;IACP,MAAM;MACJC,WAAW;MACXC,YAAY;MACZC,WAAW;MACXC,QAAQ,GAAG;IACb,CAAC,GAAG,IAAI,CAACC,KAAK;IAEd,oBACER,IAAA,CAACH,mCAAmC;MAClCY,KAAK,EAAEC,MAAM,CAACC,QAAS;MACvBP,WAAW,EAAEA,WAAY;MACzBC,YAAY,EAAEA,YAAa;MAC3BC,WAAW,EAAEA,WAAY;MACzBC,QAAQ,EAAEA;IAAS,CACpB,CAAC;EAEN;AACF;AAEA,MAAMG,MAAM,GAAGZ,UAAU,CAACc,MAAM,CAAC;EAC/BD,QAAQ,EAAE;IACRE,QAAQ,EAAE,UAAU;IACpBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["Polyline.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withMapsAndroid.d.ts","sourceRoot":"","sources":["../../../../plugin/src/withMapsAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,sBAAsB,CAqBpE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withMapsIOS.d.ts","sourceRoot":"","sources":["../../../../plugin/src/withMapsIOS.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,kBAAkB,CAoC5D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../src/Marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,qBAAa,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;IACtD,MAAM;CAiBP"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Marker.types.d.ts","sourceRoot":"","sources":["../../../src/Marker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,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,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Polyline.d.ts","sourceRoot":"","sources":["../../../src/Polyline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAC1D,MAAM;CAkBP"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Polyline.types.d.ts","sourceRoot":"","sources":["../../../src/Polyline.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;GAEG;AACH,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;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuggMapsAppleMapViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggMapsAppleMapViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACV,MAAM,EACN,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,YAAY,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,KAAK,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAEhD,UAAU,cAAc;IACtB,UAAU,EAAE,CACV,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,EACxC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;IACV,cAAc,EAAE,CACd,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,EACxC,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;CACX;AAED,eAAO,MAAM,QAAQ,gBAEnB,CAAC;wBAIE,aAAa;AAFlB,wBAEmB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuggMapsGoogleMapViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggMapsGoogleMapViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACV,MAAM,EACN,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,YAAY,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,KAAK,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAEhD,UAAU,cAAc;IACtB,UAAU,EAAE,CACV,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,EACxC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;IACV,cAAc,EAAE,CACd,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,EACxC,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;CACX;AAED,eAAO,MAAM,QAAQ,gBAEnB,CAAC;wBAIE,aAAa;AAFlB,wBAEmB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuggMapsMarkerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggMapsMarkerViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAExE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;wBAII,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuggMapsPolylineViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggMapsPolylineViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAExE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;wBAII,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LuggMapsWrapperViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggMapsWrapperViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7D,MAAM,WAAW,WAAY,SAAQ,SAAS;CAAG;wBAI5C,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
|
package/src/Marker.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import LuggMapsMarkerViewNativeComponent from './fabric/LuggMapsMarkerViewNativeComponent';
|
|
3
|
-
import type { MarkerProps } from './Marker.types';
|
|
4
|
-
import { StyleSheet } from 'react-native';
|
|
5
|
-
|
|
6
|
-
export class Marker extends React.Component<MarkerProps> {
|
|
7
|
-
render() {
|
|
8
|
-
const { name, coordinate, title, description, anchor, children } =
|
|
9
|
-
this.props;
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<LuggMapsMarkerViewNativeComponent
|
|
13
|
-
style={styles.marker}
|
|
14
|
-
name={name}
|
|
15
|
-
coordinate={coordinate}
|
|
16
|
-
title={title}
|
|
17
|
-
description={description}
|
|
18
|
-
anchor={anchor}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</LuggMapsMarkerViewNativeComponent>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const styles = StyleSheet.create({
|
|
27
|
-
marker: {
|
|
28
|
-
position: 'absolute',
|
|
29
|
-
pointerEvents: 'box-none',
|
|
30
|
-
},
|
|
31
|
-
});
|
package/src/Marker.types.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { Coordinate, Point } from './types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Marker component props
|
|
6
|
-
*/
|
|
7
|
-
export interface MarkerProps {
|
|
8
|
-
/**
|
|
9
|
-
* Name used for debugging purposes
|
|
10
|
-
*/
|
|
11
|
-
name?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Marker position
|
|
14
|
-
*/
|
|
15
|
-
coordinate: Coordinate;
|
|
16
|
-
/**
|
|
17
|
-
* Callout title
|
|
18
|
-
*/
|
|
19
|
-
title?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Callout description
|
|
22
|
-
*/
|
|
23
|
-
description?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Anchor point for custom marker views
|
|
26
|
-
*/
|
|
27
|
-
anchor?: Point;
|
|
28
|
-
/**
|
|
29
|
-
* Custom marker view
|
|
30
|
-
*/
|
|
31
|
-
children?: ReactNode;
|
|
32
|
-
}
|