Merge pull request #13237 from mike-000/className-with-declutter

Describe use of className with declutter
This commit is contained in:
Andreas Hocevar
2022-01-14 18:17:16 +01:00
committed by GitHub
3 changed files with 15 additions and 0 deletions

View File

@@ -45,6 +45,11 @@ import {
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.

View File

@@ -182,6 +182,11 @@ const SourceType = {
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("./Base.js").BackgroundColor|false} [background] Background color for the layer.
* If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent
* the Mapbox style's background from being used.

View File

@@ -62,6 +62,11 @@ import {assign} from '../obj.js';
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.