@lugg/maps 1.0.0-beta.2 → 1.0.0-beta.21
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 +9 -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 +90 -0
- package/android/src/main/java/com/luggmaps/LuggMapViewManager.kt +45 -0
- package/android/src/main/java/com/luggmaps/LuggMapWrapperView.kt +27 -2
- package/android/src/main/java/com/luggmaps/LuggMarkerView.kt +30 -2
- 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/LuggPolylineView.kt +3 -23
- 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 +737 -37
- package/android/src/main/java/com/luggmaps/core/MapProviderDelegate.kt +15 -0
- package/android/src/main/java/com/luggmaps/core/PolylineAnimator.kt +65 -11
- 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 +254 -4
- package/ios/LuggMapWrapperView.h +5 -0
- package/ios/LuggMapWrapperView.mm +18 -0
- package/ios/LuggMarkerView.h +3 -0
- package/ios/LuggMarkerView.mm +25 -0
- package/ios/LuggTileOverlayView.h +31 -0
- package/ios/LuggTileOverlayView.mm +130 -0
- package/ios/core/AppleMapProvider.h +8 -0
- package/ios/core/AppleMapProvider.mm +663 -29
- package/ios/core/AppleStaticMapProvider.h +14 -0
- package/ios/core/AppleStaticMapProvider.mm +159 -0
- package/ios/core/GMSPolylineAnimator.m +46 -18
- package/ios/core/GoogleMapProvider.h +10 -0
- package/ios/core/GoogleMapProvider.mm +430 -51
- package/ios/core/GoogleStaticMapProvider.h +21 -0
- package/ios/core/GoogleStaticMapProvider.mm +213 -0
- package/ios/core/MKPolylineAnimator.m +67 -43
- package/ios/core/MapProviderDelegate.h +27 -1
- package/ios/core/StaticMapProviderBase.h +75 -0
- package/ios/core/StaticMapProviderBase.mm +845 -0
- package/ios/events/CameraIdleEvent.h +4 -2
- package/ios/events/CameraMoveEvent.h +4 -2
- package/ios/events/CirclePressEvent.h +22 -0
- package/ios/events/GroundOverlayPressEvent.h +22 -0
- package/ios/events/LongPressEvent.h +4 -2
- package/ios/events/MarkerDragEvent.h +12 -6
- package/ios/events/MarkerPressEvent.h +4 -2
- package/ios/events/PolygonPressEvent.h +4 -2
- package/ios/events/PressEvent.h +4 -2
- package/ios/events/ReadyEvent.h +4 -2
- package/ios/events/TileOverlayPressEvent.h +22 -0
- package/ios/extensions/MKMapView+Zoom.h +20 -0
- package/ios/extensions/MKMapView+Zoom.m +28 -18
- package/ios/extensions/UIView+Snapshot.h +16 -0
- package/ios/extensions/UIView+Snapshot.m +27 -0
- package/lib/module/MapProvider.web.js +4 -1
- package/lib/module/MapProvider.web.js.map +1 -1
- package/lib/module/MapView.js +19 -1
- package/lib/module/MapView.js.map +1 -1
- package/lib/module/MapView.web.js +30 -22
- 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/GeoJson.js +3 -3
- package/lib/module/components/GeoJson.js.map +1 -1
- 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 +23 -10
- package/lib/module/components/Marker.web.js.map +1 -1
- package/lib/module/components/Polygon.web.js +3 -3
- package/lib/module/components/Polygon.web.js.map +1 -1
- package/lib/module/components/Polyline.web.js +6 -12
- package/lib/module/components/Polyline.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 +16 -5
- 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/MapProvider.web.d.ts +3 -2
- package/lib/typescript/src/MapProvider.web.d.ts.map +1 -1
- package/lib/typescript/src/MapView.d.ts +1 -1
- package/lib/typescript/src/MapView.d.ts.map +1 -1
- package/lib/typescript/src/MapView.types.d.ts +60 -1
- package/lib/typescript/src/MapView.types.d.ts.map +1 -1
- package/lib/typescript/src/MapView.web.d.ts +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/GeoJson.d.ts +2 -1
- package/lib/typescript/src/components/GeoJson.d.ts.map +1 -1
- 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/Polygon.web.d.ts +1 -1
- package/lib/typescript/src/components/Polygon.web.d.ts.map +1 -1
- package/lib/typescript/src/components/Polyline.web.d.ts +1 -1
- package/lib/typescript/src/components/Polyline.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 +13 -5
- 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 +17 -11
- package/src/MapProvider.web.tsx +5 -3
- package/src/MapView.tsx +19 -1
- package/src/MapView.types.ts +142 -1
- package/src/MapView.web.tsx +379 -340
- package/src/components/Circle.tsx +52 -0
- package/src/components/Circle.types.ts +33 -0
- package/src/components/Circle.web.tsx +95 -0
- package/src/components/GeoJson.tsx +3 -3
- package/src/components/GroundOverlay.tsx +47 -0
- package/src/components/GroundOverlay.types.ts +36 -0
- package/src/components/GroundOverlay.web.tsx +81 -0
- package/src/components/Marker.tsx +32 -6
- package/src/components/Marker.types.ts +19 -6
- package/src/components/Marker.web.tsx +196 -150
- package/src/components/Polygon.web.tsx +93 -89
- package/src/components/Polyline.web.tsx +235 -235
- package/src/components/TileOverlay.tsx +44 -0
- package/src/components/TileOverlay.types.ts +37 -0
- package/src/components/TileOverlay.web.tsx +97 -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 +16 -5
- 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
- package/plugin/build/withMapsAndroid.d.ts +0 -5
- package/plugin/build/withMapsAndroid.js +0 -15
- package/plugin/build/withMapsIOS.d.ts +0 -5
- package/plugin/build/withMapsIOS.js +0 -27
|
@@ -17,6 +17,7 @@ export interface NativeProps extends ViewProps {
|
|
|
17
17
|
rotate?: WithDefault<Double, 0>;
|
|
18
18
|
scale?: WithDefault<Double, 1>;
|
|
19
19
|
rasterize?: WithDefault<boolean, true>;
|
|
20
|
+
centerOnPress?: WithDefault<boolean, true>;
|
|
20
21
|
draggable?: WithDefault<boolean, false>;
|
|
21
22
|
onMarkerPress?: DirectEventHandler<{
|
|
22
23
|
coordinate: {
|
|
@@ -59,6 +60,12 @@ export interface NativeProps extends ViewProps {
|
|
|
59
60
|
};
|
|
60
61
|
}>;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
64
|
+
interface NativeCommands {
|
|
65
|
+
showCallout: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
66
|
+
hideCallout: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
67
|
+
}
|
|
68
|
+
export declare const Commands: NativeCommands;
|
|
69
|
+
declare const _default: ComponentType;
|
|
63
70
|
export default _default;
|
|
64
71
|
//# sourceMappingURL=LuggMarkerViewNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LuggMarkerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggMarkerViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,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;IACf,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACxC,aAAa,CAAC,EAAE,kBAAkB,CAAC;QACjC,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,CAAC,EAAE,MAAM,CAAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;KACH,CAAC,CAAC;IACH,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;QACrC,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,CAAC,EAAE,MAAM,CAAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;KACH,CAAC,CAAC;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACtC,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,CAAC,EAAE,MAAM,CAAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;KACH,CAAC,CAAC;IACH,eAAe,CAAC,EAAE,kBAAkB,CAAC;QACnC,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,CAAC,EAAE,MAAM,CAAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;KACH,CAAC,CAAC;CACJ;
|
|
1
|
+
{"version":3,"file":"LuggMarkerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggMarkerViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,a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AAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;KACH,CAAC,CAAC;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACtC,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,CAAC,EAAE,MAAM,CAAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;KACH,CAAC,CAAC;IACH,eAAe,CAAC,EAAE,kBAAkB,CAAC;QACnC,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,CAAC,EAAE,MAAM,CAAC;YACV,CAAC,EAAE,MAAM,CAAC;SACX,CAAC;KACH,CAAC,CAAC;CACJ;AAED,KAAK,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAEhD,UAAU,cAAc;IACtB,WAAW,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAChE,WAAW,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,QAAQ,gBAEnB,CAAC;wBAIE,aAAa;AAFlB,wBAEmB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ViewProps, HostComponent } from 'react-native';
|
|
2
|
+
import type { Double, Int32, DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export interface Coordinate {
|
|
4
|
+
latitude: Double;
|
|
5
|
+
longitude: Double;
|
|
6
|
+
}
|
|
7
|
+
export interface Bounds {
|
|
8
|
+
northeast: Coordinate;
|
|
9
|
+
southwest: Coordinate;
|
|
10
|
+
}
|
|
11
|
+
export interface NativeProps extends ViewProps {
|
|
12
|
+
urlTemplate: string;
|
|
13
|
+
tileSize?: Int32;
|
|
14
|
+
opacity?: Double;
|
|
15
|
+
bounds?: Bounds;
|
|
16
|
+
tappable?: boolean;
|
|
17
|
+
onTileOverlayPress?: DirectEventHandler<null>;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: HostComponent<NativeProps>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=LuggTileOverlayViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LuggTileOverlayViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/LuggTileOverlayViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,MAAM;IACrB,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;CACvB;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;CAC/C;wBAII,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
|
|
@@ -2,14 +2,20 @@ export { MapView } from './MapView';
|
|
|
2
2
|
export { MapProvider } from './MapProvider';
|
|
3
3
|
export type { MapProviderProps } from './MapProvider.types';
|
|
4
4
|
export { Marker } from './components';
|
|
5
|
-
export type { CalloutOptions, MarkerProps, MarkerPressEvent, MarkerDragEvent, } from './components';
|
|
5
|
+
export type { CalloutOptions, MarkerRef, MarkerProps, MarkerPressEvent, MarkerDragEvent, } from './components';
|
|
6
6
|
export { Polygon } from './components';
|
|
7
7
|
export type { PolygonProps } from './components';
|
|
8
|
+
export { Circle } from './components';
|
|
9
|
+
export type { CircleProps } from './components';
|
|
8
10
|
export { Polyline } from './components';
|
|
9
11
|
export type { PolylineProps, PolylineEasing, PolylineAnimatedOptions, } from './components';
|
|
10
12
|
export { GeoJson } from './components';
|
|
11
13
|
export type { GeoJsonProps } from './components';
|
|
12
|
-
export
|
|
13
|
-
export type {
|
|
14
|
+
export { GroundOverlay } from './components';
|
|
15
|
+
export type { GroundOverlayProps, GroundOverlayBounds } from './components';
|
|
16
|
+
export { TileOverlay } from './components';
|
|
17
|
+
export type { TileOverlayProps, TileOverlayBounds } from './components';
|
|
18
|
+
export type { MapViewProps, MapViewRef, MoveCameraOptions, FitCoordinatesOptions, SetEdgeInsetsOptions, CameraEventPayload, MapCameraEvent, MapPressEvent, MapType, MapTheme, InsetAdjustment, PoiCategory, PoiFilter, } from './MapView.types';
|
|
19
|
+
export type { MapProvider as MapProviderType, Coordinate, Point, EdgeInsets, PressEventPayload, } from './types';
|
|
14
20
|
export type { GeoJSON, Feature, FeatureCollection, FeatureProperties, Geometry, Position, } from './components/GeoJson.types';
|
|
15
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,YAAY,EACV,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,MAAM,cA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,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACxE,YAAY,EACV,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,OAAO,EACP,QAAQ,EACR,eAAe,EACf,WAAW,EACX,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,WAAW,IAAI,eAAe,EAC9B,UAAU,EACV,KAAK,EACL,UAAU,EACV,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,GACT,MAAM,4BAA4B,CAAC"}
|
|
@@ -5,11 +5,17 @@ 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';
|
|
12
|
-
export
|
|
14
|
+
export { GroundOverlay } from './components/index.web';
|
|
15
|
+
export type { GroundOverlayProps, GroundOverlayBounds, } from './components/index.web';
|
|
16
|
+
export { TileOverlay } from './components/index.web';
|
|
17
|
+
export type { TileOverlayProps, TileOverlayBounds, } from './components/index.web';
|
|
18
|
+
export type { MapViewProps, MapViewRef, MoveCameraOptions, FitCoordinatesOptions, CameraEventPayload, MapType, PoiCategory, PoiFilter, } from './MapView.types';
|
|
13
19
|
export type { MapProvider as MapProviderType, Coordinate, Point, EdgeInsets, } from './types';
|
|
14
20
|
export type { GeoJSON, Feature, FeatureCollection, FeatureProperties, Geometry, Position, } from './components/GeoJson.types';
|
|
15
21
|
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EACV,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,M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;AAE7C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,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;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,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;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;CACd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lugg/maps",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.21",
|
|
4
4
|
"description": "Universal maps for React Native.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -75,8 +75,10 @@
|
|
|
75
75
|
"@eslint/compat": "^1.3.2",
|
|
76
76
|
"@eslint/eslintrc": "^3.3.1",
|
|
77
77
|
"@eslint/js": "^9.35.0",
|
|
78
|
-
"@
|
|
79
|
-
"@react-native/
|
|
78
|
+
"@expo/config-plugins": "^56.0.8",
|
|
79
|
+
"@react-native/babel-preset": "0.85.3",
|
|
80
|
+
"@react-native/eslint-config": "0.85.3",
|
|
81
|
+
"@react-native/jest-preset": "0.85.3",
|
|
80
82
|
"@release-it/conventional-changelog": "^10.0.1",
|
|
81
83
|
"@types/jest": "^29.5.14",
|
|
82
84
|
"@types/react": "^19.2.0",
|
|
@@ -89,29 +91,30 @@
|
|
|
89
91
|
"jest": "^29.7.0",
|
|
90
92
|
"lefthook": "^2.0.3",
|
|
91
93
|
"prettier": "^2.8.8",
|
|
92
|
-
"react": "19.2.
|
|
93
|
-
"react-native": "0.
|
|
94
|
+
"react": "19.2.3",
|
|
95
|
+
"react-native": "0.85.3",
|
|
94
96
|
"react-native-builder-bob": "^0.40.13",
|
|
95
97
|
"release-it": "^19.0.4",
|
|
96
98
|
"turbo": "^2.5.6",
|
|
97
99
|
"typescript": "^5.9.2"
|
|
98
100
|
},
|
|
99
101
|
"resolutions": {
|
|
100
|
-
"@lodev09/react-native-true-sheet": "3.
|
|
102
|
+
"@lodev09/react-native-true-sheet": "3.11.0-beta.10"
|
|
101
103
|
},
|
|
102
104
|
"peerDependencies": {
|
|
103
105
|
"@vis.gl/react-google-maps": ">=1.0.0",
|
|
106
|
+
"expo": "*",
|
|
104
107
|
"react": "*",
|
|
105
108
|
"react-native": "*"
|
|
106
109
|
},
|
|
107
110
|
"peerDependenciesMeta": {
|
|
108
111
|
"@vis.gl/react-google-maps": {
|
|
109
112
|
"optional": true
|
|
113
|
+
},
|
|
114
|
+
"expo": {
|
|
115
|
+
"optional": true
|
|
110
116
|
}
|
|
111
117
|
},
|
|
112
|
-
"dependencies": {
|
|
113
|
-
"@expo/config-plugins": "^9.0.0"
|
|
114
|
-
},
|
|
115
118
|
"workspaces": [
|
|
116
119
|
"example/bare",
|
|
117
120
|
"example/expo",
|
|
@@ -150,12 +153,15 @@
|
|
|
150
153
|
"LuggCalloutView": "LuggCalloutView",
|
|
151
154
|
"LuggMapWrapperView": "LuggMapWrapperView",
|
|
152
155
|
"LuggPolylineView": "LuggPolylineView",
|
|
153
|
-
"LuggPolygonView": "LuggPolygonView"
|
|
156
|
+
"LuggPolygonView": "LuggPolygonView",
|
|
157
|
+
"LuggCircleView": "LuggCircleView",
|
|
158
|
+
"LuggGroundOverlayView": "LuggGroundOverlayView",
|
|
159
|
+
"LuggTileOverlayView": "LuggTileOverlayView"
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
},
|
|
157
163
|
"jest": {
|
|
158
|
-
"preset": "react-native",
|
|
164
|
+
"preset": "@react-native/jest-preset",
|
|
159
165
|
"modulePathIgnorePatterns": [
|
|
160
166
|
"<rootDir>/example/bare/node_modules",
|
|
161
167
|
"<rootDir>/lib/"
|
package/src/MapProvider.web.tsx
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
1
|
+
import { createContext, useContext, type MutableRefObject } from 'react';
|
|
2
2
|
import { APIProvider } from '@vis.gl/react-google-maps';
|
|
3
3
|
import type { MapProviderProps } from './MapProvider.types';
|
|
4
4
|
|
|
5
5
|
type CalloutCloseListener = () => void;
|
|
6
6
|
|
|
7
|
+
const defaultDraggingRef = { current: false };
|
|
8
|
+
|
|
7
9
|
export const MapContext = createContext<{
|
|
8
10
|
map: google.maps.Map | null;
|
|
9
|
-
|
|
11
|
+
isDraggingRef: MutableRefObject<boolean>;
|
|
10
12
|
moveCamera: (coordinate: { latitude: number; longitude: number }) => void;
|
|
11
13
|
onCalloutClose: (listener: CalloutCloseListener) => () => void;
|
|
12
14
|
closeCallouts: (except?: CalloutCloseListener) => void;
|
|
13
15
|
}>({
|
|
14
16
|
map: null,
|
|
15
|
-
|
|
17
|
+
isDraggingRef: defaultDraggingRef,
|
|
16
18
|
moveCamera: () => {},
|
|
17
19
|
onCalloutClose: () => () => {},
|
|
18
20
|
closeCallouts: () => {},
|
package/src/MapView.tsx
CHANGED
|
@@ -14,16 +14,19 @@ import type {
|
|
|
14
14
|
import type { Coordinate, EdgeInsets } from './types';
|
|
15
15
|
|
|
16
16
|
export class MapView
|
|
17
|
-
extends React.
|
|
17
|
+
extends React.PureComponent<MapViewProps>
|
|
18
18
|
implements MapViewRef
|
|
19
19
|
{
|
|
20
20
|
static defaultProps: Partial<MapViewProps> = {
|
|
21
21
|
provider: Platform.OS === 'ios' ? 'apple' : 'google',
|
|
22
|
+
mapType: 'standard',
|
|
22
23
|
initialZoom: 10,
|
|
23
24
|
zoomEnabled: true,
|
|
24
25
|
scrollEnabled: true,
|
|
25
26
|
rotateEnabled: true,
|
|
26
27
|
pitchEnabled: true,
|
|
28
|
+
compassEnabled: true,
|
|
29
|
+
poiEnabled: true,
|
|
27
30
|
theme: 'system',
|
|
28
31
|
};
|
|
29
32
|
|
|
@@ -80,6 +83,7 @@ export class MapView
|
|
|
80
83
|
render() {
|
|
81
84
|
const {
|
|
82
85
|
provider,
|
|
86
|
+
mapType,
|
|
83
87
|
mapId,
|
|
84
88
|
initialCoordinate,
|
|
85
89
|
initialZoom,
|
|
@@ -89,10 +93,16 @@ export class MapView
|
|
|
89
93
|
scrollEnabled,
|
|
90
94
|
rotateEnabled,
|
|
91
95
|
pitchEnabled,
|
|
96
|
+
compassEnabled,
|
|
97
|
+
staticMode,
|
|
98
|
+
staticKey,
|
|
92
99
|
edgeInsets,
|
|
93
100
|
userLocationEnabled,
|
|
94
101
|
userLocationButtonEnabled,
|
|
102
|
+
poiEnabled,
|
|
103
|
+
poiFilter,
|
|
95
104
|
theme,
|
|
105
|
+
insetAdjustment,
|
|
96
106
|
onPress,
|
|
97
107
|
onLongPress,
|
|
98
108
|
onCameraMove,
|
|
@@ -107,6 +117,7 @@ export class MapView
|
|
|
107
117
|
ref={this.nativeRef}
|
|
108
118
|
{...rest}
|
|
109
119
|
provider={provider}
|
|
120
|
+
mapType={mapType}
|
|
110
121
|
mapId={mapId}
|
|
111
122
|
initialCoordinate={initialCoordinate}
|
|
112
123
|
initialZoom={initialZoom}
|
|
@@ -116,10 +127,17 @@ export class MapView
|
|
|
116
127
|
scrollEnabled={scrollEnabled}
|
|
117
128
|
rotateEnabled={rotateEnabled}
|
|
118
129
|
pitchEnabled={pitchEnabled}
|
|
130
|
+
compassEnabled={compassEnabled}
|
|
131
|
+
staticMode={staticMode}
|
|
132
|
+
staticKey={staticKey}
|
|
119
133
|
edgeInsets={edgeInsets}
|
|
120
134
|
userLocationEnabled={userLocationEnabled}
|
|
121
135
|
userLocationButtonEnabled={userLocationButtonEnabled}
|
|
136
|
+
poiEnabled={poiEnabled}
|
|
137
|
+
poiFilterMode={poiFilter?.mode}
|
|
138
|
+
poiFilterCategories={poiFilter?.categories}
|
|
122
139
|
theme={theme}
|
|
140
|
+
insetAdjustment={insetAdjustment}
|
|
123
141
|
onMapPress={onPress}
|
|
124
142
|
onMapLongPress={onLongPress}
|
|
125
143
|
onCameraMove={onCameraMove}
|
package/src/MapView.types.ts
CHANGED
|
@@ -4,10 +4,104 @@ import type {
|
|
|
4
4
|
MapProvider,
|
|
5
5
|
Coordinate,
|
|
6
6
|
EdgeInsets,
|
|
7
|
-
MapTheme,
|
|
8
7
|
PressEventPayload,
|
|
9
8
|
} from './types';
|
|
10
9
|
|
|
10
|
+
export type MapType =
|
|
11
|
+
| 'standard'
|
|
12
|
+
| 'satellite'
|
|
13
|
+
| 'terrain'
|
|
14
|
+
| 'hybrid'
|
|
15
|
+
| 'muted-standard';
|
|
16
|
+
|
|
17
|
+
export type MapTheme = 'light' | 'dark' | 'system';
|
|
18
|
+
|
|
19
|
+
export type InsetAdjustment = 'automatic' | 'never';
|
|
20
|
+
|
|
21
|
+
export type PoiCategory =
|
|
22
|
+
| 'airport'
|
|
23
|
+
| 'amusement-park'
|
|
24
|
+
| 'animal-service'
|
|
25
|
+
| 'aquarium'
|
|
26
|
+
| 'atm'
|
|
27
|
+
| 'automotive-repair'
|
|
28
|
+
| 'bakery'
|
|
29
|
+
| 'bank'
|
|
30
|
+
| 'baseball'
|
|
31
|
+
| 'basketball'
|
|
32
|
+
| 'beach'
|
|
33
|
+
| 'beauty'
|
|
34
|
+
| 'bowling'
|
|
35
|
+
| 'brewery'
|
|
36
|
+
| 'cafe'
|
|
37
|
+
| 'campground'
|
|
38
|
+
| 'car-rental'
|
|
39
|
+
| 'castle'
|
|
40
|
+
| 'convention-center'
|
|
41
|
+
| 'distillery'
|
|
42
|
+
| 'ev-charger'
|
|
43
|
+
| 'fairground'
|
|
44
|
+
| 'fire-station'
|
|
45
|
+
| 'fishing'
|
|
46
|
+
| 'fitness-center'
|
|
47
|
+
| 'food-market'
|
|
48
|
+
| 'fortress'
|
|
49
|
+
| 'gas-station'
|
|
50
|
+
| 'go-kart'
|
|
51
|
+
| 'golf'
|
|
52
|
+
| 'hiking'
|
|
53
|
+
| 'hospital'
|
|
54
|
+
| 'hotel'
|
|
55
|
+
| 'kayaking'
|
|
56
|
+
| 'landmark'
|
|
57
|
+
| 'laundry'
|
|
58
|
+
| 'library'
|
|
59
|
+
| 'mailbox'
|
|
60
|
+
| 'marina'
|
|
61
|
+
| 'mini-golf'
|
|
62
|
+
| 'movie-theater'
|
|
63
|
+
| 'museum'
|
|
64
|
+
| 'music-venue'
|
|
65
|
+
| 'national-monument'
|
|
66
|
+
| 'national-park'
|
|
67
|
+
| 'nightlife'
|
|
68
|
+
| 'park'
|
|
69
|
+
| 'parking'
|
|
70
|
+
| 'pharmacy'
|
|
71
|
+
| 'planetarium'
|
|
72
|
+
| 'police'
|
|
73
|
+
| 'post-office'
|
|
74
|
+
| 'public-transport'
|
|
75
|
+
| 'restaurant'
|
|
76
|
+
| 'restroom'
|
|
77
|
+
| 'rock-climbing'
|
|
78
|
+
| 'rv-park'
|
|
79
|
+
| 'school'
|
|
80
|
+
| 'skate-park'
|
|
81
|
+
| 'skating'
|
|
82
|
+
| 'skiing'
|
|
83
|
+
| 'soccer'
|
|
84
|
+
| 'spa'
|
|
85
|
+
| 'stadium'
|
|
86
|
+
| 'store'
|
|
87
|
+
| 'surfing'
|
|
88
|
+
| 'swimming'
|
|
89
|
+
| 'tennis'
|
|
90
|
+
| 'theater'
|
|
91
|
+
| 'university'
|
|
92
|
+
| 'volleyball'
|
|
93
|
+
| 'winery'
|
|
94
|
+
| 'zoo';
|
|
95
|
+
|
|
96
|
+
export interface PoiFilter {
|
|
97
|
+
/**
|
|
98
|
+
* Filter mode
|
|
99
|
+
* @default 'including'
|
|
100
|
+
*/
|
|
101
|
+
mode?: 'including' | 'excluding';
|
|
102
|
+
categories: PoiCategory[];
|
|
103
|
+
}
|
|
104
|
+
|
|
11
105
|
/**
|
|
12
106
|
* Options for moving the camera
|
|
13
107
|
*/
|
|
@@ -64,6 +158,11 @@ export interface MapViewProps extends ViewProps {
|
|
|
64
158
|
* @default 'apple' on iOS, 'google' on Android
|
|
65
159
|
*/
|
|
66
160
|
provider?: MapProvider;
|
|
161
|
+
/**
|
|
162
|
+
* Map type to display
|
|
163
|
+
* @default 'standard'
|
|
164
|
+
*/
|
|
165
|
+
mapType?: MapType;
|
|
67
166
|
/**
|
|
68
167
|
* Map style ID (Google Maps) or configuration name (Apple Maps)
|
|
69
168
|
*/
|
|
@@ -105,6 +204,30 @@ export interface MapViewProps extends ViewProps {
|
|
|
105
204
|
* @default true
|
|
106
205
|
*/
|
|
107
206
|
pitchEnabled?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Show compass on the map.
|
|
209
|
+
* On web (Google Maps) this toggles the rotate/compass control.
|
|
210
|
+
* @default true
|
|
211
|
+
*/
|
|
212
|
+
compassEnabled?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Render the map as a non-interactive, static map.
|
|
215
|
+
* Uses Google Maps lite mode on Android. On iOS, the map is replaced
|
|
216
|
+
* with a rendered snapshot once tiles finish loading, releasing the
|
|
217
|
+
* live map resources. Ideal for maps inside list views.
|
|
218
|
+
* Cannot be changed after the map is created.
|
|
219
|
+
* @default false
|
|
220
|
+
*/
|
|
221
|
+
staticMode?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Stable identity for the static snapshot cache (iOS). When set, a map
|
|
224
|
+
* remounted with the same key (and same size, provider, and map settings)
|
|
225
|
+
* reuses its cached snapshot instead of rendering a live map again -
|
|
226
|
+
* e.g. set it to your list item's id. The key must uniquely identify the
|
|
227
|
+
* map's content, including markers and other children.
|
|
228
|
+
* Only used with staticMode.
|
|
229
|
+
*/
|
|
230
|
+
staticKey?: string;
|
|
108
231
|
/**
|
|
109
232
|
* Map content edge insets
|
|
110
233
|
*/
|
|
@@ -121,11 +244,29 @@ export interface MapViewProps extends ViewProps {
|
|
|
121
244
|
* @platform android
|
|
122
245
|
*/
|
|
123
246
|
userLocationButtonEnabled?: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Show points of interest on the map (Apple Maps only).
|
|
249
|
+
* When false, hides all POIs regardless of poiFilter.
|
|
250
|
+
* @default true
|
|
251
|
+
* @platform ios
|
|
252
|
+
*/
|
|
253
|
+
poiEnabled?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Filter POI categories to show or hide (Apple Maps only).
|
|
256
|
+
* Only takes effect when poiEnabled is true.
|
|
257
|
+
* @platform ios
|
|
258
|
+
*/
|
|
259
|
+
poiFilter?: PoiFilter;
|
|
124
260
|
/**
|
|
125
261
|
* Map color theme
|
|
126
262
|
* @default 'system'
|
|
127
263
|
*/
|
|
128
264
|
theme?: MapTheme;
|
|
265
|
+
/**
|
|
266
|
+
* Safe area inset adjustment behavior
|
|
267
|
+
* @default 'never'
|
|
268
|
+
*/
|
|
269
|
+
insetAdjustment?: InsetAdjustment;
|
|
129
270
|
/**
|
|
130
271
|
* Called when the map is pressed
|
|
131
272
|
*/
|