Small documentation update
This commit is contained in:
parent
16ca1e6caa
commit
5370fb7c6d
4 changed files with 38 additions and 31 deletions
|
@ -24,6 +24,7 @@
|
||||||
+ [smoking](#smoking)
|
+ [smoking](#smoking)
|
||||||
+ [service:electricity](#serviceelectricity)
|
+ [service:electricity](#serviceelectricity)
|
||||||
+ [dog-access](#dog-access)
|
+ [dog-access](#dog-access)
|
||||||
|
+ [reviews](#reviews)
|
||||||
+ [climbing.website](#climbingwebsite)
|
+ [climbing.website](#climbingwebsite)
|
||||||
+ [climbing.fee](#climbingfee)
|
+ [climbing.fee](#climbingfee)
|
||||||
+ [climbing.bouldering](#climbingbouldering)
|
+ [climbing.bouldering](#climbingbouldering)
|
||||||
|
@ -33,7 +34,6 @@
|
||||||
+ [climbing.sportclimbing](#climbingsportclimbing)
|
+ [climbing.sportclimbing](#climbingsportclimbing)
|
||||||
+ [climbing.max_bolts](#climbingmax_bolts)
|
+ [climbing.max_bolts](#climbingmax_bolts)
|
||||||
+ [all_tags](#all_tags)
|
+ [all_tags](#all_tags)
|
||||||
+ [reviews](#reviews)
|
|
||||||
+ [questions](#questions)
|
+ [questions](#questions)
|
||||||
+ [export_as_gpx](#export_as_gpx)
|
+ [export_as_gpx](#export_as_gpx)
|
||||||
+ [export_as_geojson](#export_as_geojson)
|
+ [export_as_geojson](#export_as_geojson)
|
||||||
|
@ -335,6 +335,22 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### reviews
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- cafe_pub
|
||||||
|
- dogpark
|
||||||
|
- food
|
||||||
|
- hackerspace
|
||||||
|
- shops
|
||||||
|
- veterinary
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### climbing.website
|
### climbing.website
|
||||||
|
|
||||||
|
|
||||||
|
@ -436,20 +452,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### reviews
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- dogpark
|
|
||||||
- food
|
|
||||||
- shops
|
|
||||||
- veterinary
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### questions
|
### questions
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -697,13 +697,14 @@ zoom | 18 | The startzoom of mapillary
|
||||||
|
|
||||||
### auto_apply
|
### 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 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
|
||||||
- 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)
|
- [current_view](./BuiltinLayers.md#current_view)
|
||||||
- Then, use a calculated tag on the host feature to determine the overlapping object ids
|
- Then, use a calculated tag on the host feature to determine the overlapping object ids
|
||||||
- At last, add this component
|
- At last, add this component
|
||||||
|
|
||||||
|
|
||||||
name | default | description
|
name | default | description
|
||||||
------ | --------- | -------------
|
------ | --------- | -------------
|
||||||
|
|
|
@ -23,6 +23,7 @@ import {UIElement} from "../UIElement";
|
||||||
import FilteredLayer from "../../Models/FilteredLayer";
|
import FilteredLayer from "../../Models/FilteredLayer";
|
||||||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
|
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
|
||||||
import Lazy from "../Base/Lazy";
|
import Lazy from "../Base/Lazy";
|
||||||
|
import List from "../Base/List";
|
||||||
|
|
||||||
export interface AutoAction extends SpecialVisualization {
|
export interface AutoAction extends SpecialVisualization {
|
||||||
supportsAutoAction: boolean
|
supportsAutoAction: boolean
|
||||||
|
@ -154,7 +155,7 @@ class ApplyButton extends UIElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class AutoApplyButton implements SpecialVisualization {
|
export default class AutoApplyButton implements SpecialVisualization {
|
||||||
public readonly docs: string;
|
public readonly docs: BaseUIElement;
|
||||||
public readonly funcName: string = "auto_apply";
|
public readonly funcName: string = "auto_apply";
|
||||||
public readonly args: { name: string; defaultValue?: string; doc: string, required?: boolean }[] = [
|
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[]) {
|
private static generateDocs(supportedActions: string[]) {
|
||||||
return [
|
return new Combine([
|
||||||
"A button to run many actions for many features at once.\n",
|
"A button to run many actions for many features at once.",
|
||||||
"To effectively use this button, you'll need some ingredients:\n" +
|
"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: " + supportedActions.join(", "),
|
new List([
|
||||||
"- 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)",
|
"A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: " + supportedActions.join(", "),
|
||||||
"- Then, use a calculated tag on the host feature to determine the overlapping object ids",
|
"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"),
|
||||||
"- At last, add this component"
|
"Then, use a calculated tag on the host feature to determine the overlapping object ids",
|
||||||
].join("\n")
|
"At last, add this component"
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
constr(state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState): BaseUIElement {
|
constr(state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState): BaseUIElement {
|
||||||
|
|
|
@ -61,7 +61,7 @@ import Slider from "./Input/Slider";
|
||||||
export interface SpecialVisualization {
|
export interface SpecialVisualization {
|
||||||
funcName: string,
|
funcName: string,
|
||||||
constr: ((state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState,) => BaseUIElement),
|
constr: ((state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState,) => BaseUIElement),
|
||||||
docs: string,
|
docs: string | BaseUIElement,
|
||||||
example?: string,
|
example?: string,
|
||||||
args: { name: string, defaultValue?: string, doc: string, required?: false | boolean }[],
|
args: { name: string, defaultValue?: string, doc: string, required?: false | boolean }[],
|
||||||
getLayerDependencies?: (argument: string[]) => string[]
|
getLayerDependencies?: (argument: string[]) => string[]
|
||||||
|
|
Loading…
Reference in a new issue