forked from MapComplete/MapComplete
Add summary layer
This commit is contained in:
parent
5b318236bf
commit
74fb4bd5d1
19 changed files with 533 additions and 88 deletions
|
|
@ -45,7 +45,6 @@ export default class LayerConfig extends WithContextLoader {
|
|||
public readonly isShown: TagsFilter
|
||||
public minzoom: number
|
||||
public minzoomVisible: number
|
||||
public readonly maxzoom: number
|
||||
public readonly title?: TagRenderingConfig
|
||||
public readonly titleIcons: TagRenderingConfig[]
|
||||
public readonly mapRendering: PointRenderingConfig[]
|
||||
|
|
@ -464,9 +463,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
return [
|
||||
new Combine([
|
||||
new Link(
|
||||
Utils.runningFromConsole
|
||||
? "<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>"
|
||||
: Svg.statistics_svg().SetClass("w-4 h-4 mr-2"),
|
||||
"<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>",
|
||||
"https://taginfo.openstreetmap.org/keys/" + values.key + "#values",
|
||||
true
|
||||
),
|
||||
|
|
|
|||
|
|
@ -245,6 +245,14 @@ export default class LayoutConfig implements LayoutInformation {
|
|||
return this.layers.some((l) => l.isLeftRightSensitive())
|
||||
}
|
||||
|
||||
public hasNoteLayer() {
|
||||
return this.layers.some((l) => l.id === "note")
|
||||
}
|
||||
|
||||
public hasPresets() {
|
||||
return this.layers.some((l) => l.presets?.length > 0)
|
||||
}
|
||||
|
||||
public missingTranslations(extraInspection: any): {
|
||||
untranslated: Map<string, string[]>
|
||||
total: number
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ export default class PointRenderingConfig extends WithContextLoader {
|
|||
}
|
||||
})
|
||||
|
||||
|
||||
this.marker = (json.marker ?? []).map((m) => new IconConfig(<any>m))
|
||||
if (json.css !== undefined) {
|
||||
this.cssDef = this.tr("css", undefined)
|
||||
|
|
@ -307,7 +306,7 @@ export default class PointRenderingConfig extends WithContextLoader {
|
|||
const label = self.label
|
||||
?.GetRenderValue(tags)
|
||||
?.Subs(tags)
|
||||
?.SetClass("block center absolute text-center marker-label")
|
||||
?.SetClass("flex items-center justify-center absolute marker-label")
|
||||
?.SetClass(cssClassesLabel)
|
||||
if (cssLabel) {
|
||||
label.SetStyle(cssLabel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue