Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] New expression function "attributes"
Returns a map containing all attributes from a feature, with field names as map keys. We've got featureful, robust support for working with maps in expressions now, so this allows rapid conversion of all feature attributes to a map to use with these handy functions.
- Loading branch information
1 parent
99d6524
commit 018ca7c
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "attributes", | ||
"type": "function", | ||
"description": "Returns a map containing all attributes from a feature, with field names as map keys.", | ||
"variants": [ | ||
{ "variant": "Variant 1", | ||
"variant_description": "Returns a map of all attributes from the current feature.", | ||
"examples": [ { "expression":"attributes()['name']", "returns":"value stored in 'name' attribute for the current feature"}] }, | ||
{ "variant": "Variant 2", | ||
"variant_description": "Allows the target feature to be specified.", | ||
"arguments": [ {"arg":"feature","description":"a feature"}], | ||
"examples": [ { "expression":"attributes( @atlas_feature )['name']", "returns":"value stored in 'name' attribute for the current atlas feature"}] } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters