# @wsdot/metadata-list

> Creates an HTML list of metadata links using WSDOT's metadata SOE

Latest version **0.1.0** (published 2018-05-01) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install @wsdot/metadata-list
pnpm add @wsdot/metadata-list
yarn add @wsdot/metadata-list
bun add @wsdot/metadata-list
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-05-01 |
| First published | 2018-04-23 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | WSDOT |
| Maintainers | jeff-jacobson |

## Links

- npm: https://www.npmjs.com/package/@wsdot/metadata-list
- Repository: https://github.com/WSDOT-GIS/metadata-list
- npm.io page: https://npm.io/package/@wsdot/metadata-list

## Recent versions

- 0.1.0 (latest) — 2018-05-01
- 0.0.2 — 2018-04-24
- 0.0.1 — 2018-04-23

## README

metadata-list
=============

Creates an HTML list of links to metadata documents associated with the operational layers in a web map.

This module is for use with map services that have [Layer Metadata SOE] installed and enabled.

Installation
------------

Package can be installed with an npm client (e.g., npm or yarn)

```console
npm add --save @wsdot/metadata-list @esri/arcgis-rest-auth @esri/arcgis-rest-common-types @esri/arcgis-rest-items @esri/arcgis-rest-request
```

or

```console
yarn add @wsdot/metadata-list @esri/arcgis-rest-auth @esri/arcgis-rest-common-types @esri/arcgis-rest-items @esri/arcgis-rest-request
```

Usage
-----

```TypeScript
import { createList, getWebMap } from "@wsdot/metadata-list";

/**
 * Starts the code for the demo page.
 */
function start() {
  // Parse ArcGIS Online webmap ID from "map" search parameter.
  const url = new URL(location.href);
  const { searchParams } = url;
  const mapId = searchParams.get("map");

  if (mapId) {
    // Get operational layers' metadata links and display in a list.
    getWebMap(mapId).then(webmap => {
      if (webmap.operationalLayers && webmap.operationalLayers.length) {
        const list = createList(webmap);
        document.body.appendChild(list);
      } else {
        const p = document.createElement("p");
        p.textContent = "This map does not have any operational layers.";
        document.body.appendChild(p);
      }
    });
  }
}

start();
```

[Layer Metadata SOE]:https://github.com/WSDOT-GIS/LayerMetadataSoe

---
_Source: https://npm.io/package/@wsdot/metadata-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
