Merge develop

This commit is contained in:
Pieter Vander Vennet 2023-09-16 19:03:07 +02:00
commit be5f46d8c8
321 changed files with 14942 additions and 4545 deletions

View file

@ -1,14 +1,13 @@
import { Utils } from "../Utils"
import * as meta from "../../package.json"
import { Utils } from "../Utils"
export type PriviligedLayerType = (typeof Constants.priviliged_layers)[number]
export default class Constants {
public static vNumber = meta.version
public static ImgurApiKey = "7070e7167f0a25a"
public static readonly mapillary_client_token_v4 =
"MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
public static ImgurApiKey = meta.config.api_keys.imgur
public static readonly mapillary_client_token_v4 = meta.config.api_keys.mapillary_v4
/**
* API key for Maproulette
@ -19,15 +18,7 @@ export default class Constants {
*/
public static readonly MaprouletteApiKey = ""
public static defaultOverpassUrls = [
// The official instance, 10000 queries per day per project allowed
"https://overpass-api.de/api/interpreter",
// 'Fair usage'
"https://overpass.kumi.systems/api/interpreter",
// Offline: "https://overpass.nchc.org.tw/api/interpreter",
"https://overpass.openstreetmap.ru/cgi/interpreter",
// Doesn't support nwr: "https://overpass.openstreetmap.fr/api/interpreter"
]
public static defaultOverpassUrls = meta.config.default_overpass_urls
public static readonly added_by_default = [
"selected_element",
@ -100,6 +91,7 @@ export default class Constants {
"etymology",
"food",
"cafes_and_pubs",
"shops",
"playgrounds",
"hailhydrant",
"toilets",
@ -113,9 +105,8 @@ export default class Constants {
* In seconds
*/
static zoomToLocationTimeout = 15
static countryCoderEndpoint: string =
"https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/latlon2country"
public static readonly OsmPreferenceKeyPicturesLicense = "pictures-license"
static countryCoderEndpoint: string = meta.config.country_coder_host
/**
* These are the values that are allowed to use as 'backdrop' icon for a map pin
*/

File diff suppressed because it is too large Load diff

View file

@ -490,9 +490,7 @@ export default class LayerConfig extends WithContextLoader {
usingLayer = [
new Title("Themes using this layer", 4),
new List(
(usedInThemes ?? []).map(
(id) => new Link(id, "https://mapcomplete.org/" + id)
)
(usedInThemes ?? []).map((id) => new Link(id, "https://mapcomplete.org/" + id))
),
]
}

View file

@ -247,7 +247,10 @@ export default class TagRenderingConfig {
if (txt === "") {
throw context + " Rendering for language " + ln + " is empty"
}
if (txt.indexOf("{" + this.freeform.key + "}") >= 0) {
if (
txt.indexOf("{" + this.freeform.key + "}") >= 0 ||
txt.indexOf("&LBRACE" + this.freeform.key + "&RBRACE")
) {
continue
}
if (txt.indexOf("{" + this.freeform.key + ":") >= 0) {