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: about 1 year 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 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:09:23.000Z (over 2 years ago)
- Last Synced: 2025-04-14T11:12:59.569Z (about 1 year ago)
- Topics: leaflet, leaflet-plugin, pkk, pkk5-rosreestr
- Language: JavaScript
- Homepage: https://stepankuzmin.github.io/leaflet-pkk/
- Size: 4.03 MB
- Stars: 1
- Watchers: 2
- 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/)
[](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);
```