@open-pioneer/map-navigation 0.11.0 → 0.12.0-dev.20250905090001
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 +23 -1
- package/History.js +5 -5
- package/History.js.map +1 -1
- package/InitialExtent.js +5 -5
- package/InitialExtent.js.map +1 -1
- package/ViewHistoryModel.d.ts +1 -1
- package/ViewHistoryModel.js +0 -3
- package/ViewHistoryModel.js.map +1 -1
- package/Zoom.js +10 -10
- package/Zoom.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @open-pioneer/map-navigation
|
|
2
2
|
|
|
3
|
+
## 0.12.0-dev.20250905090001
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2732052: Icons have been changed to unify the appearance of the components. Preferably, Lucide react-icons are used.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 10d2fe7: Update dependencies
|
|
12
|
+
- da6a410: Update dependencies
|
|
13
|
+
- Updated dependencies [29a10df]
|
|
14
|
+
- Updated dependencies [10d2fe7]
|
|
15
|
+
- Updated dependencies [2702df4]
|
|
16
|
+
- Updated dependencies [12561fe]
|
|
17
|
+
- Updated dependencies [5df900f]
|
|
18
|
+
- Updated dependencies [8986b3b]
|
|
19
|
+
- Updated dependencies [aeb9000]
|
|
20
|
+
- Updated dependencies [5df900f]
|
|
21
|
+
- Updated dependencies [f1f69f2]
|
|
22
|
+
- Updated dependencies [da6a410]
|
|
23
|
+
- @open-pioneer/map@0.12.0-dev.20250905090001
|
|
24
|
+
- @open-pioneer/map-ui-components@0.12.0-dev.20250905090001
|
|
25
|
+
|
|
3
26
|
## 0.11.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -94,7 +117,6 @@
|
|
|
94
117
|
### Minor Changes
|
|
95
118
|
|
|
96
119
|
- 2fa8020: Update trails core package dependencies.
|
|
97
|
-
|
|
98
120
|
- Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
|
|
99
121
|
- Removes any obsolete references to `@chakra-ui/system`.
|
|
100
122
|
This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
|
package/History.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useMapModelValue } from '@open-pioneer/map';
|
|
3
3
|
import { ToolButton } from '@open-pioneer/map-ui-components';
|
|
4
4
|
import { useCommonComponentProps } from '@open-pioneer/react-utils';
|
|
5
5
|
import { useReactiveSnapshot } from '@open-pioneer/reactivity';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useIntl } from './_virtual/_virtual-pioneer-module_react-hooks.js';
|
|
8
|
-
import {
|
|
8
|
+
import { LuCornerUpLeft, LuCornerUpRight } from 'react-icons/lu';
|
|
9
9
|
import { useHistoryViewModel } from './ViewHistoryModel.js';
|
|
10
10
|
|
|
11
11
|
const HistoryForward = function HistoryForward2(props) {
|
|
@@ -17,7 +17,7 @@ const HistoryBackward = function HistoryBackward2(props) {
|
|
|
17
17
|
const History = function History2(props) {
|
|
18
18
|
const intl = useIntl();
|
|
19
19
|
const { buttonProps, viewDirection, ref } = props;
|
|
20
|
-
const
|
|
20
|
+
const map = useMapModelValue(props);
|
|
21
21
|
const viewModel = useHistoryViewModel(map);
|
|
22
22
|
const { defaultClassName, buttonLabel, buttonIcon } = getDirectionProps(intl, viewDirection);
|
|
23
23
|
const { containerProps } = useCommonComponentProps(classNames("view", defaultClassName), props);
|
|
@@ -60,13 +60,13 @@ function getDirectionProps(intl, viewDirection) {
|
|
|
60
60
|
return {
|
|
61
61
|
defaultClassName: "view-forward",
|
|
62
62
|
buttonLabel: intl.formatMessage({ id: "view-forward.title" }),
|
|
63
|
-
buttonIcon: /* @__PURE__ */ jsx(
|
|
63
|
+
buttonIcon: /* @__PURE__ */ jsx(LuCornerUpRight, {})
|
|
64
64
|
};
|
|
65
65
|
case "backward":
|
|
66
66
|
return {
|
|
67
67
|
defaultClassName: "view-backward",
|
|
68
68
|
buttonLabel: intl.formatMessage({ id: "view-backward.title" }),
|
|
69
|
-
buttonIcon: /* @__PURE__ */ jsx(
|
|
69
|
+
buttonIcon: /* @__PURE__ */ jsx(LuCornerUpLeft, {})
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
}
|
package/History.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"History.js","sources":["History.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from \"@chakra-ui/react\";\nimport { MapModelProps,
|
|
1
|
+
{"version":3,"file":"History.js","sources":["History.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport { ToolButton } from \"@open-pioneer/map-ui-components\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { useReactiveSnapshot } from \"@open-pioneer/reactivity\";\nimport { PackageIntl } from \"@open-pioneer/runtime\";\nimport classNames from \"classnames\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { FC, RefAttributes } from \"react\";\nimport { LuCornerUpLeft, LuCornerUpRight } from \"react-icons/lu\";\nimport { useHistoryViewModel } from \"./ViewHistoryModel\";\n\nexport type HistoryForwardProps = Omit<HistoryProps, \"viewDirection\">;\n\n/**\n * Provides a button by which the user can navigate to the next map view.\n *\n * This component composes {@link History}.\n */\nexport const HistoryForward: FC<HistoryForwardProps> = function HistoryForward(\n props: HistoryForwardProps\n) {\n return <History viewDirection=\"forward\" {...props} />;\n};\n\nexport type HistoryBackwardProps = HistoryForwardProps;\n\n/**\n * Provides a button by which the user can navigate to the previous map view.\n *\n * This component composes {@link History}.\n */\nexport const HistoryBackward: FC<HistoryBackwardProps> = function HistoryBackward(\n props: HistoryBackwardProps\n) {\n return <History viewDirection=\"backward\" {...props} />;\n};\n\nexport interface HistoryProps\n extends CommonComponentProps,\n RefAttributes<HTMLButtonElement>,\n MapModelProps {\n /**\n * Additional properties for the `Button` element.\n *\n * Note that the ToolButton also defines some of these props.\n */\n buttonProps?: Partial<ButtonProps>;\n\n /**\n * The view direction.\n *\n * The button will either view forward or view backward depending on this value.\n */\n viewDirection: \"forward\" | \"backward\";\n}\n\n/**\n * Provides a button by which the user can navigate forward or backward in the view history of the map.\n */\nexport const History: FC<HistoryProps> = function History(props: HistoryProps) {\n const intl = useIntl();\n const { buttonProps, viewDirection, ref } = props;\n const map = useMapModelValue(props);\n const viewModel = useHistoryViewModel(map);\n const { defaultClassName, buttonLabel, buttonIcon } = getDirectionProps(intl, viewDirection);\n const { containerProps } = useCommonComponentProps(classNames(\"view\", defaultClassName), props);\n\n const canNavigate = useReactiveSnapshot(() => {\n if (!viewModel) {\n return false;\n }\n\n if (viewDirection === \"forward\") {\n return viewModel.canForward;\n } else {\n return viewModel.canBackward;\n }\n }, [viewModel, viewDirection]);\n const navigate = () => {\n if (!viewModel) {\n return;\n }\n\n if (viewDirection === \"forward\") {\n viewModel.forward();\n } else {\n viewModel.backward();\n }\n };\n\n return (\n viewModel && (\n <ToolButton\n ref={ref}\n {...containerProps}\n buttonProps={buttonProps}\n label={buttonLabel}\n icon={buttonIcon}\n onClick={navigate}\n disabled={!canNavigate}\n />\n )\n );\n};\n\nfunction getDirectionProps(intl: PackageIntl, viewDirection: \"forward\" | \"backward\") {\n switch (viewDirection) {\n case \"forward\":\n return {\n defaultClassName: \"view-forward\",\n buttonLabel: intl.formatMessage({ id: \"view-forward.title\" }),\n buttonIcon: <LuCornerUpRight />\n };\n case \"backward\":\n return {\n defaultClassName: \"view-backward\",\n buttonLabel: intl.formatMessage({ id: \"view-backward.title\" }),\n buttonIcon: <LuCornerUpLeft />\n };\n }\n}\n"],"names":["HistoryForward","HistoryBackward","History"],"mappings":";;;;;;;;;;AAqBO,MAAM,cAAA,GAA0C,SAASA,eAAAA,CAC5D,KAAA,EACF;AACE,EAAA,uBAAO,GAAA,CAAC,OAAA,EAAA,EAAQ,aAAA,EAAc,SAAA,EAAW,GAAG,KAAA,EAAO,CAAA;AACvD;AASO,MAAM,eAAA,GAA4C,SAASC,gBAAAA,CAC9D,KAAA,EACF;AACE,EAAA,uBAAO,GAAA,CAAC,OAAA,EAAA,EAAQ,aAAA,EAAc,UAAA,EAAY,GAAG,KAAA,EAAO,CAAA;AACxD;AAwBO,MAAM,OAAA,GAA4B,SAASC,QAAAA,CAAQ,KAAA,EAAqB;AAC3E,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,EAAE,WAAA,EAAa,aAAA,EAAe,GAAA,EAAI,GAAI,KAAA;AAC5C,EAAA,MAAM,GAAA,GAAM,iBAAiB,KAAK,CAAA;AAClC,EAAA,MAAM,SAAA,GAAY,oBAAoB,GAAG,CAAA;AACzC,EAAA,MAAM,EAAE,gBAAA,EAAkB,WAAA,EAAa,YAAW,GAAI,iBAAA,CAAkB,MAAM,aAAa,CAAA;AAC3F,EAAA,MAAM,EAAE,gBAAe,GAAI,uBAAA,CAAwB,WAAW,MAAA,EAAQ,gBAAgB,GAAG,KAAK,CAAA;AAE9F,EAAA,MAAM,WAAA,GAAc,oBAAoB,MAAM;AAC1C,IAAA,IAAI,CAAC,SAAA,EAAW;AACZ,MAAA,OAAO,KAAA;AAAA,IACX;AAEA,IAAA,IAAI,kBAAkB,SAAA,EAAW;AAC7B,MAAA,OAAO,SAAA,CAAU,UAAA;AAAA,IACrB,CAAA,MAAO;AACH,MAAA,OAAO,SAAA,CAAU,WAAA;AAAA,IACrB;AAAA,EACJ,CAAA,EAAG,CAAC,SAAA,EAAW,aAAa,CAAC,CAAA;AAC7B,EAAA,MAAM,WAAW,MAAM;AACnB,IAAA,IAAI,CAAC,SAAA,EAAW;AACZ,MAAA;AAAA,IACJ;AAEA,IAAA,IAAI,kBAAkB,SAAA,EAAW;AAC7B,MAAA,SAAA,CAAU,OAAA,EAAQ;AAAA,IACtB,CAAA,MAAO;AACH,MAAA,SAAA,CAAU,QAAA,EAAS;AAAA,IACvB;AAAA,EACJ,CAAA;AAEA,EAAA,OACI,SAAA,oBACI,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACG,GAAA;AAAA,MACC,GAAG,cAAA;AAAA,MACJ,WAAA;AAAA,MACA,KAAA,EAAO,WAAA;AAAA,MACP,IAAA,EAAM,UAAA;AAAA,MACN,OAAA,EAAS,QAAA;AAAA,MACT,UAAU,CAAC;AAAA;AAAA,GACf;AAGZ;AAEA,SAAS,iBAAA,CAAkB,MAAmB,aAAA,EAAuC;AACjF,EAAA,QAAQ,aAAA;AAAe,IACnB,KAAK,SAAA;AACD,MAAA,OAAO;AAAA,QACH,gBAAA,EAAkB,cAAA;AAAA,QAClB,aAAa,IAAA,CAAK,aAAA,CAAc,EAAE,EAAA,EAAI,sBAAsB,CAAA;AAAA,QAC5D,UAAA,sBAAa,eAAA,EAAA,EAAgB;AAAA,OACjC;AAAA,IACJ,KAAK,UAAA;AACD,MAAA,OAAO;AAAA,QACH,gBAAA,EAAkB,eAAA;AAAA,QAClB,aAAa,IAAA,CAAK,aAAA,CAAc,EAAE,EAAA,EAAI,uBAAuB,CAAA;AAAA,QAC7D,UAAA,sBAAa,cAAA,EAAA,EAAe;AAAA,OAChC;AAAA;AAEZ;;;;"}
|
package/InitialExtent.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useMapModelValue } from '@open-pioneer/map';
|
|
3
3
|
import { ToolButton } from '@open-pioneer/map-ui-components';
|
|
4
4
|
import { useCommonComponentProps } from '@open-pioneer/react-utils';
|
|
5
5
|
import { useIntl } from './_virtual/_virtual-pioneer-module_react-hooks.js';
|
|
6
|
-
import {
|
|
6
|
+
import { LuHouse } from 'react-icons/lu';
|
|
7
7
|
|
|
8
8
|
const InitialExtent = function InitialExtent2(props) {
|
|
9
9
|
const { containerProps } = useCommonComponentProps("initial-extent", props);
|
|
10
|
-
const
|
|
10
|
+
const map = useMapModelValue(props);
|
|
11
11
|
const intl = useIntl();
|
|
12
12
|
const { buttonProps, ref } = props;
|
|
13
13
|
function setInitExtent() {
|
|
14
|
-
const initialExtent = map
|
|
14
|
+
const initialExtent = map.initialExtent;
|
|
15
15
|
if (initialExtent) {
|
|
16
16
|
const newExtent = [
|
|
17
17
|
initialExtent.xMin,
|
|
@@ -28,7 +28,7 @@ const InitialExtent = function InitialExtent2(props) {
|
|
|
28
28
|
ref,
|
|
29
29
|
buttonProps,
|
|
30
30
|
label: intl.formatMessage({ id: "initial-extent.title" }),
|
|
31
|
-
icon: /* @__PURE__ */ jsx(
|
|
31
|
+
icon: /* @__PURE__ */ jsx(LuHouse, {}),
|
|
32
32
|
onClick: setInitExtent,
|
|
33
33
|
...containerProps
|
|
34
34
|
}
|
package/InitialExtent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialExtent.js","sources":["InitialExtent.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from \"@chakra-ui/react\";\nimport { MapModelProps,
|
|
1
|
+
{"version":3,"file":"InitialExtent.js","sources":["InitialExtent.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport { ToolButton } from \"@open-pioneer/map-ui-components\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { Extent } from \"ol/extent\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { FC, RefAttributes } from \"react\";\nimport { LuHouse } from \"react-icons/lu\";\n\nexport interface InitialExtentProps\n extends CommonComponentProps,\n RefAttributes<HTMLButtonElement>,\n MapModelProps {\n /**\n * Additional properties for the `Button` element.\n *\n * Note that the ToolButton also defines some of these props.\n */\n buttonProps?: Partial<ButtonProps>;\n}\n\n/**\n * Provides a simple button that switches the view to its initial viewpoint.\n */\nexport const InitialExtent: FC<InitialExtentProps> = function InitialExtent(\n props: InitialExtentProps\n) {\n const { containerProps } = useCommonComponentProps(\"initial-extent\", props);\n const map = useMapModelValue(props);\n const intl = useIntl();\n const { buttonProps, ref } = props;\n\n function setInitExtent() {\n const initialExtent = map.initialExtent;\n if (initialExtent) {\n const newExtent: Extent = [\n initialExtent.xMin,\n initialExtent.yMin,\n initialExtent.xMax,\n initialExtent.yMax\n ];\n\n map.olView.fit(newExtent, { duration: 200 });\n }\n }\n\n return (\n <ToolButton\n ref={ref}\n buttonProps={buttonProps}\n label={intl.formatMessage({ id: \"initial-extent.title\" })}\n icon={<LuHouse />}\n onClick={setInitExtent}\n {...containerProps}\n />\n );\n};\n"],"names":["InitialExtent"],"mappings":";;;;;;;AA0BO,MAAM,aAAA,GAAwC,SAASA,cAAAA,CAC1D,KAAA,EACF;AACE,EAAA,MAAM,EAAE,cAAA,EAAe,GAAI,uBAAA,CAAwB,kBAAkB,KAAK,CAAA;AAC1E,EAAA,MAAM,GAAA,GAAM,iBAAiB,KAAK,CAAA;AAClC,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,EAAE,WAAA,EAAa,GAAA,EAAI,GAAI,KAAA;AAE7B,EAAA,SAAS,aAAA,GAAgB;AACrB,IAAA,MAAM,gBAAgB,GAAA,CAAI,aAAA;AAC1B,IAAA,IAAI,aAAA,EAAe;AACf,MAAA,MAAM,SAAA,GAAoB;AAAA,QACtB,aAAA,CAAc,IAAA;AAAA,QACd,aAAA,CAAc,IAAA;AAAA,QACd,aAAA,CAAc,IAAA;AAAA,QACd,aAAA,CAAc;AAAA,OAClB;AAEA,MAAA,GAAA,CAAI,OAAO,GAAA,CAAI,SAAA,EAAW,EAAE,QAAA,EAAU,KAAK,CAAA;AAAA,IAC/C;AAAA,EACJ;AAEA,EAAA,uBACI,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACG,GAAA;AAAA,MACA,WAAA;AAAA,MACA,OAAO,IAAA,CAAK,aAAA,CAAc,EAAE,EAAA,EAAI,wBAAwB,CAAA;AAAA,MACxD,IAAA,sBAAO,OAAA,EAAA,EAAQ,CAAA;AAAA,MACf,OAAA,EAAS,aAAA;AAAA,MACR,GAAG;AAAA;AAAA,GACR;AAER;;;;"}
|
package/ViewHistoryModel.d.ts
CHANGED
|
@@ -32,5 +32,5 @@ export declare class ViewHistoryModel {
|
|
|
32
32
|
*
|
|
33
33
|
* NOTE: May be useful to have this a general solution in the future; but this is the only usage right now.
|
|
34
34
|
*/
|
|
35
|
-
export declare function useHistoryViewModel(map: MapModel
|
|
35
|
+
export declare function useHistoryViewModel(map: MapModel): ViewHistoryModel | undefined;
|
|
36
36
|
export {};
|
package/ViewHistoryModel.js
CHANGED
package/ViewHistoryModel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewHistoryModel.js","sources":["ViewHistoryModel.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { MapModel } from \"@open-pioneer/map\";\nimport { View } from \"ol\";\nimport { EventsKey } from \"ol/events\";\nimport { unByKey } from \"ol/Observable\";\nimport OlMap from \"ol/Map\";\nimport { Reactive, reactive, ReactiveMap, reactiveMap } from \"@conterra/reactivity-core\";\nimport { Coordinate } from \"ol/coordinate\";\nimport { useEffect, useState } from \"react\";\n\ninterface MapViewState {\n /** Map resolution */\n resolution: number;\n\n /** Map center */\n center: Coordinate;\n}\n\nconst SIZE_LIMIT = 200;\n\nexport class ViewHistoryModel {\n private olMap: OlMap;\n private handle: EventsKey | undefined;\n\n private _mapViews: ReactiveMap<number, MapViewState> = reactiveMap<number, MapViewState>();\n private _activeViewId: Reactive<number> = reactive(0);\n\n constructor(map: MapModel) {\n this.olMap = map.olMap;\n this.handle = this.#subscribeToMapEvents();\n }\n\n destroy() {\n this.handle && unByKey(this.handle);\n this.handle = undefined;\n }\n\n get activeViewId(): number {\n return this._activeViewId.value;\n }\n\n get mapViews(): ReactiveMap<number, MapViewState> {\n return this._mapViews;\n }\n\n get canBackward(): boolean {\n return this.mapViews.get(this.activeViewId - 1) != null;\n }\n\n get canForward(): boolean {\n return this.mapViews.get(this.activeViewId + 1) != null;\n }\n\n backward = () => {\n if (this.canBackward) {\n this.#setActiveView(this.activeViewId - 1);\n this.#goto(this.activeViewId);\n } else throw new Error(\"Backward is not possible at the moment\");\n };\n\n forward = () => {\n if (this.canForward) {\n this.#setActiveView(this.activeViewId + 1);\n this.#goto(this.activeViewId);\n } else throw new Error(\"Forward is not possible at the moment\");\n };\n\n #goto(activeViewId: number) {\n const view = this.olMap.getView();\n this.olMap.setView(\n new View({\n center: this.mapViews.get(activeViewId)!.center,\n resolution: this.mapViews.get(activeViewId)!.resolution,\n projection: view.getProjection()\n })\n );\n }\n\n #setActiveView(activeViewId: number) {\n this._activeViewId.value = activeViewId;\n }\n\n #subscribeToMapEvents() {\n const eventsKey: EventsKey = this.olMap.on(\"moveend\", () => {\n onCenterResChange();\n });\n\n const onCenterResChange = () => {\n const olMap = this.olMap;\n const mapViews = this.mapViews;\n const view = olMap.getView();\n const resolution = view.getResolution();\n const center = view.getCenter();\n if (resolution != null && center != null) {\n if (\n center !== mapViews.get(this.activeViewId)?.center ||\n resolution !== mapViews.get(this.activeViewId)?.resolution\n ) {\n const mapState = {\n resolution: resolution,\n center: center\n };\n const nextViewId = this.activeViewId + 1;\n\n // Remove keys in the \"future\". Note: an array would probably be more efficient.\n for (const k of mapViews.keys()) {\n if (k > nextViewId) {\n mapViews.delete(k);\n }\n }\n\n // Remove old keys above limit (maps are sorted by insertion order, so this removes the oldest entries)\n for (const k of mapViews.keys()) {\n if (mapViews.size < SIZE_LIMIT) {\n break;\n }\n mapViews.delete(k);\n }\n\n this.#setActiveView(nextViewId);\n mapViews.set(nextViewId, mapState);\n }\n }\n };\n\n return eventsKey;\n }\n}\n\ninterface ViewModelState {\n vm: ViewHistoryModel;\n useCount: number; // 0 -> must destroy\n}\n\nconst VIEW_MODELS = new WeakMap<MapModel, ViewModelState>();\n\n/**\n * An internal hook that returns a shared HistoryViewModel.\n * History tools that are active at the same time share a single model.\n *\n * The model is destroyed when the last tool is unmounted.\n *\n * TODO: `undefined` only because the map can be undefined at the moment (loading).\n *\n * NOTE: May be useful to have this a general solution in the future; but this is the only usage right now.\n */\nexport function useHistoryViewModel(map: MapModel
|
|
1
|
+
{"version":3,"file":"ViewHistoryModel.js","sources":["ViewHistoryModel.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { MapModel } from \"@open-pioneer/map\";\nimport { View } from \"ol\";\nimport { EventsKey } from \"ol/events\";\nimport { unByKey } from \"ol/Observable\";\nimport OlMap from \"ol/Map\";\nimport { Reactive, reactive, ReactiveMap, reactiveMap } from \"@conterra/reactivity-core\";\nimport { Coordinate } from \"ol/coordinate\";\nimport { useEffect, useState } from \"react\";\n\ninterface MapViewState {\n /** Map resolution */\n resolution: number;\n\n /** Map center */\n center: Coordinate;\n}\n\nconst SIZE_LIMIT = 200;\n\nexport class ViewHistoryModel {\n private olMap: OlMap;\n private handle: EventsKey | undefined;\n\n private _mapViews: ReactiveMap<number, MapViewState> = reactiveMap<number, MapViewState>();\n private _activeViewId: Reactive<number> = reactive(0);\n\n constructor(map: MapModel) {\n this.olMap = map.olMap;\n this.handle = this.#subscribeToMapEvents();\n }\n\n destroy() {\n this.handle && unByKey(this.handle);\n this.handle = undefined;\n }\n\n get activeViewId(): number {\n return this._activeViewId.value;\n }\n\n get mapViews(): ReactiveMap<number, MapViewState> {\n return this._mapViews;\n }\n\n get canBackward(): boolean {\n return this.mapViews.get(this.activeViewId - 1) != null;\n }\n\n get canForward(): boolean {\n return this.mapViews.get(this.activeViewId + 1) != null;\n }\n\n backward = () => {\n if (this.canBackward) {\n this.#setActiveView(this.activeViewId - 1);\n this.#goto(this.activeViewId);\n } else throw new Error(\"Backward is not possible at the moment\");\n };\n\n forward = () => {\n if (this.canForward) {\n this.#setActiveView(this.activeViewId + 1);\n this.#goto(this.activeViewId);\n } else throw new Error(\"Forward is not possible at the moment\");\n };\n\n #goto(activeViewId: number) {\n const view = this.olMap.getView();\n this.olMap.setView(\n new View({\n center: this.mapViews.get(activeViewId)!.center,\n resolution: this.mapViews.get(activeViewId)!.resolution,\n projection: view.getProjection()\n })\n );\n }\n\n #setActiveView(activeViewId: number) {\n this._activeViewId.value = activeViewId;\n }\n\n #subscribeToMapEvents() {\n const eventsKey: EventsKey = this.olMap.on(\"moveend\", () => {\n onCenterResChange();\n });\n\n const onCenterResChange = () => {\n const olMap = this.olMap;\n const mapViews = this.mapViews;\n const view = olMap.getView();\n const resolution = view.getResolution();\n const center = view.getCenter();\n if (resolution != null && center != null) {\n if (\n center !== mapViews.get(this.activeViewId)?.center ||\n resolution !== mapViews.get(this.activeViewId)?.resolution\n ) {\n const mapState = {\n resolution: resolution,\n center: center\n };\n const nextViewId = this.activeViewId + 1;\n\n // Remove keys in the \"future\". Note: an array would probably be more efficient.\n for (const k of mapViews.keys()) {\n if (k > nextViewId) {\n mapViews.delete(k);\n }\n }\n\n // Remove old keys above limit (maps are sorted by insertion order, so this removes the oldest entries)\n for (const k of mapViews.keys()) {\n if (mapViews.size < SIZE_LIMIT) {\n break;\n }\n mapViews.delete(k);\n }\n\n this.#setActiveView(nextViewId);\n mapViews.set(nextViewId, mapState);\n }\n }\n };\n\n return eventsKey;\n }\n}\n\ninterface ViewModelState {\n vm: ViewHistoryModel;\n useCount: number; // 0 -> must destroy\n}\n\nconst VIEW_MODELS = new WeakMap<MapModel, ViewModelState>();\n\n/**\n * An internal hook that returns a shared HistoryViewModel.\n * History tools that are active at the same time share a single model.\n *\n * The model is destroyed when the last tool is unmounted.\n *\n * TODO: `undefined` only because the map can be undefined at the moment (loading).\n *\n * NOTE: May be useful to have this a general solution in the future; but this is the only usage right now.\n */\nexport function useHistoryViewModel(map: MapModel): ViewHistoryModel | undefined {\n const [vm, setVm] = useState<ViewHistoryModel>();\n useEffect(() => {\n let state = VIEW_MODELS.get(map);\n if (state == null) {\n state = {\n vm: new ViewHistoryModel(map),\n useCount: 1\n };\n VIEW_MODELS.set(map, state);\n } else {\n state.useCount++;\n }\n setVm(state.vm);\n\n return () => {\n setVm(undefined);\n\n state.useCount--;\n if (state.useCount === 0) {\n state.vm.destroy();\n VIEW_MODELS.delete(map);\n }\n };\n }, [map]);\n return vm;\n}\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,UAAA,GAAa,GAAA;AAEZ,MAAM,gBAAA,CAAiB;AAAA,EAClB,KAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAA+C,WAAA,EAAkC;AAAA,EACjF,aAAA,GAAkC,SAAS,CAAC,CAAA;AAAA,EAEpD,YAAY,GAAA,EAAe;AACvB,IAAA,IAAA,CAAK,QAAQ,GAAA,CAAI,KAAA;AACjB,IAAA,IAAA,CAAK,MAAA,GAAS,KAAK,qBAAA,EAAsB;AAAA,EAC7C;AAAA,EAEA,OAAA,GAAU;AACN,IAAA,IAAA,CAAK,MAAA,IAAU,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAA;AAClC,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAClB;AAAA,EAEA,IAAI,YAAA,GAAuB;AACvB,IAAA,OAAO,KAAK,aAAA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|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useMapModelValue } from '@open-pioneer/map';
|
|
3
3
|
import { ToolButton } from '@open-pioneer/map-ui-components';
|
|
4
4
|
import { useCommonComponentProps } from '@open-pioneer/react-utils';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { useIntl } from './_virtual/_virtual-pioneer-module_react-hooks.js';
|
|
7
7
|
import { useState } from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { LuMinus, LuPlus } from 'react-icons/lu';
|
|
9
9
|
|
|
10
10
|
const ZoomIn = function ZoomIn2(props) {
|
|
11
11
|
return /* @__PURE__ */ jsx(Zoom, { zoomDirection: "in", ...props });
|
|
@@ -15,7 +15,7 @@ const ZoomOut = function ZoomOut2(props) {
|
|
|
15
15
|
};
|
|
16
16
|
const Zoom = function Zoom2(props) {
|
|
17
17
|
const { buttonProps, zoomDirection, ref } = props;
|
|
18
|
-
const
|
|
18
|
+
const map = useMapModelValue(props);
|
|
19
19
|
const intl = useIntl();
|
|
20
20
|
const [disabled, setDisabled] = useState(false);
|
|
21
21
|
const { defaultClassName, buttonLabel, buttonIcon } = getDirectionProps(intl, zoomDirection);
|
|
@@ -25,11 +25,11 @@ const Zoom = function Zoom2(props) {
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
setDisabled(true);
|
|
28
|
-
const view = map
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
if (
|
|
28
|
+
const view = map.olView;
|
|
29
|
+
const maxZoom = view.getMaxZoom() || Number.MAX_SAFE_INTEGER;
|
|
30
|
+
const minZoom = view.getMinZoom() || 0;
|
|
31
|
+
let currZoom = map.zoomLevel;
|
|
32
|
+
if (currZoom != null) {
|
|
33
33
|
if (zoomDirection === "in" && currZoom < maxZoom) {
|
|
34
34
|
++currZoom;
|
|
35
35
|
} else if (zoomDirection === "out" && currZoom > minZoom) {
|
|
@@ -56,13 +56,13 @@ function getDirectionProps(intl, zoomDirection) {
|
|
|
56
56
|
return {
|
|
57
57
|
defaultClassName: "zoom-in",
|
|
58
58
|
buttonLabel: intl.formatMessage({ id: "zoom-in.title" }),
|
|
59
|
-
buttonIcon: /* @__PURE__ */ jsx(
|
|
59
|
+
buttonIcon: /* @__PURE__ */ jsx(LuPlus, {})
|
|
60
60
|
};
|
|
61
61
|
case "out":
|
|
62
62
|
return {
|
|
63
63
|
defaultClassName: "zoom-out",
|
|
64
64
|
buttonLabel: intl.formatMessage({ id: "zoom-out.title" }),
|
|
65
|
-
buttonIcon: /* @__PURE__ */ jsx(
|
|
65
|
+
buttonIcon: /* @__PURE__ */ jsx(LuMinus, {})
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
}
|
package/Zoom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Zoom.js","sources":["Zoom.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from \"@chakra-ui/react\";\nimport { MapModelProps,
|
|
1
|
+
{"version":3,"file":"Zoom.js","sources":["Zoom.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport { ToolButton } from \"@open-pioneer/map-ui-components\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { PackageIntl } from \"@open-pioneer/runtime\";\nimport classNames from \"classnames\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { FC, RefAttributes, useState } from \"react\";\nimport { LuMinus, LuPlus } from \"react-icons/lu\";\n\nexport type ZoomInProps = Omit<ZoomProps, \"zoomDirection\">;\n\n/**\n * Provides a button by which the user can zoom into the map.\n *\n * This component composes {@link Zoom}.\n */\nexport const ZoomIn: FC<ZoomInProps> = function ZoomIn(props) {\n return <Zoom zoomDirection=\"in\" {...props} />;\n};\n\nexport type ZoomOutProps = ZoomInProps;\n\n/**\n * Provides a button by which the user can zoom out of the map.\n *\n * This component composes {@link Zoom}.\n */\nexport const ZoomOut: FC<ZoomOutProps> = function ZoomOut(props) {\n return <Zoom zoomDirection=\"out\" {...props} />;\n};\n\nexport interface ZoomProps\n extends CommonComponentProps,\n RefAttributes<HTMLButtonElement>,\n MapModelProps {\n /**\n * Additional properties for the `Button` element.\n *\n * Note that the ToolButton also defines some of these props.\n */\n buttonProps?: Partial<ButtonProps>;\n\n /**\n * The zoom direction.\n *\n * The button will either zoom in or zoom out depending on this value.\n */\n zoomDirection: \"in\" | \"out\";\n}\n\n/**\n * Provides a button by which the user can zoom in or zoom out of the map.\n */\nexport const Zoom: FC<ZoomProps> = function Zoom(props: ZoomProps) {\n const { buttonProps, zoomDirection, ref } = props;\n const map = useMapModelValue(props);\n const intl = useIntl();\n const [disabled, setDisabled] = useState<boolean>(false);\n const { defaultClassName, buttonLabel, buttonIcon } = getDirectionProps(intl, zoomDirection);\n\n const { containerProps } = useCommonComponentProps(classNames(\"zoom\", defaultClassName), props);\n\n function zoom() {\n if (disabled) {\n return;\n }\n setDisabled(true);\n\n const view = map.olView;\n const maxZoom = view.getMaxZoom() || Number.MAX_SAFE_INTEGER;\n const minZoom = view.getMinZoom() || 0;\n\n let currZoom = map.zoomLevel;\n if (currZoom != null) {\n if (zoomDirection === \"in\" && currZoom < maxZoom) {\n ++currZoom;\n } else if (zoomDirection === \"out\" && currZoom > minZoom) {\n --currZoom;\n }\n\n view.animate({ zoom: currZoom, duration: 200 }, () => setDisabled(false));\n }\n }\n\n return (\n <ToolButton\n ref={ref}\n buttonProps={buttonProps}\n label={buttonLabel}\n icon={buttonIcon}\n onClick={zoom}\n {...containerProps}\n />\n );\n};\n\nfunction getDirectionProps(intl: PackageIntl, zoomDirection: \"in\" | \"out\") {\n switch (zoomDirection) {\n case \"in\":\n return {\n defaultClassName: \"zoom-in\",\n buttonLabel: intl.formatMessage({ id: \"zoom-in.title\" }),\n buttonIcon: <LuPlus />\n };\n case \"out\":\n return {\n defaultClassName: \"zoom-out\",\n buttonLabel: intl.formatMessage({ id: \"zoom-out.title\" }),\n buttonIcon: <LuMinus />\n };\n }\n}\n"],"names":["ZoomIn","ZoomOut","Zoom"],"mappings":";;;;;;;;;AAmBO,MAAM,MAAA,GAA0B,SAASA,OAAAA,CAAO,KAAA,EAAO;AAC1D,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,aAAA,EAAc,IAAA,EAAM,GAAG,KAAA,EAAO,CAAA;AAC/C;AASO,MAAM,OAAA,GAA4B,SAASC,QAAAA,CAAQ,KAAA,EAAO;AAC7D,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,aAAA,EAAc,KAAA,EAAO,GAAG,KAAA,EAAO,CAAA;AAChD;AAwBO,MAAM,IAAA,GAAsB,SAASC,KAAAA,CAAK,KAAA,EAAkB;AAC/D,EAAA,MAAM,EAAE,WAAA,EAAa,aAAA,EAAe,GAAA,EAAI,GAAI,KAAA;AAC5C,EAAA,MAAM,GAAA,GAAM,iBAAiB,KAAK,CAAA;AAClC,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAkB,KAAK,CAAA;AACvD,EAAA,MAAM,EAAE,gBAAA,EAAkB,WAAA,EAAa,YAAW,GAAI,iBAAA,CAAkB,MAAM,aAAa,CAAA;AAE3F,EAAA,MAAM,EAAE,gBAAe,GAAI,uBAAA,CAAwB,WAAW,MAAA,EAAQ,gBAAgB,GAAG,KAAK,CAAA;AAE9F,EAAA,SAAS,IAAA,GAAO;AACZ,IAAA,IAAI,QAAA,EAAU;AACV,MAAA;AAAA,IACJ;AACA,IAAA,WAAA,CAAY,IAAI,CAAA;AAEhB,IAAA,MAAM,OAA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,CAAA;AAAA,QACxD,UAAA,sBAAa,OAAA,EAAA,EAAQ;AAAA,OACzB;AAAA;AAEZ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/map-navigation",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0-dev.20250905090001",
|
|
5
5
|
"description": "This package provides a collection of map navigation controls.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@conterra/reactivity-core": "^0.7.0",
|
|
18
|
-
"@chakra-ui/react": "^3.
|
|
18
|
+
"@chakra-ui/react": "^3.24.2",
|
|
19
19
|
"@open-pioneer/react-utils": "^4.0.0",
|
|
20
20
|
"@open-pioneer/reactivity": "^4.0.0",
|
|
21
21
|
"@open-pioneer/runtime": "^4.0.0",
|
|
22
22
|
"classnames": "^2.5.1",
|
|
23
|
-
"ol": "^10.
|
|
24
|
-
"react": "^19.1.
|
|
23
|
+
"ol": "^10.6.1",
|
|
24
|
+
"react": "^19.1.1",
|
|
25
25
|
"react-icons": "^5.5.0",
|
|
26
|
-
"@open-pioneer/map": "
|
|
27
|
-
"@open-pioneer/map-ui-components": "
|
|
26
|
+
"@open-pioneer/map": "0.12.0-dev.20250905090001",
|
|
27
|
+
"@open-pioneer/map-ui-components": "0.12.0-dev.20250905090001"
|
|
28
28
|
},
|
|
29
29
|
"exports": {
|
|
30
30
|
"./package.json": "./package.json",
|