@panoramax/web-viewer 4.0.3 → 4.1.0
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 +40 -1
- package/build/index.css +9 -9
- package/build/index.css.map +1 -1
- package/build/index.js +640 -456
- package/build/index.js.map +1 -1
- package/build/photo.html +1 -1
- package/build/viewer.html +3 -3
- package/build/widgets.html +1 -1
- package/config/jest/mocks.js +9 -1
- package/docs/03_URL_settings.md +21 -0
- package/docs/09_Develop.md +6 -0
- package/docs/images/comparative_3drender.jpg +0 -0
- package/docs/index.md +13 -0
- package/docs/reference/components/core/Editor.md +18 -0
- package/docs/reference/components/core/PhotoViewer.md +1 -0
- package/docs/reference/components/core/Viewer.md +1 -0
- package/docs/reference/components/menus/MapLegend.md +17 -0
- package/docs/reference/components/menus/MiniPictureLegend.md +15 -0
- package/docs/reference/components/menus/PictureLegend.md +17 -0
- package/docs/reference/components/ui/AnnotationsSwitch.md +15 -0
- package/docs/reference/components/ui/Button.md +1 -1
- package/docs/reference/components/ui/CopyButton.md +1 -1
- package/docs/reference/components/ui/LinkButton.md +1 -1
- package/docs/reference/components/ui/Map.md +18 -2
- package/docs/reference/components/ui/MapMore.md +6 -2
- package/docs/reference/components/ui/SemanticsEditor.md +87 -0
- package/docs/reference/components/ui/widgets/Legend.md +5 -4
- package/docs/reference/utils/URLHandler.md +7 -0
- package/docs/reference.md +3 -1
- package/docs/tutorials/aerial_imagery.md +13 -11
- package/mkdocs.yml +3 -1
- package/package.json +7 -7
- package/public/photo.html +1 -1
- package/public/viewer.html +3 -3
- package/public/widgets.html +32 -0
- package/src/components/core/Basic.css +2 -0
- package/src/components/core/Basic.js +3 -1
- package/src/components/core/CoverageMap.js +6 -0
- package/src/components/core/Editor.css +1 -0
- package/src/components/core/Editor.js +58 -7
- package/src/components/core/PhotoViewer.css +5 -10
- package/src/components/core/PhotoViewer.js +55 -20
- package/src/components/core/Viewer.css +9 -2
- package/src/components/core/Viewer.js +62 -33
- package/src/components/layout/BottomDrawer.js +2 -1
- package/src/components/layout/Tabs.js +4 -0
- package/src/components/menus/AnnotationsList.js +13 -9
- package/src/components/menus/MapBackground.js +8 -3
- package/src/components/menus/MapFilters.js +11 -2
- package/src/components/menus/MapLayers.js +3 -2
- package/src/components/menus/MapLegend.js +28 -4
- package/src/components/menus/MiniPictureLegend.js +74 -0
- package/src/components/menus/PictureLegend.js +88 -33
- package/src/components/menus/PictureMetadata.js +49 -17
- package/src/components/menus/PlayerOptions.js +3 -3
- package/src/components/menus/Share.js +3 -3
- package/src/components/menus/index.js +5 -4
- package/src/components/styles.js +11 -0
- package/src/components/ui/AnnotationsSwitch.js +169 -0
- package/src/components/ui/Button.js +1 -1
- package/src/components/ui/CopyButton.js +1 -1
- package/src/components/ui/LinkButton.js +1 -1
- package/src/components/ui/Map.css +4 -0
- package/src/components/ui/Map.js +17 -5
- package/src/components/ui/MapMore.js +61 -25
- package/src/components/ui/Photo.css +11 -2
- package/src/components/ui/Photo.js +6 -3
- package/src/components/ui/SemanticsEditor.js +157 -0
- package/src/components/ui/index.js +2 -1
- package/src/components/ui/widgets/GeoSearch.js +3 -2
- package/src/components/ui/widgets/Legend.js +69 -14
- package/src/components/ui/widgets/MapFiltersButton.js +3 -3
- package/src/components/ui/widgets/MapLayersButton.js +3 -3
- package/src/components/ui/widgets/OSMEditors.js +2 -2
- package/src/components/ui/widgets/PictureLegendActions.js +24 -42
- package/src/components/ui/widgets/Player.js +3 -3
- package/src/components/ui/widgets/Zoom.js +4 -2
- package/src/translations/ar.json +1 -0
- package/src/translations/da.json +3 -2
- package/src/translations/de.json +64 -13
- package/src/translations/en.json +5 -1
- package/src/translations/eo.json +32 -2
- package/src/translations/fr.json +7 -1
- package/src/translations/it.json +33 -2
- package/src/translations/nl.json +53 -11
- package/src/translations/zh_Hant.json +29 -2
- package/src/utils/API.js +17 -1
- package/src/utils/InitParameters.js +46 -4
- package/src/utils/URLHandler.js +9 -1
- package/src/utils/map.js +24 -1
- package/src/utils/semantics.js +53 -1
- package/src/utils/services.js +16 -0
- package/src/utils/widgets.js +20 -0
- package/tests/components/core/Editor.test.js +1 -1
- package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +18 -6
- package/tests/components/core/__snapshots__/Viewer.test.js.snap +15 -3
- package/tests/components/ui/Photo.test.js +1 -0
- package/tests/components/ui/__snapshots__/Map.test.js.snap +164 -0
- package/tests/utils/InitParameters.test.js +27 -0
- package/tests/utils/map.test.js +12 -0
- package/tests/utils/semantics.test.js +34 -5
- package/docs/reference/components/ui/HashTags.md +0 -15
- package/src/components/ui/HashTags.js +0 -98
package/src/translations/de.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"search": "Suche",
|
|
6
6
|
"layers": "Ebenen",
|
|
7
7
|
"share_links": "Links",
|
|
8
|
-
"share_page": "Link zu
|
|
8
|
+
"share_page": "Link zu diesem Bild",
|
|
9
9
|
"loading_labels_fun": [
|
|
10
10
|
"🦌 Erkennung der \"Reh kreuzt\"-Schilder",
|
|
11
11
|
"🚘 Suche Panoramax-Auto ©",
|
|
@@ -24,11 +24,17 @@
|
|
|
24
24
|
"👥 Personas anlegen",
|
|
25
25
|
"🌭️ Lokalisierung der Currywurst",
|
|
26
26
|
"🧑💻 Debugging des Interfaces",
|
|
27
|
-
"📈 Hochzählen der Statistiken"
|
|
27
|
+
"📈 Hochzählen der Statistiken",
|
|
28
|
+
"🤖 Lerne Semantik",
|
|
29
|
+
"🎨 Überarbeitung des Interface",
|
|
30
|
+
"📅 Plane Fotomapping-Parties",
|
|
31
|
+
"🧀 Reifen des Emmentalers",
|
|
32
|
+
"🌄 Berechnen des Sonnenscheins",
|
|
33
|
+
"🌊 Messung der Gezeiten"
|
|
28
34
|
],
|
|
29
35
|
"search_empty": "Keine Ergebnisse gefunden",
|
|
30
36
|
"share": "Teilen",
|
|
31
|
-
"metadata_general_picid": "Bild
|
|
37
|
+
"metadata_general_picid": "Bild",
|
|
32
38
|
"zoom": "Zoom",
|
|
33
39
|
"zoomOut": "Herauszoomen",
|
|
34
40
|
"zoomIn": "Hereinzoomen",
|
|
@@ -42,7 +48,7 @@
|
|
|
42
48
|
"show_psv": "Bildbetrachter anzeigen",
|
|
43
49
|
"show_map": "Karte anzeigen",
|
|
44
50
|
"search_user": "Benutzernamen suchen…",
|
|
45
|
-
"filter_zoom_in": "
|
|
51
|
+
"filter_zoom_in": "Vergrößere die Karte, um diesen Filter zu sehen",
|
|
46
52
|
"picture_flat": "Klassisch",
|
|
47
53
|
"picture_360": "360°",
|
|
48
54
|
"filter_camera_model": "Nach Kameramodell",
|
|
@@ -57,7 +63,7 @@
|
|
|
57
63
|
"map_theme_type": "Kameratyp",
|
|
58
64
|
"contrast": "Höheren Bildkontrast aktivieren",
|
|
59
65
|
"metadata": "Bildmetadaten",
|
|
60
|
-
"metadata_general_seqid": "
|
|
66
|
+
"metadata_general_seqid": "Sequenz",
|
|
61
67
|
"metadata_general_picid_link": "Zur JOSN-Beschreibung des Bildes gehen",
|
|
62
68
|
"loading_labels_serious": [
|
|
63
69
|
"🗺️ Laden der Kartendaten",
|
|
@@ -67,7 +73,10 @@
|
|
|
67
73
|
"🏘️ 3D-Rendering",
|
|
68
74
|
"📷 360° Fotos initialisieren",
|
|
69
75
|
"🟠 Farben balancieren",
|
|
70
|
-
"💯 Berechnung der Qualitätsbewertung ©"
|
|
76
|
+
"💯 Berechnung der Qualitätsbewertung ©",
|
|
77
|
+
"📡 Herunterladen von Updates",
|
|
78
|
+
"🌍 Laden von Kartenteilen",
|
|
79
|
+
"📸 Bearbeitung der Schatten"
|
|
71
80
|
],
|
|
72
81
|
"search_address": "Suchen sie eine Adresse, Stadt, …",
|
|
73
82
|
"share_image": "HD Bild",
|
|
@@ -108,12 +117,12 @@
|
|
|
108
117
|
"metadata_camera_model": "Modell",
|
|
109
118
|
"metadata_camera_type": "Typ",
|
|
110
119
|
"metadata_camera_focal_length": "Brennweite",
|
|
111
|
-
"metadata_location": "
|
|
120
|
+
"metadata_location": "Position",
|
|
112
121
|
"metadata_location_longitude": "Längengrad",
|
|
113
122
|
"metadata_location_latitude": "Breitengrad",
|
|
114
|
-
"metadata_location_orientation": "
|
|
123
|
+
"metadata_location_orientation": "Richtung",
|
|
115
124
|
"metadata_location_precision": "Präzision der Positionierung",
|
|
116
|
-
"metadata_exif": "EXIF
|
|
125
|
+
"metadata_exif": "EXIF",
|
|
117
126
|
"minimize": "Widget verbergen, sie können es über die Schaltfläche in der linken unteren Ecke wieder einblenden",
|
|
118
127
|
"map_theme_age_4": "< 1 Monat",
|
|
119
128
|
"error_subtitle": "Bitte versuchen sie es später erneut, oder schauen sie in die Web-Browser-Konsole für mehr Details.",
|
|
@@ -143,7 +152,7 @@
|
|
|
143
152
|
"report_submit": "Absenden",
|
|
144
153
|
"report_success": "Ihr Report wurde erfolgreich gesendet. Er wird so schnell wie möglich überprüft.",
|
|
145
154
|
"report_failure": "Ein Fehler ist bei der Erstellung des Reports aufgetreten: {e}. Bitte versuchen sie es erneut.",
|
|
146
|
-
"report": "
|
|
155
|
+
"report": "Melden",
|
|
147
156
|
"legend_title": "Zeige Bilderdetails",
|
|
148
157
|
"report_wait": "Bericht senden…",
|
|
149
158
|
"error_click": "Weiter",
|
|
@@ -156,7 +165,7 @@
|
|
|
156
165
|
"filter_qualityscore": "Qualitätswert",
|
|
157
166
|
"filter_qualityscore_help": "Klicken, um zu aktivieren oder deaktivieren",
|
|
158
167
|
"map_theme_score": "Qualitätswert",
|
|
159
|
-
"metadata_quality": "
|
|
168
|
+
"metadata_quality": "Qualität",
|
|
160
169
|
"metadata_quality_help": "Erfahre mehr über den Qualitätswert",
|
|
161
170
|
"metadata_quality_resolution_score": "Auflösungswertung",
|
|
162
171
|
"metadata_quality_gps_score": "Positionswertung",
|
|
@@ -166,7 +175,49 @@
|
|
|
166
175
|
"qualityscore_doc_1": "Panoramax bietet einen Qualitätsfaktor für jedes Bild. Es ermöglicht eine einfache Kartenfilterung und eine umfassende Anzeige der Verfügbarkeit hochwertiger Bilder.",
|
|
167
176
|
"qualityscore_doc_2": "Die Note wird den Benutzern als A/B/C/D/E-Bewertung angezeigt (A ist die beste, E die schlechteste) und anhand dieser Skala grafisch dargestellt:",
|
|
168
177
|
"qualityscore_doc_3": "Die Berechnung erfolgt auf der Grundlage der GPS-Genauigkeit und der Bildauflösung. Ein professionelles System wird mit A bewertet, eine 360-Grad-Action-Kamera mit B und ein Smartphone mit C/D/E.",
|
|
169
|
-
"minimize_short": "Verbergen"
|
|
178
|
+
"minimize_short": "Verbergen",
|
|
179
|
+
"semantics_features_none": "Bislang wurde kein Feature erkannt oder annotiert in diesem Bild.",
|
|
180
|
+
"semantics_features_default_title": "Feature #{nb}",
|
|
181
|
+
"semantics_features_subtitle": "{nb} assozierte Eigenschaften",
|
|
182
|
+
"semantics_show_all_tags": "Alle Schlagworte anzeigen",
|
|
183
|
+
"semantics_title": "Schlagworte",
|
|
184
|
+
"semantics_tags": "{nb] Schlagworte",
|
|
185
|
+
"semantics_features": "Erkannte Features",
|
|
186
|
+
"semantics_hide_all_tags": "Alle Schlagworte verbergen",
|
|
187
|
+
"semantics_annotation_tooltip": "Klicken um Details zu sehen",
|
|
188
|
+
"semantics_key": "Schlüssel",
|
|
189
|
+
"semantics_value": "Wert",
|
|
190
|
+
"semantics_key_doc": "Mehr über diesen Schlüssel erfahren",
|
|
191
|
+
"semantics_value_doc": "Mehr über dieses Schlagwort erfahren",
|
|
192
|
+
"semantics_tags_picture": "Foto-Schlagworte",
|
|
193
|
+
"semantics_tags_picture_none": "Bislang wurden keine Schlagworte für dieses Foto gesetzt.",
|
|
194
|
+
"semantics_show_annotations": "Fotoannotierungen anzeigen",
|
|
195
|
+
"semantics_hide_annotations": "Fotoannotierungen verbergen",
|
|
196
|
+
"semantics_wikidata_properties": {
|
|
197
|
+
"P31": "Instanz von",
|
|
198
|
+
"P279": "Unterklasse von",
|
|
199
|
+
"P361": "Teil von"
|
|
200
|
+
},
|
|
201
|
+
"metadata_exif_doc": "Dokumentation der EXIF Tags",
|
|
202
|
+
"metadata_exif_doc_title": "Zur Exiv2 Dokumentation für die vollen Details zu EXIF und den XMP Tag Definitionen",
|
|
203
|
+
"metadata_location_coordinates": "Koordinaten (Längengrad, Breitengrad)",
|
|
204
|
+
"metadata_location_copy": "Kopiere {v}",
|
|
205
|
+
"metadata_location_copy_more": "Mehr Optionen zum Kopieren der Koordinaten",
|
|
206
|
+
"whats_panoramax": "Panoramax ist eine Geo-Commons für Gebietsfotos.",
|
|
207
|
+
"picture_360_long": "Panoramafoto",
|
|
208
|
+
"metadata_summary": "Zusammenfassung",
|
|
209
|
+
"filter_date_6months": "6 Monate",
|
|
210
|
+
"picture_all": "Alle",
|
|
211
|
+
"picture_flat_long": "Klassisches Foto",
|
|
212
|
+
"metadata_general_instance": "Quellinstanz",
|
|
213
|
+
"geo_uri": "Externe App",
|
|
214
|
+
"contribute_id": "Zu OpenStreetMap mit dem iD Editor beitragen",
|
|
215
|
+
"metadata_general_copy_id": "ID kopieren",
|
|
216
|
+
"metadata_general_copy_picid": "Kopiere Foto ID",
|
|
217
|
+
"semantics_qualifiers": "Qualifikationskriterien",
|
|
218
|
+
"panoramax": "Panoramax",
|
|
219
|
+
"semantics_zero_annotations": "Zu diesem Bild sind keine Anmerkungen vorhanden",
|
|
220
|
+
"semantics_hashtags": "Bild-Hashtags"
|
|
170
221
|
},
|
|
171
222
|
"psv": {
|
|
172
223
|
"twoFingers": "Nutzen sie zwei Finger zum navigieren",
|
|
@@ -178,7 +229,7 @@
|
|
|
178
229
|
"not_public": "Nicht öffentlich sichtbar",
|
|
179
230
|
"loading": "Laden…",
|
|
180
231
|
"slow_loading": "Die Karte wird nur langsam geladen und könnte fehlerhaft erscheinen",
|
|
181
|
-
"map_data": "Kartendaten:",
|
|
232
|
+
"map_data": "Kartendaten: {m}",
|
|
182
233
|
"more_panoramax": "Mehr Infos über Panoramax"
|
|
183
234
|
},
|
|
184
235
|
"maplibre": {
|
package/src/translations/en.json
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"share_embed": "Embed on your website",
|
|
40
40
|
"share_embed_docs": "Read more about embed configuration",
|
|
41
41
|
"share_print": "Print",
|
|
42
|
+
"panoramax": "Panoramax",
|
|
42
43
|
"whats_panoramax": "Panoramax is the geo-commons for territories' pictures.",
|
|
43
44
|
"copy": "Copy",
|
|
44
45
|
"copied": "Copied",
|
|
@@ -191,11 +192,14 @@
|
|
|
191
192
|
"semantics_qualifiers": "Qualifiers",
|
|
192
193
|
"semantics_show_annotations": "Display picture annotations",
|
|
193
194
|
"semantics_hide_annotations": "Hide picture annotations",
|
|
195
|
+
"semantics_zero_annotations": "No annotation set on this picture",
|
|
196
|
+
"semantics_hashtags": "Picture hashtags",
|
|
194
197
|
"semantics_wikidata_properties": {
|
|
195
198
|
"P31": "instance of",
|
|
196
199
|
"P279": "subclass of",
|
|
197
200
|
"P361": "part of"
|
|
198
201
|
},
|
|
202
|
+
"semantics_editor_error": "The syntax is invalid. Your tags may look like:\nkey=value\nprefix|key=value\nprefix|key[qualif_key=qualif_val]=value\n\nMax key length is 256 characters, max value length 2048 characters.",
|
|
199
203
|
"report": "Report",
|
|
200
204
|
"report_auth": "This report will be sent using your account \"{a}\"",
|
|
201
205
|
"report_nature_label": "Nature of the issue",
|
|
@@ -225,7 +229,7 @@
|
|
|
225
229
|
"thumbnail": "Thumbnail of hovered picture",
|
|
226
230
|
"not_public": "Not publicly visible",
|
|
227
231
|
"slow_loading": "Map is slow to load and could appear broken",
|
|
228
|
-
"map_data": "Map
|
|
232
|
+
"map_data": "Map based on {m}",
|
|
229
233
|
"more_panoramax": "Discover more about Panoramax"
|
|
230
234
|
}
|
|
231
235
|
}
|
package/src/translations/eo.json
CHANGED
|
@@ -188,7 +188,37 @@
|
|
|
188
188
|
"metadata_general_copy_id": "Kopii la ID-on",
|
|
189
189
|
"metadata_general_copy_picid": "Kopii la fotan ID-on",
|
|
190
190
|
"metadata_general_instance": "Origina instanco",
|
|
191
|
-
"geo_uri": "Ekseteraj aplikaĵoj"
|
|
191
|
+
"geo_uri": "Ekseteraj aplikaĵoj",
|
|
192
|
+
"semantics_title": "Etikedoj",
|
|
193
|
+
"semantics_tags": "{nb} etikedoj",
|
|
194
|
+
"semantics_features": "Detektitaj objektoj",
|
|
195
|
+
"semantics_features_none": "No objekto estis ankoraŭ detektita aŭ prinotita en ĉi tiu foto.",
|
|
196
|
+
"semantics_features_default_title": "Objekto #{nb}",
|
|
197
|
+
"metadata_exif_doc": "Dokumentoj por EXIF-etikedoj",
|
|
198
|
+
"metadata_exif_doc_title": "Iru al la dokumentaro de Exiv2 por havi plenajn detalojn pri difinoj de EXIF kaj XMP-etikedoj",
|
|
199
|
+
"metadata_location_coordinates": "Koordinatoj (longitudo, latitudo)",
|
|
200
|
+
"metadata_location_copy": "Kopii {v}",
|
|
201
|
+
"metadata_location_copy_more": "Pli da ebloj por kopii koordinatojn",
|
|
202
|
+
"whats_panoramax": "Panoramax estas la geokomunaĵo por teritoriaj fotoj.",
|
|
203
|
+
"semantics_features_subtitle": "{nb} asociitaj atributoj",
|
|
204
|
+
"semantics_tags_picture_none": "Ankoraŭ neniuj atributoj estas difinitaj por ĉi tiu foto.",
|
|
205
|
+
"semantics_hide_all_tags": "Maski la atributojn",
|
|
206
|
+
"semantics_key": "Ŝlosilo",
|
|
207
|
+
"semantics_value": "Valoro",
|
|
208
|
+
"semantics_show_all_tags": "Vidi ĉiujn atributojn",
|
|
209
|
+
"semantics_tags_picture": "Foto-atributoj",
|
|
210
|
+
"semantics_value_doc": "Lernu pli pri ĉi tiu atributo",
|
|
211
|
+
"semantics_qualifiers": "Kvalifikiloj",
|
|
212
|
+
"semantics_hide_annotations": "Maski bildajn komentojn",
|
|
213
|
+
"semantics_wikidata_properties": {
|
|
214
|
+
"P279": "subklaso de",
|
|
215
|
+
"P361": "parto de",
|
|
216
|
+
"P31": "instanco de"
|
|
217
|
+
},
|
|
218
|
+
"share_picture": "Foto",
|
|
219
|
+
"semantics_annotation_tooltip": "Alklaku por vidi la detalojn",
|
|
220
|
+
"semantics_show_annotations": "Montri bildajn komentojn",
|
|
221
|
+
"semantics_key_doc": "Lernu pli pri ĉi tiu ŝlosilo"
|
|
192
222
|
},
|
|
193
223
|
"maplibre": {
|
|
194
224
|
"GeolocateControl.FindMyLocation": "Trovi mian pozicion",
|
|
@@ -200,6 +230,6 @@
|
|
|
200
230
|
"thumbnail": "Miniaturo de la surflikta bildo",
|
|
201
231
|
"not_public": "Ne publike videbla",
|
|
202
232
|
"more_panoramax": "Malkovri pli pri Panoramax",
|
|
203
|
-
"map_data": "Kartaj datumoj :"
|
|
233
|
+
"map_data": "Kartaj datumoj : {m}"
|
|
204
234
|
}
|
|
205
235
|
}
|
package/src/translations/fr.json
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"share_embed": "Intégration sur votre site",
|
|
40
40
|
"share_embed_docs": "Découvrir plus de possibilités pour l'intégration sur votre site",
|
|
41
41
|
"share_print": "Imprimer",
|
|
42
|
+
"panoramax": "Panoramax",
|
|
42
43
|
"whats_panoramax": "Panoramax est le géocommun des photos des territoires.",
|
|
43
44
|
"copy": "Copier",
|
|
44
45
|
"copied": "Copié",
|
|
@@ -189,11 +190,16 @@
|
|
|
189
190
|
"semantics_tags_picture": "Attributs de la photo",
|
|
190
191
|
"semantics_tags_picture_none": "Aucun attribut n'a été défini pour cette photo pour l'instant.",
|
|
191
192
|
"semantics_qualifiers": "Qualificateurs",
|
|
193
|
+
"semantics_show_annotations": "Afficher les annotations de photo",
|
|
194
|
+
"semantics_hide_annotations": "Masquer les annotations de photo",
|
|
195
|
+
"semantics_zero_annotations": "Aucune annotation sur cette image",
|
|
196
|
+
"semantics_hashtags": "Mots-dièse de la photo",
|
|
192
197
|
"semantics_wikidata_properties": {
|
|
193
198
|
"P31": "instance de",
|
|
194
199
|
"P279": "sous-classe de",
|
|
195
200
|
"P361": "partie de"
|
|
196
201
|
},
|
|
202
|
+
"semantics_editor_error": "La syntaxe est invalide. Vos attributs doivent avoir cette forme:\nclé=valeur\npréfixe|clé=valeur\npréfixe|clé[qualif_clé=qualif_val]=valeur\n\nLongueur max des clés : 256 caractères, max des valeurs 2048 caractères.",
|
|
197
203
|
"report": "Signaler",
|
|
198
204
|
"report_auth": "Ce signalement sera envoyé en utilisant votre compte \"{a}\"",
|
|
199
205
|
"report_nature_label": "Nature du problème",
|
|
@@ -223,7 +229,7 @@
|
|
|
223
229
|
"thumbnail": "Miniature de la photo survolée",
|
|
224
230
|
"not_public": "Masqué au public",
|
|
225
231
|
"slow_loading": "La carte est longue à charger et pourrait apparaître cassée",
|
|
226
|
-
"map_data": "
|
|
232
|
+
"map_data": "Carte basée sur {m}",
|
|
227
233
|
"more_panoramax": "En savoir plus sur Panoramax"
|
|
228
234
|
}
|
|
229
235
|
}
|
package/src/translations/it.json
CHANGED
|
@@ -185,7 +185,38 @@
|
|
|
185
185
|
"filter_date_6months": "6 mesi",
|
|
186
186
|
"picture_all": "Tutte",
|
|
187
187
|
"metadata_exif_doc": "Doc per gli attributi EXIF",
|
|
188
|
-
"metadata_exif_doc_title": "Vai alla documentazione di Exiv2 per i dettagli completi sulle definizioni degli attributi EXIF e XMP"
|
|
188
|
+
"metadata_exif_doc_title": "Vai alla documentazione di Exiv2 per i dettagli completi sulle definizioni degli attributi EXIF e XMP",
|
|
189
|
+
"semantics_value": "Valore",
|
|
190
|
+
"semantics_key_doc": "Per saperne di più su questa chiave",
|
|
191
|
+
"semantics_title": "Etichette",
|
|
192
|
+
"semantics_features": "Oggetti rilevati",
|
|
193
|
+
"semantics_features_none": "Non è ancora stato rilevato alcun oggetto in questa foto.",
|
|
194
|
+
"semantics_features_default_title": "Oggetto #{nb}",
|
|
195
|
+
"semantics_features_subtitle": "{nb} proprietà associate",
|
|
196
|
+
"semantics_tags": "{nb} attributi",
|
|
197
|
+
"semantics_show_all_tags": "Mostra tutti gli attributi",
|
|
198
|
+
"semantics_hide_all_tags": "Nascondi tutti gli attributi",
|
|
199
|
+
"semantics_key": "Chiave",
|
|
200
|
+
"semantics_value_doc": "Per saperne di più su questa etichetta",
|
|
201
|
+
"semantics_wikidata_properties": {
|
|
202
|
+
"P361": "parte di",
|
|
203
|
+
"P31": "instanza di",
|
|
204
|
+
"P279": "sottoclasse di"
|
|
205
|
+
},
|
|
206
|
+
"semantics_hide_annotations": "Nascondi le annotazioni della foto",
|
|
207
|
+
"semantics_tags_picture": "Etichette della foto",
|
|
208
|
+
"semantics_show_annotations": "Mostra le annotazioni della foto",
|
|
209
|
+
"semantics_annotation_tooltip": "Clicca per vedere i dettagli",
|
|
210
|
+
"semantics_tags_picture_none": "Non è stata ancora aggiunta alcuna etichetta su questa foto.",
|
|
211
|
+
"semantics_qualifiers": "Qualificatori",
|
|
212
|
+
"metadata_location_coordinates": "Coordinate (longitudine, latitudine)",
|
|
213
|
+
"metadata_location_copy": "Copia {v}",
|
|
214
|
+
"metadata_location_copy_more": "Ulteriori opzioni per la copia delle coordinate",
|
|
215
|
+
"whats_panoramax": "Panoramax è la geo-commons per le foto dei territori.",
|
|
216
|
+
"panoramax": "Panoramax",
|
|
217
|
+
"semantics_zero_annotations": "Nessuna annotazione impostata per questa immagine",
|
|
218
|
+
"semantics_hashtags": "Hashtag dell’immagine",
|
|
219
|
+
"semantics_editor_error": "La sintassi non è valida. Le tue etichette devono avere la seguente forma:\nchiave=valore\nprefisso|chiave=valore\nprefisso|chiave[qualif_chiave=qualif_valore]=valore\n\nLa lunghezza massima di una chiave è di 256 caratteri, quella di un valore è di 2048 caratteri."
|
|
189
220
|
},
|
|
190
221
|
"psv": {
|
|
191
222
|
"loadError": "Impossibile caricare l’immagine panoramica",
|
|
@@ -201,7 +232,7 @@
|
|
|
201
232
|
"thumbnail": "Miniatura della foto passata con il mouse",
|
|
202
233
|
"not_public": "Non pubblicamente visibile",
|
|
203
234
|
"slow_loading": "La mappa impiega troppo tempo a caricarsi e potrebbe apparire a pezzi",
|
|
204
|
-
"map_data": "Dati cartografici:",
|
|
235
|
+
"map_data": "Dati cartografici: {m}",
|
|
205
236
|
"more_panoramax": "Per saperne di più su Panoramax"
|
|
206
237
|
}
|
|
207
238
|
}
|
package/src/translations/nl.json
CHANGED
|
@@ -79,7 +79,9 @@
|
|
|
79
79
|
"🤖 Semantiek aanleren",
|
|
80
80
|
"🎨 Interface herontwerpen",
|
|
81
81
|
"📅 Fotomappingparty's plannen",
|
|
82
|
-
"🧀 Kazen laten rijpen"
|
|
82
|
+
"🧀 Kazen laten rijpen",
|
|
83
|
+
"🌄 Prachtige zonneschijn berekenen",
|
|
84
|
+
"🌊 Meten van het hoogwater"
|
|
83
85
|
],
|
|
84
86
|
"share_rss_title": "RSS-feed van nieuwe reeksen in het nu zichtbare kaartgebied",
|
|
85
87
|
"josm_live": "Schakel JOSM automatische synchronisatie in bij het laden van afbeeldingen",
|
|
@@ -114,9 +116,9 @@
|
|
|
114
116
|
"metadata": "Metadata van de foto",
|
|
115
117
|
"metadata_camera_make": "Fabrikant",
|
|
116
118
|
"filter_date": "Datum",
|
|
117
|
-
"filter_zoom_in": "Zoom in om
|
|
119
|
+
"filter_zoom_in": "Zoom in om dit filter te zien",
|
|
118
120
|
"metadata_general_license_link": "De volledige beschrijving van de licentie bekijken",
|
|
119
|
-
"metadata_general_seqid": "
|
|
121
|
+
"metadata_general_seqid": "Serie",
|
|
120
122
|
"metadata_general_picid_link": "Ga naar de JSON-beschrijving van de foto",
|
|
121
123
|
"metadata_general_seqid_link": "Ga naar de JSON-beschrijving van de sequentie",
|
|
122
124
|
"metadata_general_author": "Auteur",
|
|
@@ -125,7 +127,7 @@
|
|
|
125
127
|
"metadata_general_license": "Licentie",
|
|
126
128
|
"error_pic": "The gevraagde foto werd niet gevonden",
|
|
127
129
|
"map_theme_age_2": "< 2 jaar",
|
|
128
|
-
"metadata_general_picid": "
|
|
130
|
+
"metadata_general_picid": "Afbeelding",
|
|
129
131
|
"metadata_general_date": "Opnamedatum",
|
|
130
132
|
"map_theme_type": "Cameratype",
|
|
131
133
|
"qualityscore_doc_1": "Panoramax toont een Kwaliteitsscore voor elke foto. Dit vergemakkelijkt filtering en laat toe om foto's van hoge kwaliteit te vinden.",
|
|
@@ -137,21 +139,21 @@
|
|
|
137
139
|
"metadata_camera_type": "Type",
|
|
138
140
|
"metadata_camera_resolution": "Resolutie",
|
|
139
141
|
"metadata_camera_focal_length": "Brandpuntsafstand",
|
|
140
|
-
"metadata_location": "
|
|
142
|
+
"metadata_location": "Positie",
|
|
141
143
|
"metadata_location_longitude": "Longitude",
|
|
142
144
|
"metadata_location_latitude": "Latitude",
|
|
143
|
-
"metadata_location_orientation": "
|
|
145
|
+
"metadata_location_orientation": "Richting",
|
|
144
146
|
"metadata_location_precision": "Nauwkeurigheid van de positionering",
|
|
145
|
-
"metadata_quality": "
|
|
147
|
+
"metadata_quality": "Kwaliteit",
|
|
146
148
|
"metadata_quality_help": "Meer weten over de Kwaliteitsscore",
|
|
147
149
|
"metadata_quality_score": "Globale score",
|
|
148
150
|
"metadata_quality_gps_score": "Positioneringsscore",
|
|
149
151
|
"metadata_quality_resolution_score": "Resolutiescore",
|
|
150
152
|
"metadata_quality_missing": "geen info in de afbeelding",
|
|
151
|
-
"metadata_exif": "EXIF
|
|
153
|
+
"metadata_exif": "EXIF",
|
|
152
154
|
"metadata_exif_name": "Tag",
|
|
153
155
|
"metadata_exif_value": "Waarde",
|
|
154
|
-
"report": "
|
|
156
|
+
"report": "Rapporteer",
|
|
155
157
|
"report_auth": "Dit rapport zal worden verstuurd met je account \"{a}\"",
|
|
156
158
|
"report_nature_label": "Aard van het probleem",
|
|
157
159
|
"report_nature": {
|
|
@@ -174,7 +176,47 @@
|
|
|
174
176
|
"report_success": "Het rapport werd succesvol verzonden. Het zal zo snel mogelijk behandeld worden.",
|
|
175
177
|
"whats_panoramax": "Panoramax is de geo-commons voor foto's van gebieden.",
|
|
176
178
|
"contribute_id": "Bijdragen aan OpenStreetMap met de iD-editor",
|
|
177
|
-
"geo_uri": "Externe app"
|
|
179
|
+
"geo_uri": "Externe app",
|
|
180
|
+
"semantics_hide_all_tags": "Verberg alle tags",
|
|
181
|
+
"semantics_key": "Sleutel",
|
|
182
|
+
"semantics_value": "Waarde",
|
|
183
|
+
"semantics_key_doc": "Meer weten over deze sleutel",
|
|
184
|
+
"semantics_value_doc": "Meer weten over deze tag",
|
|
185
|
+
"semantics_title": "Tags",
|
|
186
|
+
"semantics_tags": "{nb} tags",
|
|
187
|
+
"semantics_features": "Gedetecteerde eigenschappen",
|
|
188
|
+
"semantics_features_none": "Er is nog geen eigenschap gedetecteerd of geannoteerd in deze afbeelding.",
|
|
189
|
+
"semantics_features_default_title": "Eigenschap #{nb}",
|
|
190
|
+
"semantics_features_subtitle": "{nb} geassocieerde eigenschappen",
|
|
191
|
+
"semantics_show_all_tags": "Toon alle tags",
|
|
192
|
+
"metadata_general_instance": "Bron instance",
|
|
193
|
+
"semantics_annotation_tooltip": "Klik om details te zien",
|
|
194
|
+
"semantics_tags_picture": "Afbeelding tags",
|
|
195
|
+
"semantics_tags_picture_none": "Er zijn nog geen tags ingesteld voor deze afbeelding.",
|
|
196
|
+
"semantics_qualifiers": "Kwalificaties",
|
|
197
|
+
"semantics_show_annotations": "afbeelding-annotaties weergeven",
|
|
198
|
+
"semantics_hide_annotations": "afbeelding-annotaties verbergen",
|
|
199
|
+
"semantics_wikidata_properties": {
|
|
200
|
+
"P31": "Instance van",
|
|
201
|
+
"P279": "subklasse van",
|
|
202
|
+
"P361": "onderdeel van"
|
|
203
|
+
},
|
|
204
|
+
"metadata_exif_doc": "Documenten voor EXIF-tags",
|
|
205
|
+
"metadata_exif_doc_title": "Ga naar documentatie van Exiv2 voor volledige informatie over definities van EXIF- en XMP-tags",
|
|
206
|
+
"metadata_location_copy": "Kopieer {v}",
|
|
207
|
+
"metadata_location_copy_more": "Meer kopieeropties voor coördinaten",
|
|
208
|
+
"metadata_general_copy_picid": "Kopieer afbeelding ID",
|
|
209
|
+
"filter_date_6months": "6 maanden",
|
|
210
|
+
"picture_360_long": "Panorama afbeelding",
|
|
211
|
+
"metadata_summary": "Samenvatting",
|
|
212
|
+
"metadata_general_copy_id": "Kopieer ID",
|
|
213
|
+
"picture_flat_long": "Klassieke afbeelding",
|
|
214
|
+
"metadata_location_coordinates": "Coördinaten (lengtegraad, breedtegraad)",
|
|
215
|
+
"picture_all": "Alles",
|
|
216
|
+
"semantics_zero_annotations": "Geen annotatie op deze afbeelding",
|
|
217
|
+
"semantics_hashtags": "Foto-hashtags",
|
|
218
|
+
"panoramax": "Panoramax",
|
|
219
|
+
"semantics_editor_error": "De syntax is ongeldig. Je tags moeten eruit zien als:\nsleutel=waarde\nprefix|sleutel=waarde\nprefix|sleutel[qualif_sleutel=qualif_waarde]=waarde\n\nMaximale lengte van de sleutel: 256 karakters, maximale lengte van de waarde: 2048 karakters."
|
|
178
220
|
},
|
|
179
221
|
"psv": {
|
|
180
222
|
"twoFingers": "Gebruik twee vingers om te navigeren",
|
|
@@ -190,7 +232,7 @@
|
|
|
190
232
|
"slow_loading": "De kaart laadt traag en kan er gebroken uitzien",
|
|
191
233
|
"thumbnail": "Thumbnail van de aangeduide foto",
|
|
192
234
|
"not_public": "Niet openbaar zichtbaar",
|
|
193
|
-
"map_data": "Kaartdata:",
|
|
235
|
+
"map_data": "Kaartdata: {m}",
|
|
194
236
|
"more_panoramax": "Meer weten over Panoramax"
|
|
195
237
|
}
|
|
196
238
|
}
|
|
@@ -190,7 +190,34 @@
|
|
|
190
190
|
"metadata_exif_doc_title": "請參閱 Exiv2 文件以取得 EXIF 和 XMP 標籤定義的完整說明",
|
|
191
191
|
"metadata_location_coordinates": "座標 (經度, 緯度)",
|
|
192
192
|
"metadata_location_copy": "複製 {v}",
|
|
193
|
-
"metadata_location_copy_more": "更多座標複製選項"
|
|
193
|
+
"metadata_location_copy_more": "更多座標複製選項",
|
|
194
|
+
"semantics_title": "標籤",
|
|
195
|
+
"semantics_tags": "{nb} 個標籤",
|
|
196
|
+
"semantics_show_annotations": "顯示相片標註",
|
|
197
|
+
"semantics_show_all_tags": "顯示所有標籤",
|
|
198
|
+
"semantics_key": "索引鍵",
|
|
199
|
+
"semantics_annotation_tooltip": "點擊查看詳情",
|
|
200
|
+
"semantics_features_default_title": "特徵 #{nb}",
|
|
201
|
+
"semantics_features_subtitle": "{nb} 個關聯的屬性",
|
|
202
|
+
"semantics_hide_all_tags": "隱藏所有標籤",
|
|
203
|
+
"semantics_features_none": "此相片尚未檢測到或註釋任何特徵。",
|
|
204
|
+
"semantics_value": "值",
|
|
205
|
+
"semantics_tags_picture_none": "此相片尚未加上任何標籤。",
|
|
206
|
+
"semantics_tags_picture": "相片標籤",
|
|
207
|
+
"whats_panoramax": "Panoramax 是各地相片的地理共享資源。",
|
|
208
|
+
"semantics_features": "偵測到的特徵",
|
|
209
|
+
"semantics_key_doc": "深入了解此索引鍵",
|
|
210
|
+
"semantics_value_doc": "深入了解此標籤",
|
|
211
|
+
"semantics_qualifiers": "限定條件",
|
|
212
|
+
"semantics_hide_annotations": "隱藏相片標註",
|
|
213
|
+
"semantics_zero_annotations": "此相片尚未加上任何標註",
|
|
214
|
+
"semantics_hashtags": "相片主題標籤",
|
|
215
|
+
"semantics_wikidata_properties": {
|
|
216
|
+
"P31": "隸屬於",
|
|
217
|
+
"P279": "上級分類",
|
|
218
|
+
"P361": "所屬實體"
|
|
219
|
+
},
|
|
220
|
+
"panoramax": "Panoramax"
|
|
194
221
|
},
|
|
195
222
|
"map": {
|
|
196
223
|
"loading": "正在載入…",
|
|
@@ -198,7 +225,7 @@
|
|
|
198
225
|
"thumbnail": "遊標懸停相片的縮圖",
|
|
199
226
|
"slow_loading": "地圖載入速度緩慢而且可能出現損壞",
|
|
200
227
|
"more_panoramax": "深入了解 Panoramax",
|
|
201
|
-
"map_data": "地圖資料:"
|
|
228
|
+
"map_data": "地圖資料: {m}"
|
|
202
229
|
},
|
|
203
230
|
"psv": {
|
|
204
231
|
"ctrlZoom": "使用 CTRL + 滑鼠滾輪縮放圖片",
|
package/src/utils/API.js
CHANGED
|
@@ -369,6 +369,22 @@ export default class API extends EventTarget {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Get the withCredentials function for PhotoSphereViewer to handle fetch credentials parameter.
|
|
374
|
+
* @memberOf Panoramax.utils.API#
|
|
375
|
+
* @private
|
|
376
|
+
* @returns {function} The withCredentials function
|
|
377
|
+
*/
|
|
378
|
+
_getPSVWithCredentials() {
|
|
379
|
+
const fetchOpts = this._getFetchOptions();
|
|
380
|
+
if(fetchOpts.credentials === "include") {
|
|
381
|
+
return (url) => url.startsWith(this._endpoint);
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
return undefined;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
372
388
|
/**
|
|
373
389
|
* Get sequence GeoJSON representation
|
|
374
390
|
* @memberOf Panoramax.utils.API#
|
|
@@ -738,7 +754,7 @@ export default class API extends EventTarget {
|
|
|
738
754
|
return fetch(this._endpoints.user_search.replace(/\/search$/, `/${userId}`), this._getFetchOptions())
|
|
739
755
|
.then(res => res.json())
|
|
740
756
|
.then(res => {
|
|
741
|
-
return res?.name || null;
|
|
757
|
+
return res?.label || res?.name || null;
|
|
742
758
|
});
|
|
743
759
|
}
|
|
744
760
|
|
|
@@ -15,7 +15,7 @@ const MAPLIBRE_OPTIONS = [
|
|
|
15
15
|
"boxZoom", "clickTolerance", "collectResourceTiming",
|
|
16
16
|
"cooperativeGestures", "crossSourceCollisions", "doubleClickZoom", "dragPan",
|
|
17
17
|
"dragRotate", "fadeDuration", "failIfMajorPerformanceCaveat", "fitBoundsOptions",
|
|
18
|
-
"hash", "interactive", "
|
|
18
|
+
"hash", "interactive", "localIdeographFontFamily", "locale", "logoPosition",
|
|
19
19
|
"maplibreLogo", "maxBounds", "maxCanvasSize", "maxPitch", "maxTileCacheSize",
|
|
20
20
|
"maxTileCacheZoomLevels", "maxZoom", "minPitch", "minZoom", "pitch", "pitchWithRotate",
|
|
21
21
|
"pixelRatio", "preserveDrawingBuffer", "refreshExpiredTiles", "renderWorldCopies",
|
|
@@ -64,7 +64,7 @@ export default class InitParameters { // eslint-disable-line import/no-unused-mo
|
|
|
64
64
|
let psv_nav = urlParams.nav || componentPsv?.picturesNavigation;
|
|
65
65
|
let map_theme = urlParams.theme || browserMap?.theme || componentMap.theme;
|
|
66
66
|
let map_background = urlParams.background || browserMap?.background || componentMap.background;
|
|
67
|
-
let map_center = urlMap?.center || browserMap?.center || componentMap.center;
|
|
67
|
+
let map_center = urlMap?.center || (!picture && (browserMap?.center || componentMap.center)) || [0,0];
|
|
68
68
|
let map_zoom = urlMap?.zoom || browserMap?.zoom || componentMap.zoom;
|
|
69
69
|
let map_pitch = urlMap?.pitch || componentMap.pitch;
|
|
70
70
|
let map_bearing = urlMap?.bearing || componentMap.bearing;
|
|
@@ -80,6 +80,7 @@ export default class InitParameters { // eslint-disable-line import/no-unused-mo
|
|
|
80
80
|
let map_raster = componentMap.raster;
|
|
81
81
|
let map_attribution = componentMap.attributionControl;
|
|
82
82
|
let map_others = filterMapLibreOptions(componentMap);
|
|
83
|
+
let keyboardShortcuts = componentAttrs["keyboard-shortcuts"];
|
|
83
84
|
|
|
84
85
|
// - URL only
|
|
85
86
|
let psv_xyz = urlParams.xyz;
|
|
@@ -88,6 +89,7 @@ export default class InitParameters { // eslint-disable-line import/no-unused-mo
|
|
|
88
89
|
let map_pic_type = urlParams.pic_type;
|
|
89
90
|
let map_camera = urlParams.camera;
|
|
90
91
|
let map_pic_score = urlParams.pic_score;
|
|
92
|
+
let psv_xywh = urlParams.xywh;
|
|
91
93
|
|
|
92
94
|
// Check coherence
|
|
93
95
|
if(!["map", "pic"].includes(focus)) {
|
|
@@ -108,24 +110,26 @@ export default class InitParameters { // eslint-disable-line import/no-unused-mo
|
|
|
108
110
|
|
|
109
111
|
// Put all attributes in appropriate container
|
|
110
112
|
this._parentInit = { map, users, fetchOptions, style, lang, endpoint };
|
|
111
|
-
this._parentPostInit = { focus, picture, sequence, geocoder, widgets, forceFocus: true };
|
|
113
|
+
this._parentPostInit = { focus, picture, sequence, geocoder, widgets, forceFocus: true, keyboardShortcuts: true };
|
|
112
114
|
|
|
113
115
|
this._psvInit = Object.fromEntries(
|
|
114
116
|
Object.entries(componentPsv).filter(
|
|
115
117
|
([k,]) => !["transitionDuration", "picturesNavigation"].includes(k)
|
|
116
118
|
)
|
|
117
119
|
);
|
|
120
|
+
|
|
118
121
|
this._psvAny = {
|
|
119
122
|
transitionDuration: psv_speed,
|
|
120
123
|
picturesNavigation: psv_nav,
|
|
121
124
|
};
|
|
122
|
-
this._psvPostInit = { xyz: psv_xyz };
|
|
125
|
+
this._psvPostInit = { xyz: psv_xyz, xywh: psv_xywh };
|
|
123
126
|
|
|
124
127
|
this._mapInit = {
|
|
125
128
|
raster: map_raster,
|
|
126
129
|
attributionControl: map_attribution,
|
|
127
130
|
...map_others
|
|
128
131
|
};
|
|
132
|
+
|
|
129
133
|
this._mapAny = {
|
|
130
134
|
theme: map_theme,
|
|
131
135
|
background: map_background,
|
|
@@ -142,6 +146,13 @@ export default class InitParameters { // eslint-disable-line import/no-unused-mo
|
|
|
142
146
|
camera: map_camera,
|
|
143
147
|
pic_score: map_pic_score,
|
|
144
148
|
};
|
|
149
|
+
|
|
150
|
+
if(keyboardShortcuts === "false") {
|
|
151
|
+
this._psvInit.keyboard = false;
|
|
152
|
+
this._psvInit.keyboardActions = {};
|
|
153
|
+
this._mapInit.keyboard = false;
|
|
154
|
+
this._parentPostInit.keyboardShortcuts = false;
|
|
155
|
+
}
|
|
145
156
|
}
|
|
146
157
|
|
|
147
158
|
/**
|
|
@@ -270,6 +281,28 @@ export function xyzParamToPSVPosition(str) {
|
|
|
270
281
|
else { return null; }
|
|
271
282
|
}
|
|
272
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Extracts from string xywh position
|
|
286
|
+
* @param {string} str The xywh position as hash string
|
|
287
|
+
* @param {object} [picmeta] The current picture metadata, used to compute zoom based on image size
|
|
288
|
+
* @returns {object} { textureX, textureY, z }
|
|
289
|
+
* @private
|
|
290
|
+
*/
|
|
291
|
+
function xywhParamToPSVPosition(str, picmeta) {
|
|
292
|
+
const loc = (str || "").split(",");
|
|
293
|
+
if (loc.length === 4 && !loc.some(v => isNaN(v))) {
|
|
294
|
+
const size = picmeta?.properties?.["pers:interior_orientation"]?.sensor_array_dimensions;
|
|
295
|
+
const res = {
|
|
296
|
+
textureX: +loc[0] + loc[2] / 2,
|
|
297
|
+
textureY: +loc[1] + loc[3] / 2,
|
|
298
|
+
z: size && size.length == 2 ? (1 - (((loc[2] / size[0]) + (loc[3] / size[1])) / 2)) * 75 : null,
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
return res;
|
|
302
|
+
}
|
|
303
|
+
else { return null; }
|
|
304
|
+
}
|
|
305
|
+
|
|
273
306
|
/**
|
|
274
307
|
* Extracts from hash parsed keys all map filters values
|
|
275
308
|
* @param {*} vals Hash keys
|
|
@@ -305,6 +338,15 @@ export function alterPSVState(psv, params) {
|
|
|
305
338
|
}, {once: true});
|
|
306
339
|
}
|
|
307
340
|
|
|
341
|
+
// Change xywh position
|
|
342
|
+
if(params.xywh) {
|
|
343
|
+
psv.addEventListener("picture-loaded", () => {
|
|
344
|
+
const coords = xywhParamToPSVPosition(params.xywh, psv.getPictureMetadata());
|
|
345
|
+
psv.rotate(coords);
|
|
346
|
+
psv.zoom(coords.z);
|
|
347
|
+
}, {once: true});
|
|
348
|
+
}
|
|
349
|
+
|
|
308
350
|
// Change transitionDuration
|
|
309
351
|
let td = params.transitionDuration || params.speed;
|
|
310
352
|
if(td !== undefined) {
|