@lugg/maps 1.0.0-beta.3 → 1.0.0-beta.5
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 +3 -0
- package/android/src/main/java/com/luggmaps/LuggCalloutView.kt +4 -2
- package/android/src/main/java/com/luggmaps/LuggCalloutViewManager.kt +4 -3
- package/android/src/main/java/com/luggmaps/LuggCircleView.kt +85 -0
- package/android/src/main/java/com/luggmaps/LuggCircleViewManager.kt +79 -0
- package/android/src/main/java/com/luggmaps/LuggGroundOverlayView.kt +81 -0
- package/android/src/main/java/com/luggmaps/LuggGroundOverlayViewManager.kt +82 -0
- package/android/src/main/java/com/luggmaps/LuggMapView.kt +49 -0
- package/android/src/main/java/com/luggmaps/LuggMapViewManager.kt +31 -0
- package/android/src/main/java/com/luggmaps/LuggMarkerView.kt +23 -0
- package/android/src/main/java/com/luggmaps/LuggMarkerViewManager.kt +13 -0
- package/android/src/main/java/com/luggmaps/LuggPackage.kt +4 -1
- package/android/src/main/java/com/luggmaps/LuggTileOverlayView.kt +92 -0
- package/android/src/main/java/com/luggmaps/LuggTileOverlayViewManager.kt +80 -0
- package/android/src/main/java/com/luggmaps/core/GoogleMapProvider.kt +451 -17
- package/android/src/main/java/com/luggmaps/core/MapProviderDelegate.kt +14 -0
- package/android/src/main/java/com/luggmaps/events/CirclePressEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/events/GroundOverlayPressEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/events/TileOverlayPressEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/extensions/ViewExtensions.kt +11 -0
- package/ios/LuggCalloutView.h +1 -1
- package/ios/LuggCalloutView.mm +21 -11
- package/ios/LuggCircleView.h +31 -0
- package/ios/LuggCircleView.mm +133 -0
- package/ios/LuggGroundOverlayView.h +30 -0
- package/ios/LuggGroundOverlayView.mm +125 -0
- package/ios/LuggMapView.mm +84 -2
- package/ios/LuggMarkerView.h +3 -0
- package/ios/LuggMarkerView.mm +23 -0
- package/ios/LuggTileOverlayView.h +31 -0
- package/ios/LuggTileOverlayView.mm +130 -0
- package/ios/core/AppleMapProvider.mm +595 -17
- package/ios/core/GoogleMapProvider.mm +390 -28
- package/ios/core/MapProviderDelegate.h +20 -1
- package/ios/events/CirclePressEvent.h +20 -0
- package/ios/events/GroundOverlayPressEvent.h +20 -0
- package/ios/events/TileOverlayPressEvent.h +20 -0
- package/lib/module/MapView.js +11 -0
- package/lib/module/MapView.js.map +1 -1
- package/lib/module/MapView.web.js +3 -0
- package/lib/module/MapView.web.js.map +1 -1
- package/lib/module/components/Circle.js +46 -0
- package/lib/module/components/Circle.js.map +1 -0
- package/lib/module/components/Circle.types.js +4 -0
- package/lib/module/components/Circle.types.js.map +1 -0
- package/lib/module/components/Circle.web.js +79 -0
- package/lib/module/components/Circle.web.js.map +1 -0
- package/lib/module/components/GroundOverlay.js +45 -0
- package/lib/module/components/GroundOverlay.js.map +1 -0
- package/lib/module/components/GroundOverlay.types.js +4 -0
- package/lib/module/components/GroundOverlay.types.js.map +1 -0
- package/lib/module/components/GroundOverlay.web.js +77 -0
- package/lib/module/components/GroundOverlay.web.js.map +1 -0
- package/lib/module/components/Marker.js +22 -4
- package/lib/module/components/Marker.js.map +1 -1
- package/lib/module/components/Marker.web.js +20 -7
- package/lib/module/components/Marker.web.js.map +1 -1
- package/lib/module/components/TileOverlay.js +44 -0
- package/lib/module/components/TileOverlay.js.map +1 -0
- package/lib/module/components/TileOverlay.types.js +4 -0
- package/lib/module/components/TileOverlay.types.js.map +1 -0
- package/lib/module/components/TileOverlay.web.js +69 -0
- package/lib/module/components/TileOverlay.web.js.map +1 -0
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/index.web.js +3 -0
- package/lib/module/components/index.web.js.map +1 -1
- package/lib/module/fabric/LuggCalloutViewNativeComponent.ts +1 -1
- package/lib/module/fabric/LuggCircleViewNativeComponent.ts +25 -0
- package/lib/module/fabric/LuggGroundOverlayViewNativeComponent.ts +29 -0
- package/lib/module/fabric/LuggMapViewNativeComponent.ts +9 -1
- package/lib/module/fabric/LuggMarkerViewNativeComponent.ts +14 -2
- package/lib/module/fabric/LuggTileOverlayViewNativeComponent.ts +30 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +3 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/typescript/src/MapView.d.ts.map +1 -1
- package/lib/typescript/src/MapView.types.d.ts +36 -1
- package/lib/typescript/src/MapView.types.d.ts.map +1 -1
- package/lib/typescript/src/MapView.web.d.ts.map +1 -1
- package/lib/typescript/src/components/Circle.d.ts +10 -0
- package/lib/typescript/src/components/Circle.d.ts.map +1 -0
- package/lib/typescript/src/components/Circle.types.d.ts +33 -0
- package/lib/typescript/src/components/Circle.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Circle.web.d.ts +3 -0
- package/lib/typescript/src/components/Circle.web.d.ts.map +1 -0
- package/lib/typescript/src/components/GroundOverlay.d.ts +10 -0
- package/lib/typescript/src/components/GroundOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/GroundOverlay.types.d.ts +35 -0
- package/lib/typescript/src/components/GroundOverlay.types.d.ts.map +1 -0
- package/lib/typescript/src/components/GroundOverlay.web.d.ts +3 -0
- package/lib/typescript/src/components/GroundOverlay.web.d.ts.map +1 -0
- package/lib/typescript/src/components/Marker.d.ts +6 -3
- package/lib/typescript/src/components/Marker.d.ts.map +1 -1
- package/lib/typescript/src/components/Marker.types.d.ts +18 -6
- package/lib/typescript/src/components/Marker.types.d.ts.map +1 -1
- package/lib/typescript/src/components/Marker.web.d.ts +3 -2
- package/lib/typescript/src/components/Marker.web.d.ts.map +1 -1
- package/lib/typescript/src/components/TileOverlay.d.ts +10 -0
- package/lib/typescript/src/components/TileOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/TileOverlay.types.d.ts +36 -0
- package/lib/typescript/src/components/TileOverlay.types.d.ts.map +1 -0
- package/lib/typescript/src/components/TileOverlay.web.d.ts +3 -0
- package/lib/typescript/src/components/TileOverlay.web.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +7 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/index.web.d.ts +6 -0
- package/lib/typescript/src/components/index.web.d.ts.map +1 -1
- package/lib/typescript/src/fabric/LuggCalloutViewNativeComponent.d.ts +1 -1
- package/lib/typescript/src/fabric/LuggCircleViewNativeComponent.d.ts +18 -0
- package/lib/typescript/src/fabric/LuggCircleViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggGroundOverlayViewNativeComponent.d.ts +21 -0
- package/lib/typescript/src/fabric/LuggGroundOverlayViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggMapViewNativeComponent.d.ts +6 -1
- package/lib/typescript/src/fabric/LuggMapViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts +8 -1
- package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/fabric/LuggTileOverlayViewNativeComponent.d.ts +21 -0
- package/lib/typescript/src/fabric/LuggTileOverlayViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +9 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +7 -1
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +0 -4
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/MapView.tsx +11 -0
- package/src/MapView.types.ts +85 -1
- package/src/MapView.web.tsx +11 -0
- package/src/components/Circle.tsx +52 -0
- package/src/components/Circle.types.ts +33 -0
- package/src/components/Circle.web.tsx +93 -0
- package/src/components/GroundOverlay.tsx +47 -0
- package/src/components/GroundOverlay.types.ts +36 -0
- package/src/components/GroundOverlay.web.tsx +85 -0
- package/src/components/Marker.tsx +32 -6
- package/src/components/Marker.types.ts +19 -6
- package/src/components/Marker.web.tsx +191 -148
- package/src/components/TileOverlay.tsx +44 -0
- package/src/components/TileOverlay.types.ts +37 -0
- package/src/components/TileOverlay.web.tsx +95 -0
- package/src/components/index.ts +10 -0
- package/src/components/index.web.ts +9 -0
- package/src/fabric/LuggCalloutViewNativeComponent.ts +1 -1
- package/src/fabric/LuggCircleViewNativeComponent.ts +25 -0
- package/src/fabric/LuggGroundOverlayViewNativeComponent.ts +29 -0
- package/src/fabric/LuggMapViewNativeComponent.ts +9 -1
- package/src/fabric/LuggMarkerViewNativeComponent.ts +14 -2
- package/src/fabric/LuggTileOverlayViewNativeComponent.ts +30 -0
- package/src/index.ts +12 -1
- package/src/index.web.ts +15 -0
- package/src/types.ts +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { codegenNativeComponent } from 'react-native';
|
|
1
|
+
import { codegenNativeComponent, codegenNativeCommands } from 'react-native';
|
|
2
2
|
import type { ViewProps, HostComponent } from 'react-native';
|
|
3
3
|
import type {
|
|
4
4
|
Double,
|
|
@@ -25,6 +25,7 @@ export interface NativeProps extends ViewProps {
|
|
|
25
25
|
rotate?: WithDefault<Double, 0>;
|
|
26
26
|
scale?: WithDefault<Double, 1>;
|
|
27
27
|
rasterize?: WithDefault<boolean, true>;
|
|
28
|
+
centerOnPress?: WithDefault<boolean, true>;
|
|
28
29
|
draggable?: WithDefault<boolean, false>;
|
|
29
30
|
onMarkerPress?: DirectEventHandler<{
|
|
30
31
|
coordinate: {
|
|
@@ -68,6 +69,17 @@ export interface NativeProps extends ViewProps {
|
|
|
68
69
|
}>;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
73
|
+
|
|
74
|
+
interface NativeCommands {
|
|
75
|
+
showCallout: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
76
|
+
hideCallout: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export const Commands = codegenNativeCommands<NativeCommands>({
|
|
80
|
+
supportedCommands: ['showCallout', 'hideCallout'],
|
|
81
|
+
});
|
|
82
|
+
|
|
71
83
|
export default codegenNativeComponent<NativeProps>(
|
|
72
84
|
'LuggMarkerView'
|
|
73
|
-
) as
|
|
85
|
+
) as ComponentType;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { codegenNativeComponent } from 'react-native';
|
|
2
|
+
import type { ViewProps, HostComponent } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
Double,
|
|
5
|
+
Int32,
|
|
6
|
+
DirectEventHandler,
|
|
7
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
|
|
9
|
+
export interface Coordinate {
|
|
10
|
+
latitude: Double;
|
|
11
|
+
longitude: Double;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface Bounds {
|
|
15
|
+
northeast: Coordinate;
|
|
16
|
+
southwest: Coordinate;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface NativeProps extends ViewProps {
|
|
20
|
+
urlTemplate: string;
|
|
21
|
+
tileSize?: Int32;
|
|
22
|
+
opacity?: Double;
|
|
23
|
+
bounds?: Bounds;
|
|
24
|
+
tappable?: boolean;
|
|
25
|
+
onTileOverlayPress?: DirectEventHandler<null>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default codegenNativeComponent<NativeProps>(
|
|
29
|
+
'LuggTileOverlayView'
|
|
30
|
+
) as HostComponent<NativeProps>;
|
package/src/index.ts
CHANGED
|
@@ -4,12 +4,15 @@ export type { MapProviderProps } from './MapProvider.types';
|
|
|
4
4
|
export { Marker } from './components';
|
|
5
5
|
export type {
|
|
6
6
|
CalloutOptions,
|
|
7
|
+
MarkerRef,
|
|
7
8
|
MarkerProps,
|
|
8
9
|
MarkerPressEvent,
|
|
9
10
|
MarkerDragEvent,
|
|
10
11
|
} from './components';
|
|
11
12
|
export { Polygon } from './components';
|
|
12
13
|
export type { PolygonProps } from './components';
|
|
14
|
+
export { Circle } from './components';
|
|
15
|
+
export type { CircleProps } from './components';
|
|
13
16
|
export { Polyline } from './components';
|
|
14
17
|
export type {
|
|
15
18
|
PolylineProps,
|
|
@@ -18,6 +21,10 @@ export type {
|
|
|
18
21
|
} from './components';
|
|
19
22
|
export { GeoJson } from './components';
|
|
20
23
|
export type { GeoJsonProps } from './components';
|
|
24
|
+
export { GroundOverlay } from './components';
|
|
25
|
+
export type { GroundOverlayProps, GroundOverlayBounds } from './components';
|
|
26
|
+
export { TileOverlay } from './components';
|
|
27
|
+
export type { TileOverlayProps, TileOverlayBounds } from './components';
|
|
21
28
|
export type {
|
|
22
29
|
MapViewProps,
|
|
23
30
|
MapViewRef,
|
|
@@ -27,10 +34,14 @@ export type {
|
|
|
27
34
|
CameraEventPayload,
|
|
28
35
|
MapCameraEvent,
|
|
29
36
|
MapPressEvent,
|
|
37
|
+
MapType,
|
|
38
|
+
MapTheme,
|
|
39
|
+
InsetAdjustment,
|
|
40
|
+
PoiCategory,
|
|
41
|
+
PoiFilter,
|
|
30
42
|
} from './MapView.types';
|
|
31
43
|
export type {
|
|
32
44
|
MapProvider as MapProviderType,
|
|
33
|
-
MapTheme,
|
|
34
45
|
Coordinate,
|
|
35
46
|
Point,
|
|
36
47
|
EdgeInsets,
|
package/src/index.web.ts
CHANGED
|
@@ -5,16 +5,31 @@ export { Marker } from './components/index.web';
|
|
|
5
5
|
export type { CalloutOptions, MarkerProps } from './components/index.web';
|
|
6
6
|
export { Polygon } from './components/index.web';
|
|
7
7
|
export type { PolygonProps } from './components/index.web';
|
|
8
|
+
export { Circle } from './components/index.web';
|
|
9
|
+
export type { CircleProps } from './components/index.web';
|
|
8
10
|
export { Polyline } from './components/index.web';
|
|
9
11
|
export type { PolylineProps } from './components/index.web';
|
|
10
12
|
export { GeoJson } from './components/index.web';
|
|
11
13
|
export type { GeoJsonProps } from './components/index.web';
|
|
14
|
+
export { GroundOverlay } from './components/index.web';
|
|
15
|
+
export type {
|
|
16
|
+
GroundOverlayProps,
|
|
17
|
+
GroundOverlayBounds,
|
|
18
|
+
} from './components/index.web';
|
|
19
|
+
export { TileOverlay } from './components/index.web';
|
|
20
|
+
export type {
|
|
21
|
+
TileOverlayProps,
|
|
22
|
+
TileOverlayBounds,
|
|
23
|
+
} from './components/index.web';
|
|
12
24
|
export type {
|
|
13
25
|
MapViewProps,
|
|
14
26
|
MapViewRef,
|
|
15
27
|
MoveCameraOptions,
|
|
16
28
|
FitCoordinatesOptions,
|
|
17
29
|
CameraEventPayload,
|
|
30
|
+
MapType,
|
|
31
|
+
PoiCategory,
|
|
32
|
+
PoiFilter,
|
|
18
33
|
} from './MapView.types';
|
|
19
34
|
export type {
|
|
20
35
|
MapProvider as MapProviderType,
|