1.3.0 • Published 8 months ago

@osmcha/maplibre-adiff-viewer v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

maplibre-adiff-viewer

A MapLibre GL JS plugin to visualize OpenStreetMap augmented diff files on a map in the browser, in the manner of osmcha.org.

Installation

npm install @osmcha/maplibre-adiff-viewer

Usage

import maplibre from "maplibre-gl";
import adiffParser from "@osmcha/osm-adiff-parser";
import { MapLibreAugmentedDiffViewer } from "@osmcha/maplibre-adiff-viewer";

let map = new maplibre.Map({ /* configure your map here */ });

let adiff = await adiffParser(augmentedDiffXmlString); // parse your augmented diff XML
let adiffViewer = new MapLibreAugmentedDiffViewer(adiff); // initialize the plugin

map.once("load", () => adiffViewer.addTo(map)); // add the plugin to the map

License

This code is available under the ISC License. See the LICENSE file for details.

1.3.0

8 months ago

1.2.1

8 months ago

1.2.0

8 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago