forked from MapComplete/MapComplete
Merge branch 'develop' into feature/maproulette
This commit is contained in:
commit
64560b9cd2
279 changed files with 13050 additions and 4684 deletions
|
@ -10,7 +10,7 @@ import {AllKnownLayouts} from "../Customizations/AllKnownLayouts";
|
|||
import RelationsTracker from "../Logic/Osm/RelationsTracker";
|
||||
import * as OsmToGeoJson from "osmtogeojson";
|
||||
import MetaTagging from "../Logic/MetaTagging";
|
||||
import {UIEventSource} from "../Logic/UIEventSource";
|
||||
import {ImmutableStore, UIEventSource} from "../Logic/UIEventSource";
|
||||
import {TileRange, Tiles} from "../Models/TileRange";
|
||||
import LayoutConfig from "../Models/ThemeConfig/LayoutConfig";
|
||||
import ScriptUtils from "./ScriptUtils";
|
||||
|
@ -250,9 +250,10 @@ function sliceToTiles(allFeatures: FeatureSource, theme: LayoutConfig, relations
|
|||
}
|
||||
|
||||
const filteredTile = new FilteringFeatureSource({
|
||||
locationControl: new UIEventSource<Loc>(undefined),
|
||||
locationControl: new ImmutableStore<Loc>(undefined),
|
||||
allElements: undefined,
|
||||
selectedElement: new UIEventSource<any>(undefined)
|
||||
selectedElement: new ImmutableStore<any>(undefined),
|
||||
globalFilters: new ImmutableStore([])
|
||||
},
|
||||
tileIndex,
|
||||
tile,
|
||||
|
@ -323,9 +324,10 @@ function sliceToTiles(allFeatures: FeatureSource, theme: LayoutConfig, relations
|
|||
if (pointsOnlyLayers.indexOf(layer.id) >= 0) {
|
||||
|
||||
const filtered = new FilteringFeatureSource({
|
||||
locationControl: new UIEventSource<Loc>(undefined),
|
||||
locationControl: new ImmutableStore<Loc>(undefined),
|
||||
allElements: undefined,
|
||||
selectedElement: new UIEventSource<any>(undefined)
|
||||
selectedElement: new ImmutableStore<any>(undefined),
|
||||
globalFilters: new ImmutableStore([])
|
||||
},
|
||||
Tiles.tile_index(0, 0, 0),
|
||||
source,
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
import Combine from "../UI/Base/Combine";
|
||||
import BaseUIElement from "../UI/BaseUIElement";
|
||||
import Translations from "../UI/i18n/Translations";
|
||||
import {existsSync, mkdir, mkdirSync, writeFileSync} from "fs";
|
||||
import {existsSync, mkdirSync, writeFileSync} from "fs";
|
||||
import {AllKnownLayouts} from "../Customizations/AllKnownLayouts";
|
||||
import TableOfContents from "../UI/Base/TableOfContents";
|
||||
import SimpleMetaTaggers, {SimpleMetaTagger} from "../Logic/SimpleMetaTagger";
|
||||
import SimpleMetaTaggers from "../Logic/SimpleMetaTagger";
|
||||
import ValidatedTextField from "../UI/Input/ValidatedTextField";
|
||||
import LayoutConfig from "../Models/ThemeConfig/LayoutConfig";
|
||||
import SpecialVisualizations from "../UI/SpecialVisualizations";
|
||||
import FeatureSwitchState from "../Logic/State/FeatureSwitchState";
|
||||
import {ExtraFunctions} from "../Logic/ExtraFunctions";
|
||||
import Title from "../UI/Base/Title";
|
||||
import Minimap from "../UI/Base/Minimap";
|
||||
import {QueryParameters} from "../Logic/Web/QueryParameters";
|
||||
import QueryParameterDocumentation from "../UI/QueryParameterDocumentation";
|
||||
import ScriptUtils from "./ScriptUtils";
|
||||
import List from "../UI/Base/List";
|
||||
|
|
|
@ -17,13 +17,18 @@ function genImages(dryrun = false) {
|
|||
throw "Non-svg file detected in the svg files: " + path;
|
||||
}
|
||||
|
||||
let svg = fs.readFileSync("./assets/svg/" + path, "utf-8")
|
||||
let svg : string = fs.readFileSync("./assets/svg/" + path, "utf-8")
|
||||
.replace(/<\?xml.*?>/, "")
|
||||
.replace(/fill: ?none;/g, "fill: none !important;") // This is such a brittle hack...
|
||||
.replace(/\n/g, " ")
|
||||
.replace(/\r/g, "")
|
||||
.replace(/\\/g, "\\")
|
||||
.replace(/"/g, "\\\"")
|
||||
|
||||
let hasNonAsciiChars = Array.from(svg).some(char => char.charCodeAt(0) > 127);
|
||||
if(hasNonAsciiChars){
|
||||
throw "The svg '"+path+"' has non-ascii characters";
|
||||
}
|
||||
const name = path.substr(0, path.length - 4)
|
||||
.replace(/[ -]/g, "_");
|
||||
|
||||
|
|
|
@ -296,8 +296,8 @@ const iconThief = new AggregateIconThief(
|
|||
|
||||
const thief = new IdThief("../id-tagging-schema/", iconThief)
|
||||
|
||||
const shopLayerPath = targetDir + "id_presets.json"
|
||||
const idPresets = <LayerConfigJson>JSON.parse(readFileSync(shopLayerPath, 'utf8'))
|
||||
const id_presets_path = targetDir + "id_presets.json"
|
||||
const idPresets = <LayerConfigJson>JSON.parse(readFileSync(id_presets_path, 'utf8'))
|
||||
idPresets.tagRenderings = [
|
||||
{
|
||||
id: "shop_types",
|
||||
|
@ -309,4 +309,4 @@ idPresets.tagRenderings = [
|
|||
}
|
||||
]
|
||||
|
||||
writeFileSync(shopLayerPath, JSON.stringify(idPresets, null, " "), 'utf8')
|
||||
writeFileSync(id_presets_path, JSON.stringify(idPresets, null, " "), 'utf8')
|
|
@ -54,11 +54,14 @@ function main(){
|
|||
|
||||
const wikidataLayer = <LayerConfigJson>{
|
||||
id: "wikidata",
|
||||
description: "Various tagrenderings which are generated from Wikidata. Automatically generated with a script, don't edit manually",
|
||||
description: {
|
||||
en: "Various tagrenderings which are generated from Wikidata. Automatically generated with a script, don't edit manually"
|
||||
},
|
||||
"#dont-translate": "*",
|
||||
"source": {
|
||||
"osmTags": "id~*"
|
||||
},
|
||||
title: null,
|
||||
"mapRendering": null,
|
||||
tagRenderings: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue