@terrestris/vectortiles

0.4.0 • Public • Published

terrestris vectortiles

A simple library that makes use of free available world-wide terrestris vectortiles in MapBox MVT format from OpenStreetMap data.

The main method getOSMLayer creates an openlayers VectorTile Layer, which you can use straight in your openlayers application.

example

demo

A simple demonstration application can be found here:

https://demo.terrestris.de/democlient/index.html

how to use

Install the module e.g. by

npm i @terrestris/vectortiles

Then, in your code, import as follows:

import terrestrisVectorTiles from '@terrestris/vectortiles';

Then you can create the OSM-VectorTile layer by calling

const layer = new terrestrisVectorTiles();

or with custom configuration and style:

const layer = new terrestrisVectorTiles({
    declutter: false,
    usePlacesLabels: false,
    style_roads: [{
        ...
    }]
});

Package Sidebar

Install

npm i @terrestris/vectortiles

Weekly Downloads

86

Version

0.4.0

License

BSD-2-Clause

Unpacked Size

78.9 kB

Total Files

19

Last publish

Collaborators

  • jansule
  • annarieger
  • terrestris-info
  • marcjansen
  • kaivolland
  • dnlkoch
  • ahennr
  • buehner
  • hwbllmnn
  • lukaslohoff
  • mholthausen
  • sgoetsch
  • jorzekowsky
  • simonseyock
  • hblitza
  • jweskamm
  • unraveler