@panoramax/web-viewer 4.4.0-develop-0a8e1733 → 4.4.0-develop-b3d8cc82
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 +1 -1
- package/build/index.js.map +1 -1
- package/build/photoviewer.js +1 -1
- package/docs/reference/components/core/CoverageMap.md +1 -0
- package/docs/tutorials/migrate_v5.md +4 -2
- package/package.json +1 -1
- package/src/components/core/CoverageMap.js +21 -1
|
@@ -65,6 +65,7 @@ Component properties.
|
|
|
65
65
|
| [map-style] | <code>string</code> \| <code>object</code> | The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/), or a URL string pointing to one. Defaults to OSM vector tiles. |
|
|
66
66
|
| [lang] | <code>string</code> | To override language used for labels. Defaults to using user's preferred languages. |
|
|
67
67
|
| [map-options] | <code>object</code> | [Any map option available in Map class](../ui/Map.md/#Panoramax.components.ui.Map).<br />Example: `map-options='{"bounds": [[-73.9876, 40.7661], [-73.9397, 40.8002]]}'` |
|
|
68
|
+
| [user] | <code>string</code> | To filter on a specific user UUID |
|
|
68
69
|
|
|
69
70
|
<a name="Panoramax.components.core.Basic+onceReady"></a>
|
|
70
71
|
|
|
@@ -26,15 +26,17 @@ On [Viewer](../reference/components/core/Viewer.md), pictures and sequences from
|
|
|
26
26
|
- `metacatalog="false"` to only display your API data (previous behaviour)
|
|
27
27
|
- `metacatalog="https://another-metacatalog.org"` to use another server than public metacatalog
|
|
28
28
|
|
|
29
|
-
#### `users` ➡️ `endpoint-to-use`
|
|
29
|
+
#### `users` ➡️ `endpoint-to-use` / `user`
|
|
30
30
|
|
|
31
|
-
The `users` parameter has been removed from all core components. Instead, for
|
|
31
|
+
The `users` parameter has been removed from all core components. Instead, for __Viewer__, you can select by default which Panoramax _endpoint_ should be used. It's either your local API, metacatalog, or a single user from or another server. This is done using `endpoint-to-use` parameter:
|
|
32
32
|
|
|
33
33
|
- `endpoint-to-use="default"` for your local API
|
|
34
34
|
- `endpoint-to-use="metacatalog"` for metacatalog (if not set to `metacatalog="false"`)
|
|
35
35
|
- `endpoint-to-use="890b6268-7716-4e34-ada9-69985e6c1657"` for any specific user UUID (from your local API)
|
|
36
36
|
- `endpoint-to-use="metacatalog_890b6268-7716-4e34-ada9-69985e6c1657"` for any specific user UUID from metacatalog
|
|
37
37
|
|
|
38
|
+
For __CoverageMap__, `users` parameter is replaced by `user`, and only can take a single user UUID at a time.
|
|
39
|
+
|
|
38
40
|
### 👂 Events
|
|
39
41
|
|
|
40
42
|
Various events have been changed in favor of _MapStyleComposer_ ones:
|
package/package.json
CHANGED
|
@@ -43,10 +43,12 @@ export default class CoverageMap extends Basic {
|
|
|
43
43
|
* @property {string|object} [map-style] The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/), or a URL string pointing to one. Defaults to OSM vector tiles.
|
|
44
44
|
* @property {string} [lang] To override language used for labels. Defaults to using user's preferred languages.
|
|
45
45
|
* @property {object} [map-options] [Any map option available in Map class](#Panoramax.components.ui.Map).<br />Example: `map-options='{"bounds": [[-73.9876, 40.7661], [-73.9397, 40.8002]]}'`
|
|
46
|
+
* @property {string} [user] To filter on a specific user UUID
|
|
46
47
|
*/
|
|
47
48
|
static properties = {
|
|
48
49
|
"map-options": {converter: Basic.GetJSONConverter()},
|
|
49
50
|
"map-style": {type: String},
|
|
51
|
+
user: {type: String},
|
|
50
52
|
...Basic.properties
|
|
51
53
|
};
|
|
52
54
|
|
|
@@ -68,11 +70,29 @@ export default class CoverageMap extends Basic {
|
|
|
68
70
|
this.onceAPIReady().then(() => {
|
|
69
71
|
this.loader.setAttribute("value", 30);
|
|
70
72
|
this._initParams = new InitParameters(InitParameters.GetComponentProperties(CoverageMap, this));
|
|
71
|
-
this.
|
|
73
|
+
const singleUser = this.user && this.user != "";
|
|
74
|
+
this.mapStyleComposer._createPanoramaxEndpointFromAPI("default", this.api, !singleUser);
|
|
75
|
+
if(singleUser) {
|
|
76
|
+
this.mapStyleComposer._createPanoramaxEndpointForUser(this.user);
|
|
77
|
+
}
|
|
72
78
|
this._initMap();
|
|
73
79
|
});
|
|
74
80
|
}
|
|
75
81
|
|
|
82
|
+
/** @private */
|
|
83
|
+
attributeChangedCallback(name, _old, value) {
|
|
84
|
+
super.attributeChangedCallback(name, _old, value);
|
|
85
|
+
|
|
86
|
+
if(name === "user" && this.api?._isReady === 1) {
|
|
87
|
+
if(value && value != "") {
|
|
88
|
+
this.mapStyleComposer._createPanoramaxEndpointForUser(value);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
this.mapStyleComposer.switchPanoramaxEndpoint("default");
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
76
96
|
/** @private */
|
|
77
97
|
disconnectedCallback() {
|
|
78
98
|
super.disconnectedCallback();
|