diff --git a/Docs/SpecialRenderings.md b/Docs/SpecialRenderings.md index e05e908b88..65163c390b 100644 --- a/Docs/SpecialRenderings.md +++ b/Docs/SpecialRenderings.md @@ -44,6 +44,8 @@ * [Example usage of export_as_gpx](#example-usage-of-export_as_gpx) + [clear_location_history](#clear_location_history) * [Example usage of clear_location_history](#example-usage-of-clear_location_history) + + [auto_apply](#auto_apply) + * [Example usage of auto_apply](#example-usage-of-auto_apply) In a tagrendering, some special values are substituted by an advanced UI-element. This allows advanced features and visualizations to be reused by custom themes or even to query third-party API's. General usage is `{func_name()}`, `{func_name(arg, someotherarg)}` or `{func_name(args):cssStyle}`. Note that you _do not_ need to use quotes around your arguments, the comma is enough to separate them. This also implies you cannot use a comma in your args @@ -456,4 +458,27 @@ id_of_object_to_apply_this_one | _undefined_ | If specified, applies the the tag `{clear_location_history()}` +### auto_apply + + A button to run many actions for many features at once. + +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: 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 + +name | default | description +------ | --------- | ------------- +target_layer | _undefined_ | The layer that the target features will reside in +target_feature_ids | _undefined_ | The key, of which the value contains a list of ids +tag_rendering_id | _undefined_ | The ID of the tagRendering containing the autoAction. This tagrendering will be calculated. The embedded actions will be executed +text | _undefined_ | The text to show on the button +icon | ./assets/svg/robot.svg | The icon to show on the button + + +#### Example usage of auto_apply + + `{auto_apply(,,,,./assets/svg/robot.svg)}` + This document is autogenerated from UI/SpecialVisualisations.ts \ No newline at end of file