forked from MapComplete/MapComplete
First working version with multi-rendering
This commit is contained in:
parent
b9b8a5c71a
commit
0c0ef48a96
16 changed files with 228 additions and 135 deletions
|
@ -16,12 +16,12 @@ export default class AddNewMarker extends Combine {
|
|||
const layer = filteredLayer.layerDef;
|
||||
for (const preset of filteredLayer.layerDef.presets) {
|
||||
const tags = TagUtils.KVtoProperties(preset.tags)
|
||||
const icon = layer.GenerateLeafletStyle(new UIEventSource<any>(tags), false).icon.html
|
||||
const icon = layer.mapRendering[0].GenerateLeafletStyle(new UIEventSource<any>(tags), false).html
|
||||
.SetClass("block relative")
|
||||
.SetStyle("width: 42px; height: 42px;");
|
||||
icons.push(icon)
|
||||
if (last === undefined) {
|
||||
last = layer.GenerateLeafletStyle(new UIEventSource<any>(tags), false).icon.html
|
||||
last = layer.mapRendering[0].GenerateLeafletStyle(new UIEventSource<any>(tags), false).html
|
||||
.SetClass("block relative")
|
||||
.SetStyle("width: 42px; height: 42px;");
|
||||
}
|
||||
|
|
|
@ -368,7 +368,7 @@ export default class SimpleAddUI extends Toggle {
|
|||
for (const preset of presets) {
|
||||
|
||||
const tags = TagUtils.KVtoProperties(preset.tags ?? []);
|
||||
let icon: () => BaseUIElement = () => layer.layerDef.GenerateLeafletStyle(new UIEventSource<any>(tags), false).icon.html
|
||||
let icon: () => BaseUIElement = () => layer.layerDef.mapRendering[0]. GenerateLeafletStyle(new UIEventSource<any>(tags), false).html
|
||||
.SetClass("w-12 h-12 block relative");
|
||||
const presetInfo: PresetInfo = {
|
||||
tags: preset.tags,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue