Skip to content

Installation ​

Universal Layer Manager consists of a core library @ulm/core and adapters for specific map libraries. Install the core package, then add an adapter for the map library you are using.

Core ​

sh
npm install @ulm/core
sh
pnpm add @ulm/core
sh
yarn add @ulm/core

Dates for time info ​

You only need this if your layers carry time info. Dates are Temporal values, and not every browser supports Temporal yet, so install the polyfill as well:

sh
npm install temporal-polyfill
sh
pnpm add temporal-polyfill
sh
yarn add temporal-polyfill

Then import Temporal from it wherever you create dates:

ts
import { Temporal } from 'temporal-polyfill';

The TypeScript types come with @ulm/core, so there is nothing else to install.

Adapters ​

Leaflet ​

sh
npm install @ulm/leaflet leaflet
sh
pnpm add @ulm/leaflet leaflet
sh
yarn add @ulm/leaflet leaflet

If you are using TypeScript, also install @types/leaflet.

Other map libraries ​

Leaflet is the only adapter we provide at the moment. For other map libraries, you can write your own adapter.

From a local clone ​

To run the examples or contribute, clone the repository and build it:

sh
git clone https://github.com/antarctica/universal-layer-manager.git
cd universal-layer-manager
npm install
npm run build
npm run dev   # start the examples

Released under the MIT License.