Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2023-08-23 20:43:00 +02:00
commit dfd2a3d69a
406 changed files with 11351 additions and 10404 deletions

View file

@ -46,7 +46,7 @@ export default class Img extends BaseUIElement {
}
let src = this._src
if (this._src.startsWith("./")) {
src = "https://mapcomplete.osm.be/" + src
src = "https://mapcomplete.org/" + src
}
return "![](" + src + ")"
}

View file

@ -44,7 +44,6 @@ class PointRenderingLayer {
this._onClick = onClick
this._selectedElement = selectedElement
const self = this
features.features.addCallbackAndRunD((features) => self.updateFeatures(features))
visibility?.addCallbackAndRunD((visible) => {
if (visible === true && self._dirty) {
@ -155,7 +154,6 @@ class PointRenderingLayer {
el.addEventListener("click", function (ev) {
ev.preventDefault()
self._onClick(feature)
console.log("Got click:", feature)
// Workaround to signal the MapLibreAdaptor to ignore this click
ev["consumed"] = true
})
@ -333,7 +331,6 @@ class LineRenderingLayer {
})
if (this._onClick) {
map.on("click", polylayer, (e) => {
console.log("Got polylayer click:", e)
// polygon-layer-listener
if (e.originalEvent["consumed"]) {
// This is a polygon beneath a marker, we can ignore it
@ -351,7 +348,7 @@ class LineRenderingLayer {
map.setLayoutProperty(polylayer, "visibility", visible ? "visible" : "none")
} catch (e) {
console.warn(
"Error while setting visiblity of layers ",
"Error while setting visibility of layers ",
linelayer,
polylayer,
e

View file

@ -14,7 +14,7 @@ export default class QueryParameterDocumentation {
"This document gives an overview of which URL-parameters can be used to influence MapComplete.",
new Title("What is a URL parameter?", 2),
'"URL-parameters are extra parts of the URL used to set the state.',
"For example, if the url is `https://mapcomplete.osm.be/cyclofix?lat=51.0&lon=4.3&z=5&test=true#node/1234`, " +
"For example, if the url is `https://mapcomplete.org/cyclofix?lat=51.0&lon=4.3&z=5&test=true#node/1234`, " +
"the URL-parameters are stated in the part between the `?` and the `#`. There are multiple, all separated by `&`, namely: ",
new List(
[

View file

@ -296,7 +296,7 @@ export default class SpecialVisualizations {
* SpecialVisualizations.constructSpecification("") // => []
*
* // Advanced cases with commas, braces and newlines should be handled without problem
* const templates = SpecialVisualizations.constructSpecification("{send_email(&LBRACEemail&RBRACE,Broken bicycle pump,Hello&COMMA\n\nWith this email&COMMA I'd like to inform you that the bicycle pump located at https://mapcomplete.osm.be/cyclofix?lat=&LBRACE_lat&RBRACE&lon=&LBRACE_lon&RBRACE&z=18#&LBRACEid&RBRACE is broken.\n\n Kind regards,Report this bicycle pump as broken)}")
* const templates = SpecialVisualizations.constructSpecification("{send_email(&LBRACEemail&RBRACE,Broken bicycle pump,Hello&COMMA\n\nWith this email&COMMA I'd like to inform you that the bicycle pump located at https://mapcomplete.org/cyclofix?lat=&LBRACE_lat&RBRACE&lon=&LBRACE_lon&RBRACE&z=18#&LBRACEid&RBRACE is broken.\n\n Kind regards,Report this bicycle pump as broken)}")
* const templ = <Exclude<RenderingSpecification, string>> templates[0]
* templ.func.funcName // => "send_email"
* templ.args[0] = "{email}"