forked from MapComplete/MapComplete
Rewrite index page in svelte, rewrite language picker in Svelte, fix #1612
This commit is contained in:
parent
303d3a0337
commit
d638237e38
16 changed files with 265 additions and 333 deletions
|
@ -9,14 +9,16 @@ import { RasterLayerProperties } from "./RasterLayerProperties"
|
|||
export class AvailableRasterLayers {
|
||||
public static EditorLayerIndex: (Feature<Polygon, EditorLayerIndexProperties> &
|
||||
RasterLayerPolygon)[] = <any>editorlayerindex.features
|
||||
public static globalLayers: RasterLayerPolygon[] = globallayers.layers.map(
|
||||
(properties) =>
|
||||
<RasterLayerPolygon>{
|
||||
type: "Feature",
|
||||
properties,
|
||||
geometry: BBox.global.asGeometry(),
|
||||
}
|
||||
)
|
||||
public static globalLayers: RasterLayerPolygon[] = globallayers.layers
|
||||
.filter((properties) => properties.id !== "osm.carto" /*Added separately*/)
|
||||
.map(
|
||||
(properties) =>
|
||||
<RasterLayerPolygon>{
|
||||
type: "Feature",
|
||||
properties,
|
||||
geometry: BBox.global.asGeometry(),
|
||||
}
|
||||
)
|
||||
public static readonly osmCartoProperties: RasterLayerProperties = {
|
||||
id: "osm",
|
||||
name: "OpenStreetMap",
|
||||
|
@ -74,6 +76,7 @@ export class AvailableRasterLayers {
|
|||
}
|
||||
return GeoOperations.inside(lonlat, eliPolygon)
|
||||
})
|
||||
matching.unshift(AvailableRasterLayers.osmCarto)
|
||||
matching.push(AvailableRasterLayers.maptilerDefaultLayer)
|
||||
matching.push(...AvailableRasterLayers.globalLayers)
|
||||
return matching
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue