Merge develop

This commit is contained in:
Pieter Vander Vennet 2021-10-09 23:25:32 +02:00
commit e5a3c1cab6
22 changed files with 4016 additions and 3740 deletions

View file

@ -412,7 +412,10 @@ export default class SpecialVisualizations {
name: "icon",
doc: "A nice icon to show in the button",
defaultValue: "./assets/svg/addSmall.svg"
}],
},
{name:"minzoom",
doc: "How far the contributor must zoom in before being able to import the point",
defaultValue: "18"}],
docs: `This button will copy the data from an external dataset into OpenStreetMap. It is only functional in official themes but can be tested in unofficial themes.
If you want to import a dataset, make sure that:
@ -455,13 +458,13 @@ There are also some technicalities in your theme to keep in mind:
return newTags
})
const id = tagSource.data.id;
const feature = State.state.allElements.ContainingFeatures.get(id)
const feature = state.allElements.ContainingFeatures.get(id)
if (feature.geometry.type !== "Point") {
return new FixedUiElement("Error: can only import point objects").SetClass("alert")
}
const [lon, lat] = feature.geometry.coordinates;
return new ImportButton(
args[2], args[1], tagSource, rewrittenTags, lat, lon
args[2], args[1], tagSource, rewrittenTags, lat, lon, Number(args[3]), state
)
}
}