@hotosm/underpass-ui

0.1.6 • Public • Published

Underpass UI

A set of UI components for Underpass.

Install

yarn add @hotosm/underpass-ui

Usage

Include the styles file on your CSS:

@import "@hotosm/underpass-ui/dist/index.css";

You can also add this if you want a full view height map:

.maplibregl-map {
  height: 100vh;
}

And then use the components:

<UnderpassMap
  center={[-79.64696, 0.95953]}
  tags="building=yes"
  highlightDataQualityIssues
/>

See the playground folder for more examples.

Configure

The default URL for the Underpass REST API is https://underpass.hotosm.org:8000 (an Underpass development server), but you can change it passing a config property:

const config = {
    API_URL: "http://localhost:8000",
    MAPBOX_TOKEN: "YOUR_TOKEN"
};

Readme

Keywords

none

Package Sidebar

Install

npm i @hotosm/underpass-ui

Weekly Downloads

5

Version

0.1.6

License

LGPL-3.0-only

Unpacked Size

281 kB

Total Files

8

Last publish

Collaborators

  • spwoodcock
  • emi420
  • rumc
  • dbenjamin_hot