mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Move maptip function help to variants structure
This commit is contained in:
parent
133f8ad0fe
commit
e6f3c7fc70
@ -2,39 +2,36 @@
|
|||||||
"name": "maptip",
|
"name": "maptip",
|
||||||
"type": "function",
|
"type": "function",
|
||||||
"groups": ["Record and Attributes"],
|
"groups": ["Record and Attributes"],
|
||||||
"description": "Returns the maptip for a given feature in a layer. If called with no parameters, it evaluates the current feature. The maptip is evaluated by default.",
|
"description": "Returns the maptip for a given feature in a layer. The expression is evaluated by default. Can be used with zero, one or more arguments, see below for details.",
|
||||||
|
"variants": [
|
||||||
|
{
|
||||||
|
"variant": "No parameters",
|
||||||
|
"variant_description": "If called with no parameters, the function will evaluate the maptip of the current feature in the current layer.",
|
||||||
|
"arguments": [],
|
||||||
|
"examples": [ { "expression": "maptip()", "returns" : "The maptip of the current feature in the current layer." } ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"variant": "One 'feature' parameter",
|
||||||
|
"variant_description": "If called with a 'feature' parameter only, the function will evaluate the specified feature from the current layer.",
|
||||||
|
"arguments": [ { "arg": "feature", "description": "The feature which should be evaluated." } ],
|
||||||
|
"examples": [ { "expression": "maptip(@atlas_feature)", "returns": "The maptip of the current atlas feature." } ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"variant" : "Layer and feature parameters",
|
||||||
|
"variant_description": "If the function is called with both a layer and a feature, it will evaluate the specified feature from the specified layer.",
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{ "arg": "layer", "description": "The layer (or its ID or name)" },
|
||||||
"arg": "feature",
|
{ "arg": "feature", "description": "The feature which should be evaluated." },
|
||||||
"optional": true,
|
{ "arg": "evaluate", "description": "If the expression must be evaluated. If false, the expression will be returned as a string literal only (which could potentially be later evaluated using the 'eval_template' function).", "optional": true, "default": "true" }
|
||||||
"default": "current feature",
|
|
||||||
"description": "The feature which should be evaluated."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arg": "layer",
|
|
||||||
"optional": true,
|
|
||||||
"default": "current layer",
|
|
||||||
"description": "The layer (or its id or name)."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arg": "evaluate",
|
|
||||||
"description": "If the expression must be evaluated. If false, the expression will be returned as a string literal only (which could potentially be later evaluated using the 'eval_template' function).",
|
|
||||||
"optional": true,
|
|
||||||
"default": "true"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"examples": [
|
"examples": [
|
||||||
{
|
{ "expression": "maptip('streets', get_feature_by_id('streets', 1))",
|
||||||
"expression": "maptip()",
|
|
||||||
"returns": "The maptip of the current feature."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "maptip(get_feature('streets', 1), 'streets')",
|
|
||||||
"returns": "The maptip of the feature with the ID 1 on the layer 'streets'."
|
"returns": "The maptip of the feature with the ID 1 on the layer 'streets'."
|
||||||
},
|
},
|
||||||
{
|
{ "expression": "maptip('a_layer_id', $currentfeature, 'False')",
|
||||||
"expression": "maptip('a_layer_id', $currentfeature, 'False')",
|
|
||||||
"returns": "The maptip of the given feature not evaluated."
|
"returns": "The maptip of the given feature not evaluated."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user