@panoramax/web-viewer 3.2.3-develop-db697921 → 3.2.3-develop-6dbe1616
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 +1 -0
- package/build/index.js +21 -19
- package/build/index.js.map +1 -1
- package/docs/05_Compatibility.md +2 -2
- package/package.json +1 -1
- package/src/components/menus/PictureMetadata.js +6 -0
- package/src/translations/en.json +1 -0
- package/src/translations/fr.json +1 -0
- package/src/utils/picture.js +4 -2
- package/tests/components/ui/__snapshots__/Photo.test.js.snap +2 -0
- package/tests/utils/__snapshots__/picture.test.js.snap +1 -0
package/docs/05_Compatibility.md
CHANGED
|
@@ -29,8 +29,8 @@ Individual pictures should follow [STAC item specification](https://github.com/r
|
|
|
29
29
|
- `collection`
|
|
30
30
|
- `id`
|
|
31
31
|
- `links`
|
|
32
|
-
- [`rel`](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#link-object): `prev`, `next`, `related`
|
|
33
|
-
- `type`: `application/geo+json`
|
|
32
|
+
- [`rel`](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#link-object): `prev`, `next`, `related`, `via`
|
|
33
|
+
- `type`: `application/geo+json` or `application/json`
|
|
34
34
|
- `id`
|
|
35
35
|
- `geometry`
|
|
36
36
|
- `datetime`
|
package/package.json
CHANGED
|
@@ -274,6 +274,12 @@ export default class PictureMetadata extends LitElement {
|
|
|
274
274
|
${fa(faImages)} ${this._parent?._t.pnx.metadata_general_seqid}
|
|
275
275
|
</pnx-copy-button>
|
|
276
276
|
`
|
|
277
|
+
},
|
|
278
|
+
this._meta?.origInstance && {
|
|
279
|
+
title: this._parent?._t.pnx.metadata_general_instance,
|
|
280
|
+
content: html`<strong><a href=${this._meta.origInstance.href+window.location.search} target="_blank">
|
|
281
|
+
${this._meta.origInstance.instance_name || this._meta.origInstance.href.replace(/^http.?:\/\//, "")}
|
|
282
|
+
</a></strong>`
|
|
277
283
|
}
|
|
278
284
|
];
|
|
279
285
|
|
package/src/translations/en.json
CHANGED
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
"metadata_general_license": "License",
|
|
138
138
|
"metadata_general_license_link": "See the full licence description",
|
|
139
139
|
"metadata_general_date": "Capture date",
|
|
140
|
+
"metadata_general_instance": "Origin instance",
|
|
140
141
|
"metadata_camera": "Camera",
|
|
141
142
|
"metadata_camera_make": "Make",
|
|
142
143
|
"metadata_camera_model": "Model",
|
package/src/translations/fr.json
CHANGED
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
"metadata_general_license": "Licence",
|
|
138
138
|
"metadata_general_license_link": "Voir la description complète de la licence",
|
|
139
139
|
"metadata_general_date": "Date de prise de vue",
|
|
140
|
+
"metadata_general_instance": "Instance d'origine",
|
|
140
141
|
"metadata_camera": "Appareil",
|
|
141
142
|
"metadata_camera_make": "Fabricant",
|
|
142
143
|
"metadata_camera_model": "Modèle",
|
package/src/utils/picture.js
CHANGED
|
@@ -294,14 +294,15 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
|
|
|
294
294
|
|
|
295
295
|
const hdUrl = (Object.values(f.assets).find(a => a?.roles?.includes("data")) || {}).href;
|
|
296
296
|
const matrix = f?.properties?.["tiles:tile_matrix_sets"]?.geovisio;
|
|
297
|
-
const prev = f.links
|
|
298
|
-
const next = f.links
|
|
297
|
+
const prev = f.links?.find?.(l => l?.rel === "prev" && l?.type === "application/geo+json");
|
|
298
|
+
const next = f.links?.find?.(l => l?.rel === "next" && l?.type === "application/geo+json");
|
|
299
299
|
const baseUrlWebp = Object.values(f.assets).find(a => a.roles?.includes("visual") && a.type === "image/webp");
|
|
300
300
|
const baseUrlJpeg = Object.values(f.assets).find(a => a.roles?.includes("visual") && a.type === "image/jpeg");
|
|
301
301
|
const baseUrl = (baseUrlWebp || baseUrlJpeg).href;
|
|
302
302
|
const thumbUrl = (Object.values(f.assets).find(a => a.roles?.includes("thumbnail") && a.type === "image/jpeg"))?.href;
|
|
303
303
|
const tileUrl = f?.asset_templates?.tiles_webp || f?.asset_templates?.tiles;
|
|
304
304
|
const croppedPanoData = getCroppedPanoData(f);
|
|
305
|
+
const origInstance = f.links?.find?.(l => l?.rel === "via" && l?.type === "application/json");
|
|
305
306
|
|
|
306
307
|
let panorama;
|
|
307
308
|
|
|
@@ -376,6 +377,7 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
|
|
|
376
377
|
},
|
|
377
378
|
sphereCorrection: getSphereCorrection(f),
|
|
378
379
|
horizontalFov,
|
|
380
|
+
origInstance,
|
|
379
381
|
properties: f.properties,
|
|
380
382
|
};
|
|
381
383
|
|
|
@@ -59,6 +59,7 @@ Object {
|
|
|
59
59
|
"nodeId": "127d9282-d082-46ca-bc09-4b0d8569dd2c",
|
|
60
60
|
},
|
|
61
61
|
],
|
|
62
|
+
"origInstance": undefined,
|
|
62
63
|
"panorama": Object {
|
|
63
64
|
"basePanoData": [Function],
|
|
64
65
|
"baseUrl": "https://geovisio.fr/api/pictures/0005086d-65eb-4a90-9764-86b3661aaa77/sd.webp",
|
|
@@ -171,6 +172,7 @@ Object {
|
|
|
171
172
|
"nodeId": "127d9282-d082-46ca-bc09-4b0d8569dd2c",
|
|
172
173
|
},
|
|
173
174
|
],
|
|
175
|
+
"origInstance": undefined,
|
|
174
176
|
"panorama": Object {
|
|
175
177
|
"basePanoData": [Function],
|
|
176
178
|
"baseUrl": "https://geovisio.fr/api/pictures/0005086d-65eb-4a90-9764-86b3661aaa77/sd.webp",
|
|
@@ -57,6 +57,7 @@ Object {
|
|
|
57
57
|
"nodeId": "5fb8e767-6fe3-4bcb-b19f-7031d9a64fc8",
|
|
58
58
|
},
|
|
59
59
|
],
|
|
60
|
+
"origInstance": undefined,
|
|
60
61
|
"panorama": Object {
|
|
61
62
|
"basePanoData": [Function],
|
|
62
63
|
"baseUrl": "https://panoramax.openstreetmap.fr/api/pictures/00000000-76a0-4bec-b19e-a56f51ef997d/sd.jpg",
|