New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@wsdot/metadata-list

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wsdot/metadata-list

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

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

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)

npm add --save @wsdot/metadata-list @esri/arcgis-rest-auth @esri/arcgis-rest-common-types @esri/arcgis-rest-items @esri/arcgis-rest-request

or

yarn add @wsdot/metadata-list @esri/arcgis-rest-auth @esri/arcgis-rest-common-types @esri/arcgis-rest-items @esri/arcgis-rest-request

Usage

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();

FAQs

Package last updated on 01 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts