Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/stepankuzmin/leaflet-pkk
- Owner: stepankuzmin
- License: bsd-2-clause
- Created: 2019-08-17T17:39:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:09:23.000Z (over 1 year ago)
- Last Synced: 2024-10-10T16:33:34.656Z (3 months ago)
- Topics: leaflet, leaflet-plugin, pkk, pkk5-rosreestr
- Language: JavaScript
- Homepage: https://stepankuzmin.github.io/leaflet-pkk/
- Size: 4.03 MB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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);
```