forked from MapComplete/MapComplete
Add better relation support
This commit is contained in:
parent
7b47af8978
commit
12afdcab75
18 changed files with 2637 additions and 2386 deletions
|
@ -130,8 +130,11 @@ export interface LayerConfigJson {
|
|||
*/
|
||||
rotation?: string | TagRenderingConfigJson;
|
||||
/**
|
||||
* A HTML-fragment that is shown at the center of the icon, for example:
|
||||
* A HTML-fragment that is shown below the icon, for example:
|
||||
* <div style="background: white; display: block">{name}</div>
|
||||
*
|
||||
* If the icon is undefined, then the label is shown in the center of the feature.
|
||||
* Note that, if the wayhandling hides the icon then no label is shown as well.
|
||||
*/
|
||||
label?: string | TagRenderingConfigJson ;
|
||||
|
||||
|
|
|
@ -77,7 +77,8 @@ export default class TagRenderingConfig {
|
|||
throw `Freeform.key is undefined or the empty string - this is not allowed; either fill out something or remove the freeform block alltogether. Error in ${context}`
|
||||
}
|
||||
if (ValidatedTextField.AllTypes[this.freeform.type] === undefined) {
|
||||
throw `Freeform.key ${this.freeform.key} is an invalid type`
|
||||
const knownKeys = ValidatedTextField.tpList.map(tp => tp.name).join(", ");
|
||||
throw `Freeform.key ${this.freeform.key} is an invalid type. Known keys are ${knownKeys}`
|
||||
}
|
||||
if (this.freeform.addExtraTags) {
|
||||
const usedKeys = new And(this.freeform.addExtraTags).usedKeys();
|
||||
|
@ -204,7 +205,7 @@ export default class TagRenderingConfig {
|
|||
return true;
|
||||
}
|
||||
if (this.multiAnswer) {
|
||||
for (const m of this.mappings) {
|
||||
for (const m of this.mappings ?? []) {
|
||||
if (TagUtils.MatchesMultiAnswer(m.if, tags)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue