@@ -364,39 +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 < a href ="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. < a href ="module-ol_source_TileImage-TileImage.html "> < code > TileImage</ code > </ a > sources have 4 bands: red,
371
- green, blue and alpha. < a href ="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
- < a href ="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
+ < p > Reading operators:</ p >
399
368
< ul >
369
+ < li > < code > ['band', bandIndex, xOffset, yOffset]</ code > For tile layers only. Fetches pixel values from band
370
+ < code > bandIndex</ code > of the source's data. The first < code > bandIndex</ code > of the source data is < code > 1</ code > . Fetched values
371
+ are in the 0..1 range. < a href ="module-ol_source_TileImage-TileImage.html "> < code > TileImage</ code > </ a > sources have 4 bands: red,
372
+ green, blue and alpha. < a href ="module-ol_source_DataTile-DataTileSource.html "> < code > DataTileSource</ code > </ a > sources can have any number
373
+ of bands, depending on the underlying data source and
374
+ < a href ="module-ol_source_GeoTIFF.html#~Options "> < code > configuration</ code > </ a > . < code > xOffset</ code > and < code > yOffset</ code > are optional
375
+ and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).</ li >
376
+ < li > < code > ['get', attributeName]</ code > fetches a feature property value, similar to < code > feature.get('attributeName')</ code > .</ li >
377
+ < li > < code > ['get', attributeName, keyOrArrayIndex, ...]</ code > (Canvas only) Access nested properties and array items of a
378
+ feature property. The result is < code > undefined</ code > when there is nothing at the specified key or index.</ li >
379
+ < li > < code > ['geometry-type']</ code > returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'
380
+ < code > Multi*</ code > values are returned as their singular equivalent
381
+ < code > Circle</ code > geometries are returned as 'Polygon'
382
+ < code > GeometryCollection</ code > geometries are returned as the type of the first geometry found in the collection (WebGL only).</ li >
383
+ < li > < code > ['resolution']</ code > returns the current resolution</ li >
384
+ < li > < code > ['time']</ code > The time in seconds since the creation of the layer (WebGL only).</ li >
385
+ < li > < code > ['var', 'varName']</ code > fetches a value from the style variables; will throw an error if that variable is undefined</ li >
386
+ < li > < code > ['zoom']</ code > The current zoom level (WebGL only).</ li >
387
+ < 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
388
+ does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.
389
+ Please note that the M component will be linearly interpolated between the two points composing a segment.</ li >
390
+ </ ul >
391
+ < p > Math operators:</ p >
392
+ < ul >
393
+ < li > < p > < code > ['*', value1, value2, ...]</ code > multiplies the values (either numbers or colors)</ p >
394
+ </ li >
395
+ < li > < p > < code > ['/', value1, value2]</ code > divides < code > value1</ code > by < code > value2</ code > </ p >
396
+ </ li >
397
+ < li > < p > < code > ['+', value1, value2, ...]</ code > adds the values</ p >
398
+ </ li >
399
+ < li > < p > < code > ['-', value1, value2]</ code > subtracts < code > value2</ code > from < code > value1</ code > </ p >
400
+ </ li >
401
+ < li > < p > < code > ['clamp', value, low, high]</ code > clamps < code > value</ code > between < code > low</ code > and < code > high</ code > </ p >
402
+ </ li >
403
+ < li > < p > < code > ['%', value1, value2]</ code > returns the result of < code > value1 % value2</ code > (modulo)</ p >
404
+ </ li >
405
+ < li > < p > < code > ['^', value1, value2]</ code > returns the value of < code > value1</ code > raised to the < code > value2</ code > power</ p >
406
+ </ li >
407
+ < li > < p > < code > ['abs', value1]</ code > returns the absolute value of < code > value1</ code > </ p >
408
+ </ li >
409
+ < li > < p > < code > ['floor', value1]</ code > returns the nearest integer less than or equal to < code > value1</ code > </ p >
410
+ </ li >
400
411
< li > < p > < code > ['round', value1]</ code > returns the nearest integer to < code > value1</ code > </ p >
401
412
</ li >
402
413
< li > < p > < code > ['ceil', value1]</ code > returns the nearest integer greater than or equal to < code > value1</ code > </ p >
0 commit comments