1+ export default WebGLVectorTileLayer ;
2+ /**
3+ * *
4+ */
5+ export type ExtractedFeatureType < T > = T extends import ( "../source/Vector.js" ) . default < infer U extends import ( "../Feature.js" ) . FeatureLike > ? U : never ;
6+ export type Options < VectorTileSourceType extends import ( "../source/VectorTile.js" ) . default < FeatureType > = import ( "../source/VectorTile.js" ) . default < any > , FeatureType extends import ( "../Feature.js" ) . FeatureLike = ExtractedFeatureType < VectorTileSourceType >> = {
7+ /**
8+ * A CSS class name to set to the layer element.
9+ */
10+ className ?: string | undefined ;
11+ /**
12+ * Opacity (0, 1).
13+ */
14+ opacity?: number | undefined ;
15+ /**
16+ * Visibility.
17+ */
18+ visible?: boolean | undefined ;
19+ /**
20+ * The bounding extent for layer rendering. The layer will not be
21+ * rendered outside of this extent.
22+ * FIXME: not supported yet
23+ */
24+ extent?: import ( "../extent.js" ) . Extent | undefined ;
25+ /**
26+ * The z-index for layer rendering. At rendering time, the layers
27+ * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
28+ * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
29+ * method was used.
30+ */
31+ zIndex?: number | undefined ;
32+ /**
33+ * The minimum resolution (inclusive) at which this layer will be
34+ * visible.
35+ */
36+ minResolution?: number | undefined ;
37+ /**
38+ * The maximum resolution (exclusive) below which this layer will
39+ * be visible.
40+ */
41+ maxResolution?: number | undefined ;
42+ /**
43+ * The minimum view zoom level (exclusive) above which this layer will be
44+ * visible.
45+ */
46+ minZoom?: number | undefined ;
47+ /**
48+ * The maximum view zoom level (inclusive) at which this layer will
49+ * be visible.
50+ */
51+ maxZoom?: number | undefined ;
52+ /**
53+ * Source.
54+ */
55+ source?: VectorTileSourceType | undefined ;
56+ /**
57+ * Layer style.
58+ */
59+ style: import ( "../style/flat.js" ) . FlatStyleLike ;
60+ /**
61+ * Style variables. Each variable must hold a literal value (not
62+ * an expression). These variables can be used as {@link import ("../expr/expression.js").ExpressionValue expressions} in the styles properties
63+ * using the `['var', 'varName']` operator.
64+ * To update style variables, use the {@link import ("./WebGLVector.js").default#updateStyleVariables} method.
65+ */
66+ variables?: {
67+ [ x : string ] : string | number | boolean | number [ ] ;
68+ } | undefined ;
69+ /**
70+ * Background color for the layer. If not specified, no background
71+ * will be rendered.
72+ * FIXME: not supported yet
73+ */
74+ background?: import ( "./Base.js" ) . BackgroundColor | undefined ;
75+ /**
76+ * Setting this to true will provide a slight performance boost, but will
77+ * prevent all hit detection on the layer.
78+ */
79+ disableHitDetection?: boolean | undefined ;
80+ /**
81+ * Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
82+ */
83+ properties?: {
84+ [ x : string ] : any ;
85+ } | undefined ;
86+ } ;
87+ /***
88+ * @template T
89+ * @typedef {T extends import("../source/Vector.js").default<infer U extends import("../Feature.js").FeatureLike> ? U : never } ExtractedFeatureType
90+ */
91+ /**
92+ * @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
93+ * @template {import('../Feature.js').FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
94+ * @typedef {Object } Options
95+ * @property {string } [className='ol-layer'] A CSS class name to set to the layer element.
96+ * @property {number } [opacity=1] Opacity (0, 1).
97+ * @property {boolean } [visible=true] Visibility.
98+ * @property {import("../extent.js").Extent } [extent] The bounding extent for layer rendering. The layer will not be
99+ * rendered outside of this extent.
100+ * FIXME: not supported yet
101+ * @property {number } [zIndex] The z-index for layer rendering. At rendering time, the layers
102+ * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
103+ * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
104+ * method was used.
105+ * @property {number } [minResolution] The minimum resolution (inclusive) at which this layer will be
106+ * visible.
107+ * @property {number } [maxResolution] The maximum resolution (exclusive) below which this layer will
108+ * be visible.
109+ * @property {number } [minZoom] The minimum view zoom level (exclusive) above which this layer will be
110+ * visible.
111+ * @property {number } [maxZoom] The maximum view zoom level (inclusive) at which this layer will
112+ * be visible.
113+ * @property {VectorTileSourceType } [source] Source.
114+ * @property {import('../style/flat.js').FlatStyleLike } style Layer style.
115+ * @property {import('../style/flat.js').StyleVariables } [variables] Style variables. Each variable must hold a literal value (not
116+ * an expression). These variables can be used as {@link import("../expr/expression.js").ExpressionValue expressions} in the styles properties
117+ * using the `['var', 'varName']` operator.
118+ * To update style variables, use the {@link import("./WebGLVector.js").default#updateStyleVariables} method.
119+ * @property {import("./Base.js").BackgroundColor } [background] Background color for the layer. If not specified, no background
120+ * will be rendered.
121+ * FIXME: not supported yet
122+ * @property {boolean } [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will
123+ * prevent all hit detection on the layer.
124+ * @property {Object<string, *> } [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
125+ */
126+ /**
127+ * @classdesc
128+ * Layer optimized for rendering large vector datasets.
129+ *
130+ * **Important: a `WebGLVector` layer must be manually disposed when removed, otherwise the underlying WebGL context
131+ * will not be garbage collected.**
132+ *
133+ * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
134+ * property on the layer object; for example, setting `title: 'My Title'` in the
135+ * options means that `title` is observable, and has get/set accessors.
136+ *
137+ * @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
138+ * @template {import('../Feature.js').FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
139+ * @extends {BaseTileLayer<VectorTileSourceType, WebGLVectorTileLayerRenderer> }
140+ */
141+ declare class WebGLVectorTileLayer < VectorTileSourceType extends import ( "../source/VectorTile.js" ) . default < FeatureType > = import ( "../source/VectorTile.js" ) . default < any > , FeatureType extends import ( "../Feature.js" ) . FeatureLike = ExtractedFeatureType < VectorTileSourceType > > extends BaseTileLayer < VectorTileSourceType , WebGLVectorTileLayerRenderer > {
142+ /**
143+ * @param {Options<VectorTileSourceType, FeatureType> } [options] Options.
144+ */
145+ constructor ( options ?: Options < VectorTileSourceType , FeatureType > ) ;
146+ /**
147+ * @type {import('../style/flat.js').StyleVariables }
148+ * @private
149+ */
150+ private styleVariables_ ;
151+ /**
152+ * @private
153+ */
154+ private style_ ;
155+ /**
156+ * @private
157+ */
158+ private hitDetectionDisabled_ ;
159+ /**
160+ * Update any variables used by the layer style and trigger a re-render.
161+ * @param {import('../style/flat.js').StyleVariables } variables Variables to update.
162+ */
163+ updateStyleVariables ( variables : import ( "../style/flat.js" ) . StyleVariables ) : void ;
164+ /**
165+ * Set the layer style.
166+ * @param {import('../style/flat.js').FlatStyleLike } style Layer style.
167+ */
168+ setStyle ( style : import ( "../style/flat.js" ) . FlatStyleLike ) : void ;
169+ style : import ( "../style/flat.js" ) . FlatStyleLike | undefined ;
170+ }
171+ import WebGLVectorTileLayerRenderer from '../renderer/webgl/VectorTileLayer.js' ;
172+ import BaseTileLayer from './BaseTile.js' ;
173+ //# sourceMappingURL=WebGLVectorTile.d.ts.map
0 commit comments