Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/stepankuzmin/leaflet-pkk

Public cadastral map (pkk5.rosreestr.ru) plugin for Leaflet
https://github.com/stepankuzmin/leaflet-pkk

leaflet leaflet-plugin pkk pkk5-rosreestr

Last synced: 3 months ago
JSON representation

Public cadastral map (pkk5.rosreestr.ru) plugin for Leaflet

Awesome Lists containing this project

README

        

# leaflet-pkk

Public cadastral map ([pkk5.rosreestr.ru](pkk5.rosreestr.ru)) plugin for Leaflet.

[**Example**](https://stepankuzmin.github.io/leaflet-pkk/)

[![screenshot](https://raw.githubusercontent.com/stepankuzmin/leaflet-pkk/master/screenshot.png)](https://stepankuzmin.github.io/leaflet-pkk/)

## Install

Install using npm:

```shell
npm install --save leaflet-pkk
```

...or using unpkg CDN

```html

```

## Usage

```js
const map = L.map('map').setView([55.756389, 37.63019], 14);

const baseLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
map.addLayer(baseLayer);

const pkkLayer = L.tileLayer.pkk({
layers: '8,9,10,11,12',
format: 'image/png32',
transparent: true
});

pkkLayer.on('featureclick', ({ latlng, feature }) => {
const popup = L.popup()
.setLatLng(latlng)
.setContent(feature.attrs.id)
.openOn(map);
});

map.addLayer(pkkLayer);
```