open-index/open-npm huggingface dataset:
npm package: @geoblocks/ol-comfy
Description: Comfortable and convenient ol shortcuts for standard usage.
Author: Camptocamp SA
Latest version: 2.1.1

# ol-comfy

[![CI](https://github.com/geoblocks/ol-comfy/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/geoblocks/ol-comfy/actions/workflows/ci.yml)

Comfortable and convenient Openlayers helpers for standard usages.

This library provides a good help to answer common Openlayers needs in a web application using web-components:

- Adds identifier to layers, interactions and controls to be able to get and manage them in every component.
- Add some observables for features. They are accessible in the group, and you don't need to
  follow the feature or the layer itself to be noticed by a change.
- Simplify interactions: enable one tool at once, manage interactions by group (create, store, destroy, toggle).
- Add some utils, shortcuts and helpers function.

Ol-Comfy is built in a non-binding manner: take only what you need, extend what you need. Every class is responsible for what
they manage and store/retrieve information in/from the map. This way you can destroy an instance, create another one and find
again the same state.

## Online doc and demos

- [Documentation](https://geoblocks.github.io/ol-comfy/apidoc/index.html);
- [Demo](https://geoblocks.github.io/ol-comfy/examples/index.html);
- [Source code](https://github.com/geoblocks/ol-comfy)

## Local development

For local development we use a few demos.

```bash
npm install
npm run dev
```

## Publish a new version to npm

The source is transpiled to standard ES modules and published on npm.

```bash
# Update the `CHANGES.md` file
# Update the `vite.config.ts` file you have new example files
npm run build
npm version patch/minor/major
npm publish
git push --tags origin main
npm run gh-pages
```
npm package: @geoblocks/ol-maplibre-layer
Description: Geoblocks to render a maplibre GL JS map as an OpenLayers layer.
Latest version: 1.0.3

# MapLibre OpenLayers layer

Render a [MapLibre GL JS](https://maplibre.org/projects/#js) map as an [OpenLayers](https://openlayers.org/) layer.

## Installation

```shell
npm i @geoblocks/ol-maplibre-layer
```

OpenLayers and MapLibre GL JS are peer dependencies, so you need to install them too.

```shell
npm i ol maplibre-gl
```

## Code example

```js
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](https://openlayers.org/en/latest/apidoc/module-ol_layer_Layer-Layer.html).
`mapLibreOptions` is used to create the [MapLibre map](https://maplibre.org/maplibre-gl-js-docs/api/map/).

The MapLibreLayer exposes the underlying MapLibre map as public property, so you can use it to interact with the map.

```js
layer.maplibreMap.setStyle('https://www.example.com/path/to/other/style.json');
```

## Online doc and demos

- [Documentation](https://geoblocks.github.io/ol-maplibre-layer/api/);
- [Demo](https://geoblocks.github.io/ol-maplibre-layer/demo.html);

## Local development

For local development we use a few demos.

```bash
npm install
npm run start
open http://localhost:1234
```

## Publish a new version to npm

The source is transpiled to standard ES modules and published on npm.

```bash
# update CHANGES.md
npm version patch
npm publish
git push --tags origin master
npm run gh-pages
```