Skip to content

EOX-A/ol-maplibre-layer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MapLibre OpenLayers layer

Render a MapLibre GL JS map as an OpenLayers layer.

Installation

npm i @geoblocks/ol-maplibre-layer

Code example

import MapLibreLayer from '@geoblocks/ol-maplibre-layer';

const layer = new MapLibreLayer({
  opacity: 0.7,
  maplibreOptions: {
    style: 'https://www.example.com/path/to/style.json',
  }
});

// ...
map.addLayer(layer);

All the properties passed to the construction (except maplibreOptions) are used to create the OpenLayers layer. maplibreOptions is used to create the MapLibre map.

Live examples

Basic example

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%