@panoramax/web-viewer 4.0.3-develop-001b0de1 → 4.0.3-develop-885abb56

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.
@@ -17,7 +17,7 @@
17
17
  * [.onceLayerReady(layerId)](#Panoramax.components.ui.Map+onceLayerReady) ⇒ <code>Promise</code>
18
18
  * [.setVisibleUsers(visibleIds)](#Panoramax.components.ui.Map+setVisibleUsers)
19
19
  * [.filterUserLayersContent(dataType, filter)](#Panoramax.components.ui.Map+filterUserLayersContent)
20
- * [.displayPictureMarker(lon, lat, heading, [skipCenter])](#Panoramax.components.ui.Map+displayPictureMarker)
20
+ * [.displayPictureMarker(lon, lat, heading, [skipCenter], [picId])](#Panoramax.components.ui.Map+displayPictureMarker)
21
21
  * [.reloadLayersStyles()](#Panoramax.components.ui.Map+reloadLayersStyles)
22
22
  * [.addEventListener(type, listener)](#Panoramax.components.ui.Map+addEventListener)
23
23
  * [.setVisibleUsers(visibleIds)](#Panoramax.components.ui.Map+setVisibleUsers)
@@ -148,7 +148,7 @@ Filter the visible data content in all visible map layers
148
148
 
149
149
  <a name="Panoramax.components.ui.Map+displayPictureMarker"></a>
150
150
 
151
- ### map.displayPictureMarker(lon, lat, heading, [skipCenter])
151
+ ### map.displayPictureMarker(lon, lat, heading, [skipCenter], [picId])
152
152
  Shows on map a picture position and heading.
153
153
 
154
154
  **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
@@ -17,7 +17,7 @@
17
17
  * [.onceLayerReady(layerId)](Map.md/#Panoramax.components.ui.Map+onceLayerReady) ⇒ <code>Promise</code>
18
18
  * [.setVisibleUsers(visibleIds)](Map.md/#Panoramax.components.ui.Map+setVisibleUsers)
19
19
  * [.filterUserLayersContent(dataType, filter)](Map.md/#Panoramax.components.ui.Map+filterUserLayersContent)
20
- * [.displayPictureMarker(lon, lat, heading, [skipCenter])](#Panoramax.components.ui.Map+displayPictureMarker)
20
+ * [.displayPictureMarker(lon, lat, heading, [skipCenter], [picId])](#Panoramax.components.ui.Map+displayPictureMarker)
21
21
  * [.reloadLayersStyles()](Map.md/#Panoramax.components.ui.Map+reloadLayersStyles)
22
22
  * [.addEventListener(type, listener)](Map.md/#Panoramax.components.ui.Map+addEventListener)
23
23
  * ["filters-changed"](#Panoramax.components.ui.MapMore+event_filters-changed)
@@ -148,7 +148,7 @@ Filter the visible data content in all visible map layers
148
148
 
149
149
  <a name="Panoramax.components.ui.Map+displayPictureMarker"></a>
150
150
 
151
- ### mapMore.displayPictureMarker(lon, lat, heading, [skipCenter])
151
+ ### mapMore.displayPictureMarker(lon, lat, heading, [skipCenter], [picId])
152
152
  Shows on map a picture position and heading.
153
153
 
154
154
  **Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "4.0.3-develop-001b0de1",
3
+ "version": "4.0.3-develop-885abb56",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -250,6 +250,7 @@ export default class Editor extends Basic {
250
250
  "type": "FeatureCollection",
251
251
  "features": [
252
252
  {
253
+ "id": this.sequence,
253
254
  "type": "Feature",
254
255
  "properties": {
255
256
  "id": this.sequence,
@@ -421,8 +421,9 @@ export default class Map extends maplibregl.Map {
421
421
  * @param {number} lat The latitude
422
422
  * @param {number} heading The heading
423
423
  * @param {boolean} [skipCenter=false] Set to true to avoid map centering on marker
424
+ * @param {string} picId The picture Id
424
425
  */
425
- displayPictureMarker(lon, lat, heading, skipCenter = false) {
426
+ displayPictureMarker(lon, lat, heading, skipCenter = false, picId = null) {
426
427
  this._picMarkerPreview.remove();
427
428
 
428
429
  // Show marker corresponding to selection
@@ -431,6 +432,7 @@ export default class Map extends maplibregl.Map {
431
432
  .setLngLat([lon, lat])
432
433
  .setRotation(heading)
433
434
  .addTo(this);
435
+ this._picMarker.picId = picId ;
434
436
  }
435
437
  else {
436
438
  this._picMarker.remove();
@@ -880,7 +882,8 @@ export default class Map extends maplibregl.Map {
880
882
  img.src = selected ? MarkerSelectedSVG : MarkerBaseSVG;
881
883
  img.alt = "";
882
884
  return new maplibregl.Marker({
883
- element: img
885
+ element: img,
886
+ picId: null
884
887
  });
885
888
  }
886
889
 
package/src/utils/map.js CHANGED
@@ -408,7 +408,7 @@ export function linkMapAndPhoto(parent) {
408
408
  }
409
409
  }
410
410
  else {
411
- parent.map.displayPictureMarker(e.detail.lon, e.detail.lat, parent.psv.getXY().x, e.detail.first);
411
+ parent.map.displayPictureMarker(e.detail.lon, e.detail.lat, parent.psv.getXY().x, e.detail.first, e.detail.picId);
412
412
  if(parent?.isMapWide?.()) {
413
413
  parent?.mini?.removeAttribute("collapsed");
414
414
  }