Skip to content

[pull] main from openlayers:main #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/ol/expr/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,38 @@ import {toSize} from '../size.js';
* See below for details on the available operators (with notes for those that are WebGL or Canvas only).
*
* Reading operators:
* `['band', bandIndex, xOffset, yOffset]` For tile layers only. Fetches pixel values from band
* * `['band', bandIndex, xOffset, yOffset]` For tile layers only. Fetches pixel values from band
* `bandIndex` of the source's data. The first `bandIndex` of the source data is `1`. Fetched values
* are in the 0..1 range. {@link import("../source/TileImage.js").default} sources have 4 bands: red,
* green, blue and alpha. {@link import("../source/DataTile.js").default} sources can have any number
* of bands, depending on the underlying data source and
* {@link import("../source/GeoTIFF.js").Options configuration}. `xOffset` and `yOffset` are optional
* and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).
* `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.
* `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a
* * `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.
* * `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a
* feature property. The result is `undefined` when there is nothing at the specified key or index.
* `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'
* * `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'
* `Multi*` values are returned as their singular equivalent
* `Circle` geometries are returned as 'Polygon'
* `GeometryCollection` geometries are returned as the type of the first geometry found in the collection (WebGL only).
* `['resolution']` returns the current resolution
* `['time']` The time in seconds since the creation of the layer (WebGL only).
* `['var', 'varName']` fetches a value from the style variables; will throw an error if that variable is undefined
* `['zoom']` The current zoom level (WebGL only).
* `['line-metric']` returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line
* * `['resolution']` returns the current resolution
* * `['time']` The time in seconds since the creation of the layer (WebGL only).
* * `['var', 'varName']` fetches a value from the style variables; will throw an error if that variable is undefined
* * `['zoom']` The current zoom level (WebGL only).
* * `['line-metric']` returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line
* does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.
* Please note that the M component will be linearly interpolated between the two points composing a segment.
*
* Math operators:
* `['*', value1, value2, ...]` multiplies the values (either numbers or colors)
* `['/', value1, value2]` divides `value1` by `value2`
* `['+', value1, value2, ...]` adds the values
* `['-', value1, value2]` subtracts `value2` from `value1`
* `['clamp', value, low, high]` clamps `value` between `low` and `high`
* `['%', value1, value2]` returns the result of `value1 % value2` (modulo)
* `['^', value1, value2]` returns the value of `value1` raised to the `value2` power
* `['abs', value1]` returns the absolute value of `value1`
* `['floor', value1]` returns the nearest integer less than or equal to `value1`
* * `['*', value1, value2, ...]` multiplies the values (either numbers or colors)
* * `['/', value1, value2]` divides `value1` by `value2`
* * `['+', value1, value2, ...]` adds the values
* * `['-', value1, value2]` subtracts `value2` from `value1`
* * `['clamp', value, low, high]` clamps `value` between `low` and `high`
* * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)
* * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power
* * `['abs', value1]` returns the absolute value of `value1`
* * `['floor', value1]` returns the nearest integer less than or equal to `value1`
* * `['round', value1]` returns the nearest integer to `value1`
* * `['ceil', value1]` returns the nearest integer greater than or equal to `value1`
* * `['sin', value1]` returns the sine of `value1`
Expand Down
Loading