mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
first map component
This commit is contained in:
parent
4a2a343e41
commit
a4eec9e2ed
6 changed files with 37 additions and 34 deletions
22
src/modules/map.js
Normal file
22
src/modules/map.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import L from "leaflet";
|
||||
|
||||
import { providers } from "$constants/providers";
|
||||
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
|
||||
export class Map {
|
||||
constructor(container) {
|
||||
this.map = L.map(container, {
|
||||
editable: true,
|
||||
layers: [
|
||||
|
||||
]
|
||||
}).setView([55.0153275, 82.9071235], 13);
|
||||
|
||||
this.tileLayer = L.tileLayer(providers.default, {
|
||||
attribution: 'Независимое Велосообщество',
|
||||
maxNativeZoom: 18,
|
||||
maxZoom: 18,
|
||||
}).addTo(this.map);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue