@abi-software/flatmap-viewer 2.4.0-a.1 → 2.4.0-a.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/README.rst CHANGED
@@ -38,7 +38,7 @@ The map server endpoint is specified as ``MAP_ENDPOINT`` in ``src/main.js``. It
38
38
  Package Installation
39
39
  ====================
40
40
 
41
- * ``npm install @abi-software/flatmap-viewer@2.4.0-a.1``
41
+ * ``npm install @abi-software/flatmap-viewer@2.4.0-a.2``
42
42
 
43
43
  Documentation
44
44
  -------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmap-viewer",
3
- "version": "2.4.0-a.1",
3
+ "version": "2.4.0-a.2",
4
4
  "description": "Flatmap viewer using Maplibre GL",
5
5
  "repository": "https://github.com/AnatomicMaps/flatmap-viewer.git",
6
6
  "main": "src/main.js",
@@ -60,8 +60,9 @@ class FlatMap
60
60
  this._baseUrl = mapBaseUrl;
61
61
  this.__id = mapDescription.id;
62
62
  this.__uuid = mapDescription.uuid;
63
- this._details = mapDescription.details;
64
- this._created = mapDescription.created;
63
+ this.__details = mapDescription.details;
64
+ this.__provenance = mapDescription.provenance;
65
+ this.__created = mapDescription.created;
65
66
  this.__taxon = mapDescription.taxon;
66
67
  this.__biologicalSex = mapDescription.biologicalSex;
67
68
  this._mapNumber = mapDescription.number;
@@ -424,7 +425,7 @@ class FlatMap
424
425
  get created()
425
426
  //===========
426
427
  {
427
- return this._created;
428
+ return this.__created;
428
429
  }
429
430
 
430
431
  /**
@@ -460,7 +461,18 @@ class FlatMap
460
461
  get details()
461
462
  //===========
462
463
  {
463
- return this._details;
464
+ return this.__details;
465
+ }
466
+
467
+ /**
468
+ * The map's provenance as returned from the map server.
469
+ *
470
+ * @type Object
471
+ */
472
+ get provenance()
473
+ //==============
474
+ {
475
+ return this.__provenance;
464
476
  }
465
477
 
466
478
  /**
@@ -958,6 +970,7 @@ class FlatMap
958
970
  'models',
959
971
  'nodeId',
960
972
  'source',
973
+ 'taxon',
961
974
  'hyperlinks'
962
975
  ];
963
976
  const jsonProperties = [
@@ -1405,6 +1418,10 @@ export class MapManager
1405
1418
 
1406
1419
  const annotations = await this._mapServer.loadJSON(`flatmap/${mapId}/annotations`);
1407
1420
 
1421
+ // Get the map's provenance
1422
+
1423
+ const provenance = await this._mapServer.loadJSON(`flatmap/${mapId}/metadata`);
1424
+
1408
1425
  // Get additional marker details for the map
1409
1426
 
1410
1427
  const mapMarkers = await this._mapServer.loadJSON(`flatmap/${mapId}/markers`);
@@ -1458,6 +1475,7 @@ export class MapManager
1458
1475
  annotations: annotations,
1459
1476
  number: this._mapNumber,
1460
1477
  pathways: pathways,
1478
+ provenance, provenance,
1461
1479
  callback: callback
1462
1480
  },
1463
1481
  resolve);
package/src/main.js CHANGED
@@ -62,7 +62,6 @@ export async function standaloneViewer(map_endpoint=null, options={})
62
62
  showId: true,
63
63
  showPosition: false,
64
64
  standalone: true,
65
- annotator: true
66
65
  }, options);
67
66
 
68
67
  function loadMap(id, taxon, sex)