@mapcomponents/react-maplibre 0.1.53 → 0.1.56
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/CHANGELOG.md +24 -1
- package/coverage/clover.xml +89 -83
- package/coverage/coverage-final.json +3 -3
- package/coverage/lcov-report/index.html +16 -16
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCenterPosition/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +123 -36
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +15 -15
- package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +20 -2
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +42 -12
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +3 -3
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
- package/coverage/lcov-report/src/contexts/MapContext.tsx.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
- package/coverage/lcov-report/src/contexts/index.html +1 -1
- package/coverage/lcov-report/src/hooks/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useMap.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useMapState.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +1 -1
- package/coverage/lcov.info +174 -163
- package/dist/components/MlFollowGps/MlFollowGps.d.ts +26 -6
- package/dist/components/MlLayer/MlLayer.d.ts +5 -0
- package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +9 -0
- package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +1 -0
- package/dist/index.esm.js +119 -46
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/MlFollowGps/MlFollowGps.stories.js +4 -2
- package/src/components/MlFollowGps/MlFollowGps.tsx +53 -24
- package/src/components/MlLayer/MlLayer.tsx +6 -0
- package/src/components/MlNavigationTools/MlNavigationTools.stories.js +6 -0
- package/src/components/MlNavigationTools/MlNavigationTools.tsx +19 -9
- package/src/decorators/MapContextDecorator.js +5 -4
- package/src/decorators/MultiMapContextDecorator.js +54 -55
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SxProps } from "@mui/material";
|
|
1
2
|
interface MlNavigationToolsProps {
|
|
2
3
|
/**
|
|
3
4
|
* Id of the target MapLibre instance in mapContext
|
|
@@ -28,6 +29,10 @@ interface MlNavigationToolsProps {
|
|
|
28
29
|
* Additional JSX Elements to be rendered below MlNavigationTools buttons
|
|
29
30
|
*/
|
|
30
31
|
children?: JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Style attribute for NavigationTools container
|
|
34
|
+
*/
|
|
35
|
+
sx?: SxProps;
|
|
31
36
|
}
|
|
32
37
|
/**
|
|
33
38
|
* @component
|
|
@@ -40,6 +45,10 @@ declare const MlNavigationTools: {
|
|
|
40
45
|
showFollowGpsButton: boolean;
|
|
41
46
|
showCenterLocationButton: boolean;
|
|
42
47
|
showZoomButtons: boolean;
|
|
48
|
+
sx: {
|
|
49
|
+
right: string;
|
|
50
|
+
bottom: string;
|
|
51
|
+
};
|
|
43
52
|
};
|
|
44
53
|
};
|
|
45
54
|
export default MlNavigationTools;
|
|
@@ -2,6 +2,7 @@ export default storyoptions;
|
|
|
2
2
|
export const DefaultConfig: any;
|
|
3
3
|
export const No3DButton: any;
|
|
4
4
|
export const ShowCenterLocationButton: any;
|
|
5
|
+
export const AlterToolPosition: any;
|
|
5
6
|
export const NoZoomButtons: any;
|
|
6
7
|
export const NoFollowGpsButton: any;
|
|
7
8
|
export const CustomButton: any;
|
package/dist/index.esm.js
CHANGED
|
@@ -4414,7 +4414,7 @@ function getModalUtilityClass(slot) {
|
|
|
4414
4414
|
}
|
|
4415
4415
|
generateUtilityClasses('MuiModal', ['root', 'hidden']);
|
|
4416
4416
|
|
|
4417
|
-
const _excluded$
|
|
4417
|
+
const _excluded$s = ["BackdropComponent", "BackdropProps", "children", "classes", "className", "closeAfterTransition", "component", "components", "componentsProps", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "theme", "onTransitionEnter", "onTransitionExited"];
|
|
4418
4418
|
|
|
4419
4419
|
const useUtilityClasses$e = ownerState => {
|
|
4420
4420
|
const {
|
|
@@ -4486,7 +4486,7 @@ const ModalUnstyled = /*#__PURE__*/React.forwardRef(function ModalUnstyled(props
|
|
|
4486
4486
|
onTransitionEnter,
|
|
4487
4487
|
onTransitionExited
|
|
4488
4488
|
} = props,
|
|
4489
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
4489
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$s);
|
|
4490
4490
|
|
|
4491
4491
|
const [exited, setExited] = React.useState(true);
|
|
4492
4492
|
const modal = React.useRef({});
|
|
@@ -5688,7 +5688,7 @@ const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
|
5688
5688
|
styleFunctionSx.filterProps = ['sx'];
|
|
5689
5689
|
var defaultStyleFunctionSx = styleFunctionSx;
|
|
5690
5690
|
|
|
5691
|
-
const _excluded$
|
|
5691
|
+
const _excluded$r = ["sx"];
|
|
5692
5692
|
|
|
5693
5693
|
const splitProps = props => {
|
|
5694
5694
|
const result = {
|
|
@@ -5709,7 +5709,7 @@ function extendSxProp(props) {
|
|
|
5709
5709
|
const {
|
|
5710
5710
|
sx: inSx
|
|
5711
5711
|
} = props,
|
|
5712
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
5712
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$r);
|
|
5713
5713
|
|
|
5714
5714
|
const {
|
|
5715
5715
|
systemProps,
|
|
@@ -5738,7 +5738,7 @@ function extendSxProp(props) {
|
|
|
5738
5738
|
});
|
|
5739
5739
|
}
|
|
5740
5740
|
|
|
5741
|
-
const _excluded$
|
|
5741
|
+
const _excluded$q = ["values", "unit", "step"];
|
|
5742
5742
|
|
|
5743
5743
|
const sortBreakpointsValues = values => {
|
|
5744
5744
|
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
@@ -5774,7 +5774,7 @@ function createBreakpoints(breakpoints) {
|
|
|
5774
5774
|
unit = 'px',
|
|
5775
5775
|
step = 5
|
|
5776
5776
|
} = breakpoints,
|
|
5777
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$
|
|
5777
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$q);
|
|
5778
5778
|
|
|
5779
5779
|
const sortedValues = sortBreakpointsValues(values);
|
|
5780
5780
|
const keys = Object.keys(sortedValues);
|
|
@@ -5866,7 +5866,7 @@ function createSpacing(spacingInput = 8) {
|
|
|
5866
5866
|
return spacing;
|
|
5867
5867
|
}
|
|
5868
5868
|
|
|
5869
|
-
const _excluded$
|
|
5869
|
+
const _excluded$p = ["breakpoints", "palette", "spacing", "shape"];
|
|
5870
5870
|
|
|
5871
5871
|
function createTheme$1(options = {}, ...args) {
|
|
5872
5872
|
const {
|
|
@@ -5875,7 +5875,7 @@ function createTheme$1(options = {}, ...args) {
|
|
|
5875
5875
|
spacing: spacingInput,
|
|
5876
5876
|
shape: shapeInput = {}
|
|
5877
5877
|
} = options,
|
|
5878
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
5878
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$p);
|
|
5879
5879
|
|
|
5880
5880
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
5881
5881
|
const spacing = createSpacing(spacingInput);
|
|
@@ -5928,6 +5928,59 @@ function useTheme$1(defaultTheme = systemDefaultTheme$1) {
|
|
|
5928
5928
|
return useTheme$2(defaultTheme);
|
|
5929
5929
|
}
|
|
5930
5930
|
|
|
5931
|
+
const _excluded$o = ["className", "component"];
|
|
5932
|
+
function createBox(options = {}) {
|
|
5933
|
+
const {
|
|
5934
|
+
defaultTheme,
|
|
5935
|
+
defaultClassName = 'MuiBox-root',
|
|
5936
|
+
generateClassName,
|
|
5937
|
+
styleFunctionSx = defaultStyleFunctionSx
|
|
5938
|
+
} = options;
|
|
5939
|
+
const BoxRoot = styled$2('div')(styleFunctionSx);
|
|
5940
|
+
const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
|
|
5941
|
+
const theme = useTheme$1(defaultTheme);
|
|
5942
|
+
|
|
5943
|
+
const _extendSxProp = extendSxProp(inProps),
|
|
5944
|
+
{
|
|
5945
|
+
className,
|
|
5946
|
+
component = 'div'
|
|
5947
|
+
} = _extendSxProp,
|
|
5948
|
+
other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$o);
|
|
5949
|
+
|
|
5950
|
+
return /*#__PURE__*/jsxRuntime.exports.jsx(BoxRoot, _extends$3({
|
|
5951
|
+
as: component,
|
|
5952
|
+
ref: ref,
|
|
5953
|
+
className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
|
5954
|
+
theme: theme
|
|
5955
|
+
}, other));
|
|
5956
|
+
});
|
|
5957
|
+
process.env.NODE_ENV !== "production" ? Box.propTypes
|
|
5958
|
+
/* remove-proptypes */
|
|
5959
|
+
= {
|
|
5960
|
+
// ----------------------------- Warning --------------------------------
|
|
5961
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
5962
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
5963
|
+
// ----------------------------------------------------------------------
|
|
5964
|
+
|
|
5965
|
+
/**
|
|
5966
|
+
* @ignore
|
|
5967
|
+
*/
|
|
5968
|
+
children: PropTypes.node,
|
|
5969
|
+
|
|
5970
|
+
/**
|
|
5971
|
+
* The component used for the root node.
|
|
5972
|
+
* Either a string to use a HTML element or a component.
|
|
5973
|
+
*/
|
|
5974
|
+
component: PropTypes.elementType,
|
|
5975
|
+
|
|
5976
|
+
/**
|
|
5977
|
+
* @ignore
|
|
5978
|
+
*/
|
|
5979
|
+
sx: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.func])
|
|
5980
|
+
} : void 0;
|
|
5981
|
+
return Box;
|
|
5982
|
+
}
|
|
5983
|
+
|
|
5931
5984
|
const _excluded$n = ["variant"];
|
|
5932
5985
|
|
|
5933
5986
|
function isEmpty$1(string) {
|
|
@@ -7199,8 +7252,8 @@ function createTheme(options = {}, ...args) {
|
|
|
7199
7252
|
return muiTheme;
|
|
7200
7253
|
}
|
|
7201
7254
|
|
|
7202
|
-
const defaultTheme = createTheme();
|
|
7203
|
-
var defaultTheme$
|
|
7255
|
+
const defaultTheme$1 = createTheme();
|
|
7256
|
+
var defaultTheme$2 = defaultTheme$1;
|
|
7204
7257
|
|
|
7205
7258
|
function useThemeProps({
|
|
7206
7259
|
props,
|
|
@@ -7209,13 +7262,13 @@ function useThemeProps({
|
|
|
7209
7262
|
return useThemeProps$1({
|
|
7210
7263
|
props,
|
|
7211
7264
|
name,
|
|
7212
|
-
defaultTheme: defaultTheme$
|
|
7265
|
+
defaultTheme: defaultTheme$2
|
|
7213
7266
|
});
|
|
7214
7267
|
}
|
|
7215
7268
|
|
|
7216
7269
|
const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
|
|
7217
7270
|
const styled = createStyled({
|
|
7218
|
-
defaultTheme: defaultTheme$
|
|
7271
|
+
defaultTheme: defaultTheme$2,
|
|
7219
7272
|
rootShouldForwardProp
|
|
7220
7273
|
});
|
|
7221
7274
|
var styled$1 = styled;
|
|
@@ -12492,15 +12545,24 @@ var MlFollowGps = function (props) {
|
|
|
12492
12545
|
var _e = useState(false), locationAccessDenied = _e[0], setLocationAccessDenied = _e[1];
|
|
12493
12546
|
var _f = useState(), accuracyGeoJson = _f[0], setAccuracyGeoJson = _f[1];
|
|
12494
12547
|
var _g = useState(0), deviceOrientation = _g[0], setDeviceOrientation = _g[1];
|
|
12548
|
+
var initiallyCentered = useRef(false);
|
|
12495
12549
|
var getLocationSuccess = useCallback(function (pos) {
|
|
12496
12550
|
if (!mapHook.map)
|
|
12497
12551
|
return;
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12552
|
+
if ((!props.centerUserPosition && !initiallyCentered.current) || props.centerUserPosition) {
|
|
12553
|
+
if (props.useFlyTo) {
|
|
12554
|
+
mapHook.map.map.flyTo({
|
|
12555
|
+
center: [pos.coords.longitude, pos.coords.latitude],
|
|
12556
|
+
zoom: 18,
|
|
12557
|
+
speed: 1,
|
|
12558
|
+
curve: 1,
|
|
12559
|
+
});
|
|
12560
|
+
}
|
|
12561
|
+
else {
|
|
12562
|
+
mapHook.map.map.setCenter([pos.coords.longitude, pos.coords.latitude]);
|
|
12563
|
+
}
|
|
12564
|
+
initiallyCentered.current = true;
|
|
12565
|
+
}
|
|
12504
12566
|
if (!props.showUserLocation)
|
|
12505
12567
|
return;
|
|
12506
12568
|
var geoJsonPoint = point([pos.coords.longitude, pos.coords.latitude]);
|
|
@@ -12536,6 +12598,9 @@ var MlFollowGps = function (props) {
|
|
|
12536
12598
|
window.removeEventListener("deviceorientation", _handleOrientation_1);
|
|
12537
12599
|
};
|
|
12538
12600
|
}
|
|
12601
|
+
else {
|
|
12602
|
+
initiallyCentered.current = false;
|
|
12603
|
+
}
|
|
12539
12604
|
return;
|
|
12540
12605
|
}, [isFollowed]);
|
|
12541
12606
|
useEffect(function () {
|
|
@@ -12551,22 +12616,18 @@ var MlFollowGps = function (props) {
|
|
|
12551
12616
|
}, [mapHook.map, isFollowed, getLocationSuccess]);
|
|
12552
12617
|
return (React__default.createElement(React__default.Fragment, null,
|
|
12553
12618
|
isFollowed && userLocationGeoJson && (React__default.createElement(MlGeoJsonLayer, { geojson: accuracyGeoJson, type: "fill", paint: __assign({ "fill-color": "#cbd300", "fill-opacity": 0.3 }, props.accuracyPaint), insertBeforeLayer: props.insertBeforeLayer })),
|
|
12554
|
-
isFollowed && orientationCone && (React__default.createElement(MlGeoJsonLayer, { geojson: orientationCone, type: "fill", paint: {
|
|
12555
|
-
"fill-color": "#0000ff",
|
|
12556
|
-
"fill-antialias": false,
|
|
12557
|
-
"fill-opacity": 0.3,
|
|
12558
|
-
}, insertBeforeLayer: props.insertBeforeLayer })),
|
|
12619
|
+
isFollowed && orientationCone && (React__default.createElement(MlGeoJsonLayer, { geojson: orientationCone, type: "fill", paint: __assign({ "fill-color": "#0000ff", "fill-antialias": false, "fill-opacity": 0.3 }, props.orientationConePaint), insertBeforeLayer: props.insertBeforeLayer })),
|
|
12559
12620
|
isFollowed && userLocationGeoJson && (React__default.createElement(MlGeoJsonLayer, { geojson: userLocationGeoJson, type: "circle", paint: __assign({ "circle-color": "#009ee0", "circle-radius": 5, "circle-stroke-color": "#fafaff", "circle-stroke-width": 1 }, props.circlePaint), insertBeforeLayer: props.insertBeforeLayer })),
|
|
12560
|
-
React__default.createElement(Button$2, { sx: __assign({ zIndex: 1002, color: isFollowed ? props.onColor : props.offColor }, props.
|
|
12621
|
+
React__default.createElement(Button$2, { sx: __assign({ zIndex: 1002, color: isFollowed ? props.onColor : props.offColor }, props.buttonSx), disabled: locationAccessDenied, onClick: function () {
|
|
12561
12622
|
setIsFollowed(!isFollowed);
|
|
12562
12623
|
} },
|
|
12563
12624
|
" ",
|
|
12564
|
-
React__default.createElement(default_1$4, { sx: __assign({}, (((_a = props.
|
|
12625
|
+
React__default.createElement(default_1$4, { sx: __assign({}, (((_a = props.buttonSx) === null || _a === void 0 ? void 0 : _a.fontSize) ? { fontSize: (_b = props.buttonSx) === null || _b === void 0 ? void 0 : _b.fontSize } : {})) }),
|
|
12565
12626
|
" ")));
|
|
12566
12627
|
};
|
|
12567
12628
|
MlFollowGps.defaultProps = {
|
|
12568
12629
|
mapId: undefined,
|
|
12569
|
-
|
|
12630
|
+
buttonSx: {
|
|
12570
12631
|
minWidth: "30px",
|
|
12571
12632
|
minHeight: "30px",
|
|
12572
12633
|
width: "30px",
|
|
@@ -12585,6 +12646,8 @@ MlFollowGps.defaultProps = {
|
|
|
12585
12646
|
showAccuracyCircle: true,
|
|
12586
12647
|
showUserLocation: true,
|
|
12587
12648
|
showOrientation: true,
|
|
12649
|
+
centerUserPosition: true,
|
|
12650
|
+
useFlyTo: false,
|
|
12588
12651
|
};
|
|
12589
12652
|
|
|
12590
12653
|
var MlImageMarkerLayer = function (props) {
|
|
@@ -13041,6 +13104,29 @@ var _default$2 = (0, _createSvgIcon$2.default)( /*#__PURE__*/(0, _jsxRuntime$2.j
|
|
|
13041
13104
|
|
|
13042
13105
|
default_1$2 = RemoveCircleOutline.default = _default$2;
|
|
13043
13106
|
|
|
13107
|
+
function useTheme() {
|
|
13108
|
+
const theme = useTheme$1(defaultTheme$2);
|
|
13109
|
+
|
|
13110
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13111
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
13112
|
+
React.useDebugValue(theme);
|
|
13113
|
+
}
|
|
13114
|
+
|
|
13115
|
+
return theme;
|
|
13116
|
+
}
|
|
13117
|
+
|
|
13118
|
+
const defaultTheme = createTheme();
|
|
13119
|
+
/**
|
|
13120
|
+
* @ignore - do not document.
|
|
13121
|
+
*/
|
|
13122
|
+
|
|
13123
|
+
const Box = createBox({
|
|
13124
|
+
defaultTheme,
|
|
13125
|
+
defaultClassName: 'MuiBox-root',
|
|
13126
|
+
generateClassName: ClassNameGenerator$1.generate
|
|
13127
|
+
});
|
|
13128
|
+
var Box$1 = Box;
|
|
13129
|
+
|
|
13044
13130
|
function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
13045
13131
|
|
|
13046
13132
|
var SvgRotateRight = function SvgRotateRight(props) {
|
|
@@ -13424,14 +13510,7 @@ var MlNavigationTools = function (props) {
|
|
|
13424
13510
|
}
|
|
13425
13511
|
mapHook.map.map.easeTo({ pitch: targetPitch });
|
|
13426
13512
|
};
|
|
13427
|
-
return (React__default.createElement("
|
|
13428
|
-
zIndex: 501,
|
|
13429
|
-
position: "absolute",
|
|
13430
|
-
right: mediaIsMobile ? "15px" : "5px",
|
|
13431
|
-
bottom: mediaIsMobile ? "40px" : "20px",
|
|
13432
|
-
display: "flex",
|
|
13433
|
-
flexDirection: "column",
|
|
13434
|
-
} },
|
|
13513
|
+
return (React__default.createElement(Box$1, { sx: __assign(__assign({ zIndex: 501, position: "absolute", display: "flex", flexDirection: "column" }, (mediaIsMobile ? { margin: "20px 10px 20px 10px" } : {})), props.sx) },
|
|
13435
13514
|
React__default.createElement(MlNavigationCompass, { style: {
|
|
13436
13515
|
width: "31px",
|
|
13437
13516
|
position: "relative",
|
|
@@ -13442,7 +13521,7 @@ var MlNavigationTools = function (props) {
|
|
|
13442
13521
|
boxShadow: "0px 0px 18px rgba(0,0,0,.5)",
|
|
13443
13522
|
} }),
|
|
13444
13523
|
props.show3DButton && (React__default.createElement(Button$1, { sx: __assign(__assign({}, buttonStyle), { fontSize: mediaIsMobile ? "1.4em" : "1em", fontWeight: 600 }), onClick: adjustPitch }, pitch ? "2D" : "3D")),
|
|
13445
|
-
props.showFollowGpsButton && (React__default.createElement(MlFollowGps, {
|
|
13524
|
+
props.showFollowGpsButton && (React__default.createElement(MlFollowGps, { buttonSx: __assign({}, (function (_a) {
|
|
13446
13525
|
_a.color; var rest = __rest(_a, ["color"]);
|
|
13447
13526
|
return rest;
|
|
13448
13527
|
})(buttonStyle)) })),
|
|
@@ -13471,6 +13550,10 @@ MlNavigationTools.defaultProps = {
|
|
|
13471
13550
|
showFollowGpsButton: true,
|
|
13472
13551
|
showCenterLocationButton: false,
|
|
13473
13552
|
showZoomButtons: true,
|
|
13553
|
+
sx: {
|
|
13554
|
+
right: "5px",
|
|
13555
|
+
bottom: "20px",
|
|
13556
|
+
},
|
|
13474
13557
|
};
|
|
13475
13558
|
|
|
13476
13559
|
/**
|
|
@@ -13483,6 +13566,7 @@ var MlLayer = function (props) {
|
|
|
13483
13566
|
idPrefix: 'MlLayer-',
|
|
13484
13567
|
layerId: props.layerId,
|
|
13485
13568
|
mapId: props.mapId,
|
|
13569
|
+
geojson: props.geojson,
|
|
13486
13570
|
options: __assign({ type: "background", paint: {
|
|
13487
13571
|
"background-color": "rgba(0,0,0,0)",
|
|
13488
13572
|
} }, props.options),
|
|
@@ -14307,17 +14391,6 @@ var MlTransitionGeoJsonLayer = function (props) {
|
|
|
14307
14391
|
React__default.createElement(MlGeoJsonLayer, __assign({}, restProps, { geojson: displayGeojson }))));
|
|
14308
14392
|
};
|
|
14309
14393
|
|
|
14310
|
-
function useTheme() {
|
|
14311
|
-
const theme = useTheme$1(defaultTheme$1);
|
|
14312
|
-
|
|
14313
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
14314
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14315
|
-
React.useDebugValue(theme);
|
|
14316
|
-
}
|
|
14317
|
-
|
|
14318
|
-
return theme;
|
|
14319
|
-
}
|
|
14320
|
-
|
|
14321
14394
|
function getPaperUtilityClass(slot) {
|
|
14322
14395
|
return generateUtilityClass('MuiPaper', slot);
|
|
14323
14396
|
}
|