forked from MapComplete/MapComplete
Add more background layers, add default background id option in the layout configuration, fix #64, #65
This commit is contained in:
parent
62cc392cfd
commit
66ce783f20
10 changed files with 58 additions and 45 deletions
|
@ -1,4 +1,5 @@
|
|||
import * as L from "leaflet"
|
||||
import * as X from "leaflet-providers"
|
||||
import {TileLayer} from "leaflet"
|
||||
import {UIEventSource} from "../UIEventSource";
|
||||
import {UIElement} from "../../UI/UIElement";
|
||||
|
@ -12,7 +13,6 @@ export class Basemap {
|
|||
{
|
||||
id: "osm",
|
||||
//max_zoom: 19,
|
||||
attribution_url: "https://openStreetMap.org/copyright",
|
||||
name: "OpenStreetMap",
|
||||
layer: Basemap.CreateBackgroundLayer("osm", "OpenStreetMap",
|
||||
"https://tile.openstreetmap.org/{z}/{x}/{y}.png", "OpenStreetMap", "https://openStreetMap.org/copyright",
|
||||
|
@ -146,7 +146,8 @@ export class Basemap {
|
|||
}
|
||||
|
||||
public static ProvidedLayer(name: string, options?: any): any {
|
||||
// return new L.tileLayer.provider(name, options);
|
||||
return undefined;
|
||||
X // We simply 'call' the namespace X here to force the import to run and not to be optimized away
|
||||
// @ts-ignore
|
||||
return L.tileLayer.provider(name, options);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue