forked from MapComplete/MapComplete
New preset-system, better 'add new POI'-ui with small confirmation
This commit is contained in:
parent
c020955cdc
commit
8a1e171298
25 changed files with 317 additions and 80 deletions
|
@ -12,16 +12,19 @@ export class Map extends LayerDefinition {
|
|||
this.minzoom = 12;
|
||||
|
||||
this.overpassFilter = new Tag("information", "map");
|
||||
this.newElementTags = [new Tag("tourism", "information"), new Tag("information", "map")];
|
||||
this.presets = [{
|
||||
title: "Map",
|
||||
icon: "/assets/map.svg",
|
||||
tags: [new Tag("tourism", "information"), new Tag("information", "map")]
|
||||
}];
|
||||
|
||||
|
||||
|
||||
const isOsmSource = new Tag("map_source", "OpenStreetMap");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.style = (properties) => {
|
||||
let icon = "assets/map.svg";
|
||||
if(isOsmSource.matchesProperties(properties)){
|
||||
if (isOsmSource.matchesProperties(properties)) {
|
||||
icon = "assets/osm-logo-white-bg.svg";
|
||||
|
||||
const attr = properties["map_source:attribution"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue