@geoportallux/lux-3dviewer-plugin-goto 0.0.0-stage → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/LICENSE.md +14 -0
- package/README.md +85 -2
- package/dist/index.js +5069 -0
- package/package.json +69 -4
- package/src/auth.model.ts +11 -0
- package/src/auth.ts +31 -0
- package/src/bbox.ts +73 -0
- package/src/elevation.ts +49 -0
- package/src/export-url.model.ts +22 -0
- package/src/export-url.ts +92 -0
- package/src/goTo.ts +122 -0
- package/src/i18n.ts +12 -0
- package/src/index.ts +66 -0
- package/src/projection.ts +21 -0
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Copyright (C) 2026 author <email>
|
|
2
|
+
|
|
3
|
+
This program is free software: you can redistribute it and/or modify
|
|
4
|
+
it under the terms of the GNU General Public License as published by
|
|
5
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
6
|
+
(at your option) any later version.
|
|
7
|
+
|
|
8
|
+
This program is distributed in the hope that it will be useful,
|
|
9
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
GNU General Public License for more details.
|
|
12
|
+
|
|
13
|
+
You should have received a copy of the GNU General Public License
|
|
14
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
package/README.md
CHANGED
|
@@ -1,3 +1,86 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @geoportallux/lux-3dviewer-plugin-goto
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Part of the [VC Map Project](https://github.com/virtualcitySYSTEMS/map-ui)
|
|
4
|
+
|
|
5
|
+
Adds a "Go to" list of export links to the 3dviewer navbar. Clicking a link
|
|
6
|
+
opens a new tab with a URL built from the current map state (camera position,
|
|
7
|
+
LUREF coordinates, elevation, view bbox, active layer ids, locale).
|
|
8
|
+
|
|
9
|
+
## Plugin configuration
|
|
10
|
+
|
|
11
|
+
The export links are configured in the app's `app.config.json` (or module
|
|
12
|
+
config) under the plugin entry. The plugin registers nothing when `exportLinks`
|
|
13
|
+
is missing.
|
|
14
|
+
|
|
15
|
+
```jsonc
|
|
16
|
+
{
|
|
17
|
+
"name": "@geoportallux/lux-3dviewer-plugin-goto",
|
|
18
|
+
"entry": "plugins/@geoportallux/lux-3dviewer-plugin-goto/index.js",
|
|
19
|
+
"exportLinks": [
|
|
20
|
+
{
|
|
21
|
+
"labelKey": "Lidar",
|
|
22
|
+
"tooltipKey": "Explore point cloud data",
|
|
23
|
+
"icon": "mdi-image-filter-hdr-outline",
|
|
24
|
+
"url": "https://lidar.geoportail.lu?COORD_X={LUREF_X}&COORD_Y={LUREF_Y}&COORD_Z={ELEVATION}",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"labelKey": "Generic export",
|
|
28
|
+
"icon": "$vcsExport",
|
|
29
|
+
"url": "https://fmeflow.geoportail.lu/fmeserver/apps/Geoportal-Exporter?dynamicParameterData={DYNAMIC_PARAMETER_DATA}",
|
|
30
|
+
"userType": ["etat"],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Field | Description |
|
|
37
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| `labelKey` | Item title, resolved as `lux3dviewerPluginGoto.<labelKey>` in the app translations. |
|
|
39
|
+
| `tooltipKey` | Optional tooltip, same resolution as `labelKey`. |
|
|
40
|
+
| `icon` | Optional; `mdi-*` names or `$vcs*` aliases. |
|
|
41
|
+
| `url` | Target URL, may contain the tokens below. |
|
|
42
|
+
| `userType` / `userRoles` | Optional restriction; the link is only shown when the auth plugin reports a matching user type or role. |
|
|
43
|
+
|
|
44
|
+
Supported URL tokens: `{LUREF_X}`, `{LUREF_Y}`, `{LON}`, `{LAT}`,
|
|
45
|
+
`{ELEVATION}`, `{LANG}`, `{BBOX}`, `{BBOX_GEOJSON}`, `{LAYER_IDS}`,
|
|
46
|
+
`{LAYER_IDS_SPACES}`, `{DYNAMIC_PARAMETER_DATA}`.
|
|
47
|
+
|
|
48
|
+
## Development configuration
|
|
49
|
+
|
|
50
|
+
`config.json` at the plugin root holds the same `exportLinks` for local
|
|
51
|
+
development. `vcmplugin serve` and `vcmplugin preview` (i.e. `npm start` and
|
|
52
|
+
`npm run preview`) use it automatically, so the list works without any app
|
|
53
|
+
configuration. It is not used at runtime by the deployed app — there the app
|
|
54
|
+
module config remains the source of truth.
|
|
55
|
+
|
|
56
|
+
## Translations
|
|
57
|
+
|
|
58
|
+
Link titles and tooltips are resolved as `lux3dviewerPluginGoto.<labelKey>` and
|
|
59
|
+
`lux3dviewerPluginGoto.<tooltipKey>`, so their translations live in the app
|
|
60
|
+
configuration under that namespace:
|
|
61
|
+
|
|
62
|
+
```jsonc
|
|
63
|
+
{
|
|
64
|
+
"i18n": [
|
|
65
|
+
{
|
|
66
|
+
"name": "FR base",
|
|
67
|
+
"fr": {
|
|
68
|
+
"lux3dviewerPluginGoto": {
|
|
69
|
+
"Lidar": "LiDAR",
|
|
70
|
+
"Explore point cloud data": "Explorer les nuages de points",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The plugin ships the "Go to" button title under the same namespace
|
|
79
|
+
(`lux3dviewerPluginGoto.goTo`).
|
|
80
|
+
|
|
81
|
+
## Notes
|
|
82
|
+
|
|
83
|
+
- Coordinates come from the current camera view.
|
|
84
|
+
- Restricted links (e.g. Cyclomédia, Generic export) require the
|
|
85
|
+
`@geoportallux/lux-3dviewer-plugin-auth` plugin; without a matching user
|
|
86
|
+
they stay hidden.
|