Small documentation update

This commit is contained in:
pietervdvn 2022-06-22 20:30:48 +02:00
parent 16ca1e6caa
commit 5370fb7c6d
4 changed files with 38 additions and 31 deletions

View file

@ -24,6 +24,7 @@
+ [smoking](#smoking)
+ [service:electricity](#serviceelectricity)
+ [dog-access](#dog-access)
+ [reviews](#reviews)
+ [climbing.website](#climbingwebsite)
+ [climbing.fee](#climbingfee)
+ [climbing.bouldering](#climbingbouldering)
@ -33,7 +34,6 @@
+ [climbing.sportclimbing](#climbingsportclimbing)
+ [climbing.max_bolts](#climbingmax_bolts)
+ [all_tags](#all_tags)
+ [reviews](#reviews)
+ [questions](#questions)
+ [export_as_gpx](#export_as_gpx)
+ [export_as_geojson](#export_as_geojson)
@ -335,6 +335,22 @@
### reviews
- cafe_pub
- dogpark
- food
- hackerspace
- shops
- veterinary
### climbing.website
@ -436,20 +452,6 @@
### reviews
- dogpark
- food
- shops
- veterinary
### questions

View file

@ -697,13 +697,14 @@ zoom | 18 | The startzoom of mapillary
### auto_apply
A button to run many actions for many features at once.
A button to run many actions for many features at once. To effectively use this button, you'll need some ingredients:
To effectively use this button, you'll need some ingredients:
- A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: import_way_button, tag_apply
- A host feature to place the auto-action on. This can be a big outline (such as a city). Another good option for this is the [current_view](./BuiltinLayers.md#current_view)
- Then, use a calculated tag on the host feature to determine the overlapping object ids
- At last, add this component
- A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: import_way_button, tag_apply
- A host feature to place the auto-action on. This can be a big outline (such as a city). Another good option for this is the layer
- [current_view](./BuiltinLayers.md#current_view)
- Then, use a calculated tag on the host feature to determine the overlapping object ids
- At last, add this component
name | default | description
------ | --------- | -------------

View file

@ -23,6 +23,7 @@ import {UIElement} from "../UIElement";
import FilteredLayer from "../../Models/FilteredLayer";
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
import Lazy from "../Base/Lazy";
import List from "../Base/List";
export interface AutoAction extends SpecialVisualization {
supportsAutoAction: boolean
@ -154,7 +155,7 @@ class ApplyButton extends UIElement {
}
export default class AutoApplyButton implements SpecialVisualization {
public readonly docs: string;
public readonly docs: BaseUIElement;
public readonly funcName: string = "auto_apply";
public readonly args: { name: string; defaultValue?: string; doc: string, required?: boolean }[] = [
{
@ -189,14 +190,17 @@ export default class AutoApplyButton implements SpecialVisualization {
}
private static generateDocs(supportedActions: string[]) {
return [
"A button to run many actions for many features at once.\n",
"To effectively use this button, you'll need some ingredients:\n" +
"- A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: " + supportedActions.join(", "),
"- A host feature to place the auto-action on. This can be a big outline (such as a city). Another good option for this is the [current_view](./BuiltinLayers.md#current_view)",
"- Then, use a calculated tag on the host feature to determine the overlapping object ids",
"- At last, add this component"
].join("\n")
return new Combine([
"A button to run many actions for many features at once.",
"To effectively use this button, you'll need some ingredients:",
new List([
"A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: " + supportedActions.join(", "),
"A host feature to place the auto-action on. This can be a big outline (such as a city). Another good option for this is the layer ", new Link("current_view","./BuiltinLayers.md#current_view"),
"Then, use a calculated tag on the host feature to determine the overlapping object ids",
"At last, add this component"
]),
])
}
constr(state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState): BaseUIElement {

View file

@ -61,7 +61,7 @@ import Slider from "./Input/Slider";
export interface SpecialVisualization {
funcName: string,
constr: ((state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState,) => BaseUIElement),
docs: string,
docs: string | BaseUIElement,
example?: string,
args: { name: string, defaultValue?: string, doc: string, required?: false | boolean }[],
getLayerDependencies?: (argument: string[]) => string[]