An open API service indexing awesome lists of open source software.

https://github.com/workletjs/workletjs

๐Ÿ“ฆ A modern map component library built with Angular and OpenLayers
https://github.com/workletjs/workletjs

angular gis map ngx-openlayers openlayers webgis workletjs

Last synced: 2 days ago
JSON representation

๐Ÿ“ฆ A modern map component library built with Angular and OpenLayers

Awesome Lists containing this project

README

          

# Workletjs - Angular Map Component Library

**Workletjs** is an **[Angular](https://angular.dev/)** map component library that provides seamless integration with **[OpenLayers](https://openlayers.org/)**, enabling developers to create interactive and customizable maps with ease.

This library developed under the **[Nx monorepo](https://nx.dev/docs/getting-started/tutorials/angular-monorepo-tutorial)** architecture and documented using **[NgDoc](https://ng-doc.com/)**.

---

## ๐Ÿš€ Features

- ๐Ÿ“Œ Built on [OpenLayers](https://openlayers.org/) - high-performance mapping engine
- ๐Ÿงฑ Componentized architecture for interactive map development
- ๐Ÿงฉ Built with [Nx](https://nx.dev) for scalable multi-project workspace
- ๐Ÿ“˜ Component documentation powered by [NgDoc](https://ngdoc.io/)
- ๐Ÿงช Testable and maintainable design
- ๐ŸŒ Ideal for multi-layer visualization, spatial analysis, and geospatial applications

---

## ๐Ÿ›  Prerequisites

This library depends on the following peer dependencies:

- [`@angular/cdk`](https://material.angular.dev/cdk): ^20.2.0
- [`ol`](https://openlayers.org/): ^10.6.1

Make sure these dependencies are installed in your project.

## ๐Ÿ“ฆ Installation

Install the peerDependencies.

```bash
npm install ol @angular/cdk --save
// or
yarn add ol @angular/cdk
// or
pnpm add ol @angular/cdk
```

Install this library.

```bash
npm install @workletjs/ngx-openlayers --save
// or
yarn add @workletjs/ngx-openlayers
// or
pnpm add @workletjs/ngx-openlayers
```

## ๐Ÿ”จ Usage

Import the component modules you want to use into your component.

```ts
import { WolMapModule } from '@workletjs/ngx-openlayers/map';
import { WolViewModule } from '@workletjs/ngx-openlayers/view';

@Component({
imports: [WolMapModule, WolViewModule]
})
export class AppComponent {}
```

And import style file link in angular.json.

```diff
{
"styles": [
+ "node_modules/ol/ol.css"
]
}
```

## โœจ Example

Here is a simple map with an OSM source.

```ts
import { Component } from '@angular/core';
import { WolTileLayerModule } from '@workletjs/ngx-openlayers/layer/tile';
import { WolMapModule } from '@workletjs/ngx-openlayers/map';
import { WolOSMSourceModule } from '@workletjs/ngx-openlayers/source/osm';
import { WolViewModule } from '@workletjs/ngx-openlayers/view';

@Component({
selector: 'app-root',
imports: [WolMapModule, WolViewModule, WolTileLayerModule, WolOSMSourceModule],
template: `






`,
styles: `
:host > wol-map {
height: 400px;
}
`,
})
export class AppComponent {}
```

---

## ๐Ÿ“– Naming Conventions

- Component selector prefix: wol-\*

- Input property prefix: wol\* (e.g. wolControls, wolLayers)

- Output event prefix: wol\* (e.g. wolClick, wolViewChange)

## โ˜€๏ธ License

[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/workletjs/workletjs/blob/master/LICENSE)