You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dist/en/main/apidoc/module-ol_expr_expression.html
+42-42Lines changed: 42 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -364,50 +364,50 @@ <h4 class="name">
364
364
<p>Base type used for literal style parameters; can be a number literal or the output of an operator,
365
365
which in turns takes <ahref="module-ol_expr_expression.html#~ExpressionValue"><code>ExpressionValue</code></a> arguments.</p>
366
366
<p>See below for details on the available operators (with notes for those that are WebGL or Canvas only).</p>
367
+
<p>Reading operators:
368
+
<code>['band', bandIndex, xOffset, yOffset]</code> For tile layers only. Fetches pixel values from band
369
+
<code>bandIndex</code> of the source's data. The first <code>bandIndex</code> of the source data is <code>1</code>. Fetched values
370
+
are in the 0..1 range. <ahref="module-ol_source_TileImage-TileImage.html"><code>TileImage</code></a> sources have 4 bands: red,
371
+
green, blue and alpha. <ahref="module-ol_source_DataTile-DataTileSource.html"><code>DataTileSource</code></a> sources can have any number
372
+
of bands, depending on the underlying data source and
373
+
<ahref="module-ol_source_GeoTIFF.html#~Options"><code>configuration</code></a>. <code>xOffset</code> and <code>yOffset</code> are optional
374
+
and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).
375
+
<code>['get', attributeName]</code> fetches a feature property value, similar to <code>feature.get('attributeName')</code>.
376
+
<code>['get', attributeName, keyOrArrayIndex, ...]</code> (Canvas only) Access nested properties and array items of a
377
+
feature property. The result is <code>undefined</code> when there is nothing at the specified key or index.
378
+
<code>['geometry-type']</code> returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'
379
+
<code>Multi*</code> values are returned as their singular equivalent
380
+
<code>Circle</code> geometries are returned as 'Polygon'
381
+
<code>GeometryCollection</code> geometries are returned as the type of the first geometry found in the collection (WebGL only).
382
+
<code>['resolution']</code> returns the current resolution
383
+
<code>['time']</code> The time in seconds since the creation of the layer (WebGL only).
384
+
<code>['var', 'varName']</code> fetches a value from the style variables; will throw an error if that variable is undefined
385
+
<code>['zoom']</code> The current zoom level (WebGL only).
386
+
<code>['line-metric']</code> returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line
387
+
does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.
388
+
Please note that the M component will be linearly interpolated between the two points composing a segment.</p>
389
+
<p>Math operators:
390
+
<code>['*', value1, value2, ...]</code> multiplies the values (either numbers or colors)
391
+
<code>['/', value1, value2]</code> divides <code>value1</code> by <code>value2</code>
392
+
<code>['+', value1, value2, ...]</code> adds the values
393
+
<code>['-', value1, value2]</code> subtracts <code>value2</code> from <code>value1</code>
394
+
<code>['clamp', value, low, high]</code> clamps <code>value</code> between <code>low</code> and <code>high</code>
395
+
<code>['%', value1, value2]</code> returns the result of <code>value1 % value2</code> (modulo)
396
+
<code>['^', value1, value2]</code> returns the value of <code>value1</code> raised to the <code>value2</code> power
397
+
<code>['abs', value1]</code> returns the absolute value of <code>value1</code>
398
+
<code>['floor', value1]</code> returns the nearest integer less than or equal to <code>value1</code></p>
367
399
<ul>
368
-
<li><p>Reading operators:</p>
369
-
<ul>
370
-
<li><code>['band', bandIndex, xOffset, yOffset]</code> For tile layers only. Fetches pixel values from band
371
-
<code>bandIndex</code> of the source's data. The first <code>bandIndex</code> of the source data is <code>1</code>. Fetched values
372
-
are in the 0..1 range. <ahref="module-ol_source_TileImage-TileImage.html"><code>TileImage</code></a> sources have 4 bands: red,
373
-
green, blue and alpha. <ahref="module-ol_source_DataTile-DataTileSource.html"><code>DataTileSource</code></a> sources can have any number
374
-
of bands, depending on the underlying data source and
375
-
<ahref="module-ol_source_GeoTIFF.html#~Options"><code>configuration</code></a>. <code>xOffset</code> and <code>yOffset</code> are optional
376
-
and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).</li>
377
-
<li><code>['get', attributeName]</code> fetches a feature property value, similar to <code>feature.get('attributeName')</code>.</li>
378
-
<li><code>['get', attributeName, keyOrArrayIndex, ...]</code> (Canvas only) Access nested properties and array items of a
379
-
feature property. The result is <code>undefined</code> when there is nothing at the specified key or index.</li>
380
-
<li><code>['geometry-type']</code> returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'
381
-
<code>Multi*</code> values are returned as their singular equivalent
382
-
<code>Circle</code> geometries are returned as 'Polygon'
383
-
<code>GeometryCollection</code> geometries are returned as the type of the first geometry found in the collection (WebGL only).</li>
384
-
<li><code>['resolution']</code> returns the current resolution</li>
385
-
<li><code>['time']</code> The time in seconds since the creation of the layer (WebGL only).</li>
386
-
<li><code>['var', 'varName']</code> fetches a value from the style variables; will throw an error if that variable is undefined</li>
387
-
<li><code>['zoom']</code> The current zoom level (WebGL only).</li>
388
-
<li><code>['line-metric']</code> returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line
389
-
does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.
390
-
Please note that the M component will be linearly interpolated between the two points composing a segment.</li>
391
-
</ul>
400
+
<li><p><code>['round', value1]</code> returns the nearest integer to <code>value1</code></p>
392
401
</li>
393
-
<li><p>Math operators:</p>
394
-
<ul>
395
-
<li><code>['*', value1, value2, ...]</code> multiplies the values (either numbers or colors)</li>
396
-
<li><code>['/', value1, value2]</code> divides <code>value1</code> by <code>value2</code></li>
397
-
<li><code>['+', value1, value2, ...]</code> adds the values</li>
398
-
<li><code>['-', value1, value2]</code> subtracts <code>value2</code> from <code>value1</code></li>
399
-
<li><code>['clamp', value, low, high]</code> clamps <code>value</code> between <code>low</code> and <code>high</code></li>
400
-
<li><code>['%', value1, value2]</code> returns the result of <code>value1 % value2</code> (modulo)</li>
401
-
<li><code>['^', value1, value2]</code> returns the value of <code>value1</code> raised to the <code>value2</code> power</li>
402
-
<li><code>['abs', value1]</code> returns the absolute value of <code>value1</code></li>
403
-
<li><code>['floor', value1]</code> returns the nearest integer less than or equal to <code>value1</code></li>
404
-
<li><code>['round', value1]</code> returns the nearest integer to <code>value1</code></li>
405
-
<li><code>['ceil', value1]</code> returns the nearest integer greater than or equal to <code>value1</code></li>
406
-
<li><code>['sin', value1]</code> returns the sine of <code>value1</code></li>
407
-
<li><code>['cos', value1]</code> returns the cosine of <code>value1</code></li>
408
-
<li><code>['atan', value1, value2]</code> returns <code>atan2(value1, value2)</code>. If <code>value2</code> is not provided, returns <code>atan(value1)</code></li>
409
-
<li><code>['sqrt', value1]</code> returns the square root of <code>value1</code></li>
410
-
</ul>
402
+
<li><p><code>['ceil', value1]</code> returns the nearest integer greater than or equal to <code>value1</code></p>
403
+
</li>
404
+
<li><p><code>['sin', value1]</code> returns the sine of <code>value1</code></p>
405
+
</li>
406
+
<li><p><code>['cos', value1]</code> returns the cosine of <code>value1</code></p>
407
+
</li>
408
+
<li><p><code>['atan', value1, value2]</code> returns <code>atan2(value1, value2)</code>. If <code>value2</code> is not provided, returns <code>atan(value1)</code></p>
409
+
</li>
410
+
<li><p><code>['sqrt', value1]</code> returns the square root of <code>value1</code></p>
0 commit comments