@emuanalytics/flow-rdf-core 4.0.0-preview.7 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +681 -670
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +647 -647
- package/dist/lib/map/plugins/index.cjs +39 -37
- package/dist/lib/map/plugins/index.d.cts +8 -8
- package/dist/lib/map/plugins/index.d.mts +8 -8
- package/dist/lib/map/plugins/index.d.ts +8 -8
- package/dist/lib/map/plugins/index.mjs +12 -10
- package/dist/lib/utils/index.cjs +31 -29
- package/dist/lib/utils/index.d.cts +10 -9
- package/dist/lib/utils/index.d.mts +10 -9
- package/dist/lib/utils/index.d.ts +10 -9
- package/dist/lib/utils/index.mjs +4 -3
- package/dist/shared/{flow-rdf-core.ea06a1d3.mjs → flow-rdf-core.187cb345.mjs} +1 -1
- package/dist/shared/{flow-rdf-core.bd95d618.mjs → flow-rdf-core.1f0901c5.mjs} +1 -1
- package/dist/shared/{flow-rdf-core.b80085b4.mjs → flow-rdf-core.25e5f6d7.mjs} +9 -1
- package/dist/shared/{flow-rdf-core.1f72b20b.cjs → flow-rdf-core.55c169ca.cjs} +2 -2
- package/dist/shared/{flow-rdf-core.1f9c0593.cjs → flow-rdf-core.9b5dad76.cjs} +26 -34
- package/dist/shared/{flow-rdf-core.84eded74.cjs → flow-rdf-core.a82b9be4.cjs} +4 -4
- package/dist/shared/{flow-rdf-core.769a4928.d.mts → flow-rdf-core.dd931ace.d.cts} +817 -818
- package/dist/shared/{flow-rdf-core.769a4928.d.ts → flow-rdf-core.dd931ace.d.mts} +817 -818
- package/dist/shared/{flow-rdf-core.769a4928.d.cts → flow-rdf-core.dd931ace.d.ts} +817 -818
- package/dist/shared/{flow-rdf-core.ce91eb14.mjs → flow-rdf-core.e2b1bb7f.mjs} +2 -9
- package/dist/shared/{flow-rdf-core.3042be4a.cjs → flow-rdf-core.f50908f0.cjs} +9 -0
- package/package.json +5 -1
|
@@ -113,6 +113,135 @@ declare class Debugger<TState extends StateStore = StateStore> {
|
|
|
113
113
|
private logStateValue;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
/** Result format of a [[Query]]. */
|
|
117
|
+
type QueryResultFormat = 'json' | 'geojson' | 'csv';
|
|
118
|
+
/** [[FlowQueryDefinition]] 'attributes' entry. */
|
|
119
|
+
type QueryAttribute = string | [any, string];
|
|
120
|
+
/**
|
|
121
|
+
* [[FlowQueryDefinition]] 'where' clauses.
|
|
122
|
+
*/
|
|
123
|
+
interface QueryWhereClauses {
|
|
124
|
+
[attribute: string]: any;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* [[FlowQueryDefinition]] extra parameters.
|
|
128
|
+
*/
|
|
129
|
+
interface QueryExtraParams {
|
|
130
|
+
[key: string]: string | number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* [[FlowQueryDefinition]] 'order' clause.
|
|
134
|
+
*
|
|
135
|
+
* A field name or [field, asc/desc] tuple.
|
|
136
|
+
*/
|
|
137
|
+
type QueryOrderClause = string | number | [string | number, 'asc' | 'desc'];
|
|
138
|
+
interface QuerySampleOptions {
|
|
139
|
+
percentage: number;
|
|
140
|
+
method?: 'system' | 'bernoulli';
|
|
141
|
+
seed?: number;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Definition of a Flo.w reactive dataset query.
|
|
145
|
+
*/
|
|
146
|
+
interface QueryDefinition {
|
|
147
|
+
/** ID of dataset to query. */
|
|
148
|
+
datasetId: string;
|
|
149
|
+
/** Attributes to return in results. */
|
|
150
|
+
attributes?: QueryAttribute[];
|
|
151
|
+
/** DISTINCT ON attributes */
|
|
152
|
+
distinct?: string | string[];
|
|
153
|
+
/** Filter results using 'where' clauses. */
|
|
154
|
+
where?: QueryWhereClauses;
|
|
155
|
+
/** Sort results by attributes. */
|
|
156
|
+
order?: QueryOrderClause[];
|
|
157
|
+
/** Group results by attributes. */
|
|
158
|
+
group?: (string | number)[];
|
|
159
|
+
/** Start offset of returned results */
|
|
160
|
+
offset?: number;
|
|
161
|
+
/** Limit number of returned results */
|
|
162
|
+
limit?: number;
|
|
163
|
+
/** Format of returned data. */
|
|
164
|
+
format?: QueryResultFormat;
|
|
165
|
+
/** Additional query parameters. */
|
|
166
|
+
params?: QueryExtraParams;
|
|
167
|
+
/** Sampling options. */
|
|
168
|
+
sample?: QuerySampleOptions;
|
|
169
|
+
}
|
|
170
|
+
interface QueryOptions {
|
|
171
|
+
id?: string;
|
|
172
|
+
fireImmediately?: boolean;
|
|
173
|
+
delay?: number;
|
|
174
|
+
contextId?: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* [[FlowQuery]] query definition function.
|
|
178
|
+
*
|
|
179
|
+
* @typeParam TState Type of application state.
|
|
180
|
+
*/
|
|
181
|
+
type QueryDefinitionFn<TState> = (this: TState, store: TState) => QueryDefinition | Promise<QueryDefinition> | null;
|
|
182
|
+
/**
|
|
183
|
+
* [[FlowQuery]] result transform function.
|
|
184
|
+
*
|
|
185
|
+
* @typeParam T Type of transformed query results.
|
|
186
|
+
*/
|
|
187
|
+
type QueryResultTransformFn<T = any> = (results: any) => T | null;
|
|
188
|
+
|
|
189
|
+
declare class Query<TResults, TState extends StateStore = any> {
|
|
190
|
+
private queryFn;
|
|
191
|
+
private static _defaultOptions;
|
|
192
|
+
static setDefaultOptions(options: QueryOptions): void;
|
|
193
|
+
private _options;
|
|
194
|
+
private _committer;
|
|
195
|
+
private _disposer;
|
|
196
|
+
private _transformFn;
|
|
197
|
+
private get formattedName();
|
|
198
|
+
get id(): string;
|
|
199
|
+
results: TResults | null;
|
|
200
|
+
busy: boolean;
|
|
201
|
+
error: Error | null;
|
|
202
|
+
constructor(queryFn: QueryDefinitionFn<TState | null>, transformFn?: QueryResultTransformFn<TResults>, options?: QueryOptions);
|
|
203
|
+
destroy(): void;
|
|
204
|
+
runImmediately(): Promise<TResults | null>;
|
|
205
|
+
private wake;
|
|
206
|
+
private sleep;
|
|
207
|
+
private runQuery;
|
|
208
|
+
}
|
|
209
|
+
declare function query<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, options: QueryOptions): Query<TResult, TState>;
|
|
210
|
+
declare function query<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, transformFn?: QueryResultTransformFn<TResult>, options?: QueryOptions): Query<TResult, TState>;
|
|
211
|
+
declare function queryMany<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, options: QueryOptions): Query<TResult[], TState>;
|
|
212
|
+
declare function queryMany<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, transformFn?: QueryResultTransformFn<TResult[]>, options?: QueryOptions): Query<TResult[], TState>;
|
|
213
|
+
declare function queryOne<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, options: QueryOptions): Query<TResult, TState>;
|
|
214
|
+
declare function queryOne<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, transformFn?: QueryResultTransformFn<TResult>, options?: QueryOptions): Query<TResult, TState>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The `QueryRegistry` is a container for [[Query]] instances.
|
|
218
|
+
*
|
|
219
|
+
* Queries can be registered and retrieved by ID.
|
|
220
|
+
*/
|
|
221
|
+
declare class QueryRegistry {
|
|
222
|
+
private _queries;
|
|
223
|
+
/**
|
|
224
|
+
* Register a Flo.w reactive query.
|
|
225
|
+
*
|
|
226
|
+
* @param query Query to register.
|
|
227
|
+
*/
|
|
228
|
+
registerQuery(query: Query<any>): void;
|
|
229
|
+
/**
|
|
230
|
+
* Un-register a Flo.w reactive query.
|
|
231
|
+
*
|
|
232
|
+
* @param query Query to unregister.
|
|
233
|
+
*/
|
|
234
|
+
unregisterQuery(query: Query<any>): void;
|
|
235
|
+
/**
|
|
236
|
+
* Retrieve the specified query.
|
|
237
|
+
*
|
|
238
|
+
* This method returns a promise that resolves when the query has been initialized.
|
|
239
|
+
*
|
|
240
|
+
* @param id Map ID.
|
|
241
|
+
*/
|
|
242
|
+
getQuery<TResults = any, TState extends StateStore = any>(id: string): Promise<Query<TResults, TState>>;
|
|
243
|
+
}
|
|
244
|
+
|
|
116
245
|
declare class FlowError extends Error {
|
|
117
246
|
cause?: Error | undefined;
|
|
118
247
|
constructor(message: string, cause?: Error | undefined);
|
|
@@ -199,949 +328,949 @@ declare function expr(expr: string): StyleExpression;
|
|
|
199
328
|
|
|
200
329
|
type MapLayerType = 'fill' | 'line' | 'symbol' | 'circle' | 'heatmap' | 'fill-extrusion' | 'raster' | 'hillshade' | 'background';
|
|
201
330
|
/**
|
|
202
|
-
|
|
203
|
-
|
|
331
|
+
* Style builder for 'fill' layers.
|
|
332
|
+
*/
|
|
204
333
|
declare class FillLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
205
334
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
335
|
+
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
|
|
336
|
+
*
|
|
337
|
+
* @param value - fill-sort-key value
|
|
338
|
+
*/
|
|
210
339
|
fillSortKey(value: number | StyleExpression): this;
|
|
211
340
|
/**
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
341
|
+
* Whether or not the fill should be antialiased.
|
|
342
|
+
*
|
|
343
|
+
* @param value - fill-antialias value (default `true`)
|
|
344
|
+
*/
|
|
216
345
|
fillAntialias(value: boolean | StyleExpression): this;
|
|
217
346
|
/**
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
347
|
+
* The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.
|
|
348
|
+
*
|
|
349
|
+
* @param value - fill-opacity value (default `1`)
|
|
350
|
+
*/
|
|
222
351
|
fillOpacity(value: number | StyleExpression): this;
|
|
223
352
|
/**
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
353
|
+
* The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
|
|
354
|
+
*
|
|
355
|
+
* @param value - fill-color value (default `#000000`)
|
|
356
|
+
*/
|
|
228
357
|
fillColor(value: string | StyleExpression): this;
|
|
229
358
|
/**
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
359
|
+
* The outline color of the fill. Matches the value of `fill-color` if unspecified.
|
|
360
|
+
*
|
|
361
|
+
* @param value - fill-outline-color value
|
|
362
|
+
*/
|
|
234
363
|
fillOutlineColor(value: string | StyleExpression): this;
|
|
235
364
|
/**
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
365
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
|
|
366
|
+
*
|
|
367
|
+
* @param value - fill-translate value in pixels (default `0,0`)
|
|
368
|
+
*/
|
|
240
369
|
fillTranslate(value: number[] | StyleExpression): this;
|
|
241
370
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
371
|
+
* Controls the frame of reference for `fill-translate`.
|
|
372
|
+
*
|
|
373
|
+
* Values:
|
|
374
|
+
* - map: The fill is translated relative to the map.
|
|
375
|
+
* - viewport: The fill is translated relative to the viewport.
|
|
376
|
+
*
|
|
377
|
+
* @param value - fill-translate-anchor value (default `map`)
|
|
378
|
+
*/
|
|
250
379
|
fillTranslateAnchor(value: ('map' | 'viewport') | StyleExpression): this;
|
|
251
380
|
/**
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
381
|
+
* Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.
|
|
382
|
+
*
|
|
383
|
+
* @param value - fill-pattern value
|
|
384
|
+
*/
|
|
256
385
|
fillPattern(value: string | StyleExpression): this;
|
|
257
386
|
}
|
|
258
387
|
/**
|
|
259
|
-
|
|
260
|
-
|
|
388
|
+
* Style builder for 'line' layers.
|
|
389
|
+
*/
|
|
261
390
|
declare class LineLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
262
391
|
/**
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
392
|
+
* The display of line endings.
|
|
393
|
+
*
|
|
394
|
+
* Values:
|
|
395
|
+
* - butt: A cap with a squared-off end which is drawn to the exact endpoint of the line.
|
|
396
|
+
* - round: A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
|
|
397
|
+
* - square: A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
|
|
398
|
+
*
|
|
399
|
+
* @param value - line-cap value (default `butt`)
|
|
400
|
+
*/
|
|
272
401
|
lineCap(value: ('butt' | 'round' | 'square') | StyleExpression): this;
|
|
273
402
|
/**
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
403
|
+
* The display of lines when joining.
|
|
404
|
+
*
|
|
405
|
+
* Values:
|
|
406
|
+
* - bevel: A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
|
|
407
|
+
* - round: A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
|
|
408
|
+
* - miter: A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.
|
|
409
|
+
*
|
|
410
|
+
* @param value - line-join value (default `miter`)
|
|
411
|
+
*/
|
|
283
412
|
lineJoin(value: ('bevel' | 'round' | 'miter') | StyleExpression): this;
|
|
284
413
|
/**
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
414
|
+
* Used to automatically convert miter joins to bevel joins for sharp angles.
|
|
415
|
+
*
|
|
416
|
+
* @param value - line-miter-limit value (default `2`)
|
|
417
|
+
*/
|
|
289
418
|
lineMiterLimit(value: number | StyleExpression): this;
|
|
290
419
|
/**
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
420
|
+
* Used to automatically convert round joins to miter joins for shallow angles.
|
|
421
|
+
*
|
|
422
|
+
* @param value - line-round-limit value (default `1.05`)
|
|
423
|
+
*/
|
|
295
424
|
lineRoundLimit(value: number | StyleExpression): this;
|
|
296
425
|
/**
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
426
|
+
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
|
|
427
|
+
*
|
|
428
|
+
* @param value - line-sort-key value
|
|
429
|
+
*/
|
|
301
430
|
lineSortKey(value: number | StyleExpression): this;
|
|
302
431
|
/**
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
432
|
+
* The opacity at which the line will be drawn.
|
|
433
|
+
*
|
|
434
|
+
* @param value - line-opacity value (default `1`)
|
|
435
|
+
*/
|
|
307
436
|
lineOpacity(value: number | StyleExpression): this;
|
|
308
437
|
/**
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
438
|
+
* The color with which the line will be drawn.
|
|
439
|
+
*
|
|
440
|
+
* @param value - line-color value (default `#000000`)
|
|
441
|
+
*/
|
|
313
442
|
lineColor(value: string | StyleExpression): this;
|
|
314
443
|
/**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
444
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
|
|
445
|
+
*
|
|
446
|
+
* @param value - line-translate value in pixels (default `0,0`)
|
|
447
|
+
*/
|
|
319
448
|
lineTranslate(value: number[] | StyleExpression): this;
|
|
320
449
|
/**
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
450
|
+
* Controls the frame of reference for `line-translate`.
|
|
451
|
+
*
|
|
452
|
+
* Values:
|
|
453
|
+
* - map: The line is translated relative to the map.
|
|
454
|
+
* - viewport: The line is translated relative to the viewport.
|
|
455
|
+
*
|
|
456
|
+
* @param value - line-translate-anchor value (default `map`)
|
|
457
|
+
*/
|
|
329
458
|
lineTranslateAnchor(value: ('map' | 'viewport') | StyleExpression): this;
|
|
330
459
|
/**
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
460
|
+
* Stroke thickness.
|
|
461
|
+
*
|
|
462
|
+
* @param value - line-width value in pixels (default `1`)
|
|
463
|
+
*/
|
|
335
464
|
lineWidth(value: number | StyleExpression): this;
|
|
336
465
|
/**
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
466
|
+
* Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
|
|
467
|
+
*
|
|
468
|
+
* @param value - line-gap-width value in pixels
|
|
469
|
+
*/
|
|
341
470
|
lineGapWidth(value: number | StyleExpression): this;
|
|
342
471
|
/**
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
472
|
+
* The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
|
|
473
|
+
*
|
|
474
|
+
* @param value - line-offset value in pixels
|
|
475
|
+
*/
|
|
347
476
|
lineOffset(value: number | StyleExpression): this;
|
|
348
477
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
478
|
+
* Blur applied to the line, in pixels.
|
|
479
|
+
*
|
|
480
|
+
* @param value - line-blur value in pixels
|
|
481
|
+
*/
|
|
353
482
|
lineBlur(value: number | StyleExpression): this;
|
|
354
483
|
/**
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
484
|
+
* Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.
|
|
485
|
+
*
|
|
486
|
+
* @param value - line-dasharray value in line widths
|
|
487
|
+
*/
|
|
359
488
|
lineDasharray(value: number[] | StyleExpression): this;
|
|
360
489
|
/**
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
490
|
+
* Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.
|
|
491
|
+
*
|
|
492
|
+
* @param value - line-pattern value
|
|
493
|
+
*/
|
|
365
494
|
linePattern(value: string | StyleExpression): this;
|
|
366
495
|
/**
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
496
|
+
* Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.
|
|
497
|
+
*
|
|
498
|
+
* @param value - line-gradient value
|
|
499
|
+
*/
|
|
371
500
|
lineGradient(value: string | StyleExpression): this;
|
|
372
501
|
}
|
|
373
502
|
/**
|
|
374
|
-
|
|
375
|
-
|
|
503
|
+
* Style builder for 'symbol' layers.
|
|
504
|
+
*/
|
|
376
505
|
declare class SymbolLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
377
506
|
/**
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
507
|
+
* Label placement relative to its geometry.
|
|
508
|
+
*
|
|
509
|
+
* Values:
|
|
510
|
+
* - point: The label is placed at the point where the geometry is located.
|
|
511
|
+
* - line: The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.
|
|
512
|
+
* - line-center: The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries.
|
|
513
|
+
*
|
|
514
|
+
* @param value - symbol-placement value (default `point`)
|
|
515
|
+
*/
|
|
387
516
|
symbolPlacement(value: ('point' | 'line' | 'line-center') | StyleExpression): this;
|
|
388
517
|
/**
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
518
|
+
* Distance between two symbol anchors.
|
|
519
|
+
*
|
|
520
|
+
* @param value - symbol-spacing value in pixels (default `250`)
|
|
521
|
+
*/
|
|
393
522
|
symbolSpacing(value: number | StyleExpression): this;
|
|
394
523
|
/**
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
524
|
+
* If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
|
|
525
|
+
*
|
|
526
|
+
* @param value - symbol-avoid-edges value
|
|
527
|
+
*/
|
|
399
528
|
symbolAvoidEdges(value: boolean | StyleExpression): this;
|
|
400
529
|
/**
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
530
|
+
* Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.
|
|
531
|
+
*
|
|
532
|
+
* @param value - symbol-sort-key value
|
|
533
|
+
*/
|
|
405
534
|
symbolSortKey(value: number | StyleExpression): this;
|
|
406
535
|
/**
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
536
|
+
* Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.
|
|
537
|
+
*
|
|
538
|
+
* Values:
|
|
539
|
+
* - auto: Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.
|
|
540
|
+
* - viewport-y: Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.
|
|
541
|
+
* - source: Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data.
|
|
542
|
+
*
|
|
543
|
+
* @param value - symbol-z-order value (default `auto`)
|
|
544
|
+
*/
|
|
416
545
|
symbolZOrder(value: ('auto' | 'viewport-y' | 'source') | StyleExpression): this;
|
|
417
546
|
/**
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
547
|
+
* If true, the icon will be visible even if it collides with other previously drawn symbols.
|
|
548
|
+
*
|
|
549
|
+
* @param value - icon-allow-overlap value
|
|
550
|
+
*/
|
|
422
551
|
iconAllowOverlap(value: boolean | StyleExpression): this;
|
|
423
552
|
/**
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
553
|
+
* Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, `icon-allow-overlap` is used instead.
|
|
554
|
+
*
|
|
555
|
+
* Values:
|
|
556
|
+
* - never: The icon will be hidden if it collides with any other previously drawn symbol.
|
|
557
|
+
* - always: The icon will be visible even if it collides with any other previously drawn symbol.
|
|
558
|
+
* - cooperative: If the icon collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new icon is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new icon is visible.
|
|
559
|
+
*
|
|
560
|
+
* @param value - icon-overlap value
|
|
561
|
+
*/
|
|
433
562
|
iconOverlap(value: ('never' | 'always' | 'cooperative') | StyleExpression): this;
|
|
434
563
|
/**
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
564
|
+
* If true, other symbols can be visible even if they collide with the icon.
|
|
565
|
+
*
|
|
566
|
+
* @param value - icon-ignore-placement value
|
|
567
|
+
*/
|
|
439
568
|
iconIgnorePlacement(value: boolean | StyleExpression): this;
|
|
440
569
|
/**
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
570
|
+
* If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
|
|
571
|
+
*
|
|
572
|
+
* @param value - icon-optional value
|
|
573
|
+
*/
|
|
445
574
|
iconOptional(value: boolean | StyleExpression): this;
|
|
446
575
|
/**
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
576
|
+
* In combination with `symbol-placement`, determines the rotation behavior of icons.
|
|
577
|
+
*
|
|
578
|
+
* Values:
|
|
579
|
+
* - map: When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line.
|
|
580
|
+
* - viewport: Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.
|
|
581
|
+
* - auto: When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.
|
|
582
|
+
*
|
|
583
|
+
* @param value - icon-rotation-alignment value (default `auto`)
|
|
584
|
+
*/
|
|
456
585
|
iconRotationAlignment(value: ('map' | 'viewport' | 'auto') | StyleExpression): this;
|
|
457
586
|
/**
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
587
|
+
* Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.
|
|
588
|
+
*
|
|
589
|
+
* @param value - icon-size value in factor of the original icon size (default `1`)
|
|
590
|
+
*/
|
|
462
591
|
iconSize(value: number | StyleExpression): this;
|
|
463
592
|
/**
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
593
|
+
* Scales the icon to fit around the associated text.
|
|
594
|
+
*
|
|
595
|
+
* Values:
|
|
596
|
+
* - none: The icon is displayed at its intrinsic aspect ratio.
|
|
597
|
+
* - width: The icon is scaled in the x-dimension to fit the width of the text.
|
|
598
|
+
* - height: The icon is scaled in the y-dimension to fit the height of the text.
|
|
599
|
+
* - both: The icon is scaled in both x- and y-dimensions.
|
|
600
|
+
*
|
|
601
|
+
* @param value - icon-text-fit value (default `none`)
|
|
602
|
+
*/
|
|
474
603
|
iconTextFit(value: ('none' | 'width' | 'height' | 'both') | StyleExpression): this;
|
|
475
604
|
/**
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
605
|
+
* Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.
|
|
606
|
+
*
|
|
607
|
+
* @param value - icon-text-fit-padding value in pixels (default `0,0,0,0`)
|
|
608
|
+
*/
|
|
480
609
|
iconTextFitPadding(value: number[] | StyleExpression): this;
|
|
481
610
|
/**
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
611
|
+
* Name of image in sprite to use for drawing an image background.
|
|
612
|
+
*
|
|
613
|
+
* @param value - icon-image value
|
|
614
|
+
*/
|
|
486
615
|
iconImage(value: string | StyleExpression): this;
|
|
487
616
|
/**
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
617
|
+
* Rotates the icon clockwise.
|
|
618
|
+
*
|
|
619
|
+
* @param value - icon-rotate value in degrees
|
|
620
|
+
*/
|
|
492
621
|
iconRotate(value: number | StyleExpression): this;
|
|
493
622
|
/**
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
623
|
+
* Size of additional area round the icon bounding box used for detecting symbol collisions. Values are declared using CSS margin shorthand syntax: a single value applies to all four sides; two values apply to [top/bottom, left/right]; three values apply to [top, left/right, bottom]; four values apply to [top, right, bottom, left]. For backwards compatibility, a single bare number is accepted, and treated the same as a one-element array - padding applied to all sides.
|
|
624
|
+
*
|
|
625
|
+
* @param value - icon-padding value in pixels (default `2`)
|
|
626
|
+
*/
|
|
498
627
|
iconPadding(value: string | StyleExpression): this;
|
|
499
628
|
/**
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
629
|
+
* If true, the icon may be flipped to prevent it from being rendered upside-down.
|
|
630
|
+
*
|
|
631
|
+
* @param value - icon-keep-upright value
|
|
632
|
+
*/
|
|
504
633
|
iconKeepUpright(value: boolean | StyleExpression): this;
|
|
505
634
|
/**
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
635
|
+
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.
|
|
636
|
+
*
|
|
637
|
+
* @param value - icon-offset value (default `0,0`)
|
|
638
|
+
*/
|
|
510
639
|
iconOffset(value: number[] | StyleExpression): this;
|
|
511
640
|
/**
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
641
|
+
* Part of the icon placed closest to the anchor.
|
|
642
|
+
*
|
|
643
|
+
* Values:
|
|
644
|
+
* - center: The center of the icon is placed closest to the anchor.
|
|
645
|
+
* - left: The left side of the icon is placed closest to the anchor.
|
|
646
|
+
* - right: The right side of the icon is placed closest to the anchor.
|
|
647
|
+
* - top: The top of the icon is placed closest to the anchor.
|
|
648
|
+
* - bottom: The bottom of the icon is placed closest to the anchor.
|
|
649
|
+
* - top-left: The top left corner of the icon is placed closest to the anchor.
|
|
650
|
+
* - top-right: The top right corner of the icon is placed closest to the anchor.
|
|
651
|
+
* - bottom-left: The bottom left corner of the icon is placed closest to the anchor.
|
|
652
|
+
* - bottom-right: The bottom right corner of the icon is placed closest to the anchor.
|
|
653
|
+
*
|
|
654
|
+
* @param value - icon-anchor value (default `center`)
|
|
655
|
+
*/
|
|
527
656
|
iconAnchor(value: ('center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right') | StyleExpression): this;
|
|
528
657
|
/**
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
658
|
+
* Orientation of icon when map is pitched.
|
|
659
|
+
*
|
|
660
|
+
* Values:
|
|
661
|
+
* - map: The icon is aligned to the plane of the map.
|
|
662
|
+
* - viewport: The icon is aligned to the plane of the viewport.
|
|
663
|
+
* - auto: Automatically matches the value of `icon-rotation-alignment`.
|
|
664
|
+
*
|
|
665
|
+
* @param value - icon-pitch-alignment value (default `auto`)
|
|
666
|
+
*/
|
|
538
667
|
iconPitchAlignment(value: ('map' | 'viewport' | 'auto') | StyleExpression): this;
|
|
539
668
|
/**
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
669
|
+
* Orientation of text when map is pitched.
|
|
670
|
+
*
|
|
671
|
+
* Values:
|
|
672
|
+
* - map: The text is aligned to the plane of the map.
|
|
673
|
+
* - viewport: The text is aligned to the plane of the viewport.
|
|
674
|
+
* - auto: Automatically matches the value of `text-rotation-alignment`.
|
|
675
|
+
*
|
|
676
|
+
* @param value - text-pitch-alignment value (default `auto`)
|
|
677
|
+
*/
|
|
549
678
|
textPitchAlignment(value: ('map' | 'viewport' | 'auto') | StyleExpression): this;
|
|
550
679
|
/**
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
680
|
+
* In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.
|
|
681
|
+
*
|
|
682
|
+
* Values:
|
|
683
|
+
* - map: When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line.
|
|
684
|
+
* - viewport: Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.
|
|
685
|
+
* - viewport-glyph: When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line.
|
|
686
|
+
* - auto: When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.
|
|
687
|
+
*
|
|
688
|
+
* @param value - text-rotation-alignment value (default `auto`)
|
|
689
|
+
*/
|
|
561
690
|
textRotationAlignment(value: ('map' | 'viewport' | 'viewport-glyph' | 'auto') | StyleExpression): this;
|
|
562
691
|
/**
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
692
|
+
* Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
|
|
693
|
+
*
|
|
694
|
+
* @param value - text-field value
|
|
695
|
+
*/
|
|
567
696
|
textField(value: string | StyleExpression): this;
|
|
568
697
|
/**
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
698
|
+
* Font stack to use for displaying text.
|
|
699
|
+
*
|
|
700
|
+
* @param value - text-font value (default `Open Sans Regular,Arial Unicode MS Regular`)
|
|
701
|
+
*/
|
|
573
702
|
textFont(value: string[] | StyleExpression): this;
|
|
574
703
|
/**
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
704
|
+
* Font size.
|
|
705
|
+
*
|
|
706
|
+
* @param value - text-size value in pixels (default `16`)
|
|
707
|
+
*/
|
|
579
708
|
textSize(value: number | StyleExpression): this;
|
|
580
709
|
/**
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
710
|
+
* The maximum line width for text wrapping.
|
|
711
|
+
*
|
|
712
|
+
* @param value - text-max-width value in ems (default `10`)
|
|
713
|
+
*/
|
|
585
714
|
textMaxWidth(value: number | StyleExpression): this;
|
|
586
715
|
/**
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
716
|
+
* Text leading value for multi-line text.
|
|
717
|
+
*
|
|
718
|
+
* @param value - text-line-height value in ems (default `1.2`)
|
|
719
|
+
*/
|
|
591
720
|
textLineHeight(value: number | StyleExpression): this;
|
|
592
721
|
/**
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
722
|
+
* Text tracking amount.
|
|
723
|
+
*
|
|
724
|
+
* @param value - text-letter-spacing value in ems
|
|
725
|
+
*/
|
|
597
726
|
textLetterSpacing(value: number | StyleExpression): this;
|
|
598
727
|
/**
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
728
|
+
* Text justification options.
|
|
729
|
+
*
|
|
730
|
+
* Values:
|
|
731
|
+
* - auto: The text is aligned towards the anchor position.
|
|
732
|
+
* - left: The text is aligned to the left.
|
|
733
|
+
* - center: The text is centered.
|
|
734
|
+
* - right: The text is aligned to the right.
|
|
735
|
+
*
|
|
736
|
+
* @param value - text-justify value (default `center`)
|
|
737
|
+
*/
|
|
609
738
|
textJustify(value: ('auto' | 'left' | 'center' | 'right') | StyleExpression): this;
|
|
610
739
|
/**
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
740
|
+
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.
|
|
741
|
+
*
|
|
742
|
+
* @param value - text-radial-offset value in ems
|
|
743
|
+
*/
|
|
615
744
|
textRadialOffset(value: number | StyleExpression): this;
|
|
616
745
|
/**
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
746
|
+
* To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.
|
|
747
|
+
*
|
|
748
|
+
* Values:
|
|
749
|
+
* - center: The center of the text is placed closest to the anchor.
|
|
750
|
+
* - left: The left side of the text is placed closest to the anchor.
|
|
751
|
+
* - right: The right side of the text is placed closest to the anchor.
|
|
752
|
+
* - top: The top of the text is placed closest to the anchor.
|
|
753
|
+
* - bottom: The bottom of the text is placed closest to the anchor.
|
|
754
|
+
* - top-left: The top left corner of the text is placed closest to the anchor.
|
|
755
|
+
* - top-right: The top right corner of the text is placed closest to the anchor.
|
|
756
|
+
* - bottom-left: The bottom left corner of the text is placed closest to the anchor.
|
|
757
|
+
* - bottom-right: The bottom right corner of the text is placed closest to the anchor.
|
|
758
|
+
*
|
|
759
|
+
* @param value - text-variable-anchor value
|
|
760
|
+
*/
|
|
632
761
|
textVariableAnchor(value: ('center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right')[] | StyleExpression): this;
|
|
633
762
|
/**
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
763
|
+
* To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position.
|
|
764
|
+
|
|
765
|
+
The length of the array must be even, and must alternate between enum and point entries. i.e., each anchor location must be accompanied by a point, and that point defines the offset when the corresponding anchor location is used. Positive offset values indicate right and down, while negative values indicate left and up. Anchor locations may repeat, allowing the renderer to try multiple offsets to try and place a label using the same anchor.
|
|
766
|
+
|
|
767
|
+
When present, this property takes precedence over `text-anchor`, `text-variable-anchor`, `text-offset`, and `text-radial-offset`.
|
|
768
|
+
|
|
769
|
+
```json
|
|
770
|
+
{ "text-variable-anchor-offset": ["top", [0, 4], "left", [3,0], "bottom", [1, 1]] }
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
When the renderer chooses the `top` anchor, `[0, 4]` will be used for `text-offset`; the text will be shifted down by 4 ems.
|
|
774
|
+
|
|
775
|
+
When the renderer chooses the `left` anchor, `[3, 0]` will be used for `text-offset`; the text will be shifted right by 3 ems.
|
|
776
|
+
*
|
|
777
|
+
* @param value - text-variable-anchor-offset value
|
|
778
|
+
*/
|
|
650
779
|
textVariableAnchorOffset(value: string | StyleExpression): this;
|
|
651
780
|
/**
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
781
|
+
* Part of the text placed closest to the anchor.
|
|
782
|
+
*
|
|
783
|
+
* Values:
|
|
784
|
+
* - center: The center of the text is placed closest to the anchor.
|
|
785
|
+
* - left: The left side of the text is placed closest to the anchor.
|
|
786
|
+
* - right: The right side of the text is placed closest to the anchor.
|
|
787
|
+
* - top: The top of the text is placed closest to the anchor.
|
|
788
|
+
* - bottom: The bottom of the text is placed closest to the anchor.
|
|
789
|
+
* - top-left: The top left corner of the text is placed closest to the anchor.
|
|
790
|
+
* - top-right: The top right corner of the text is placed closest to the anchor.
|
|
791
|
+
* - bottom-left: The bottom left corner of the text is placed closest to the anchor.
|
|
792
|
+
* - bottom-right: The bottom right corner of the text is placed closest to the anchor.
|
|
793
|
+
*
|
|
794
|
+
* @param value - text-anchor value (default `center`)
|
|
795
|
+
*/
|
|
667
796
|
textAnchor(value: ('center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right') | StyleExpression): this;
|
|
668
797
|
/**
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
798
|
+
* Maximum angle change between adjacent characters.
|
|
799
|
+
*
|
|
800
|
+
* @param value - text-max-angle value in degrees (default `45`)
|
|
801
|
+
*/
|
|
673
802
|
textMaxAngle(value: number | StyleExpression): this;
|
|
674
803
|
/**
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
804
|
+
* The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
|
|
805
|
+
*
|
|
806
|
+
* Values:
|
|
807
|
+
* - horizontal: If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally.
|
|
808
|
+
* - vertical: If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically.
|
|
809
|
+
*
|
|
810
|
+
* @param value - text-writing-mode value
|
|
811
|
+
*/
|
|
683
812
|
textWritingMode(value: ('horizontal' | 'vertical')[] | StyleExpression): this;
|
|
684
813
|
/**
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
814
|
+
* Rotates the text clockwise.
|
|
815
|
+
*
|
|
816
|
+
* @param value - text-rotate value in degrees
|
|
817
|
+
*/
|
|
689
818
|
textRotate(value: number | StyleExpression): this;
|
|
690
819
|
/**
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
820
|
+
* Size of the additional area around the text bounding box used for detecting symbol collisions.
|
|
821
|
+
*
|
|
822
|
+
* @param value - text-padding value in pixels (default `2`)
|
|
823
|
+
*/
|
|
695
824
|
textPadding(value: number | StyleExpression): this;
|
|
696
825
|
/**
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
826
|
+
* If true, the text may be flipped vertically to prevent it from being rendered upside-down.
|
|
827
|
+
*
|
|
828
|
+
* @param value - text-keep-upright value (default `true`)
|
|
829
|
+
*/
|
|
701
830
|
textKeepUpright(value: boolean | StyleExpression): this;
|
|
702
831
|
/**
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
832
|
+
* Specifies how to capitalize text, similar to the CSS `text-transform` property.
|
|
833
|
+
*
|
|
834
|
+
* Values:
|
|
835
|
+
* - none: The text is not altered.
|
|
836
|
+
* - uppercase: Forces all letters to be displayed in uppercase.
|
|
837
|
+
* - lowercase: Forces all letters to be displayed in lowercase.
|
|
838
|
+
*
|
|
839
|
+
* @param value - text-transform value (default `none`)
|
|
840
|
+
*/
|
|
712
841
|
textTransform(value: ('none' | 'uppercase' | 'lowercase') | StyleExpression): this;
|
|
713
842
|
/**
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
843
|
+
* Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.
|
|
844
|
+
*
|
|
845
|
+
* @param value - text-offset value in ems (default `0,0`)
|
|
846
|
+
*/
|
|
718
847
|
textOffset(value: number[] | StyleExpression): this;
|
|
719
848
|
/**
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
849
|
+
* If true, the text will be visible even if it collides with other previously drawn symbols.
|
|
850
|
+
*
|
|
851
|
+
* @param value - text-allow-overlap value
|
|
852
|
+
*/
|
|
724
853
|
textAllowOverlap(value: boolean | StyleExpression): this;
|
|
725
854
|
/**
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
855
|
+
* Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, `text-allow-overlap` is used instead
|
|
856
|
+
*
|
|
857
|
+
* Values:
|
|
858
|
+
* - never: The text will be hidden if it collides with any other previously drawn symbol.
|
|
859
|
+
* - always: The text will be visible even if it collides with any other previously drawn symbol.
|
|
860
|
+
* - cooperative: If the text collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new text is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new text is visible.
|
|
861
|
+
*
|
|
862
|
+
* @param value - text-overlap value
|
|
863
|
+
*/
|
|
735
864
|
textOverlap(value: ('never' | 'always' | 'cooperative') | StyleExpression): this;
|
|
736
865
|
/**
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
866
|
+
* If true, other symbols can be visible even if they collide with the text.
|
|
867
|
+
*
|
|
868
|
+
* @param value - text-ignore-placement value
|
|
869
|
+
*/
|
|
741
870
|
textIgnorePlacement(value: boolean | StyleExpression): this;
|
|
742
871
|
/**
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
872
|
+
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
|
|
873
|
+
*
|
|
874
|
+
* @param value - text-optional value
|
|
875
|
+
*/
|
|
747
876
|
textOptional(value: boolean | StyleExpression): this;
|
|
748
877
|
/**
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
878
|
+
* The opacity at which the icon will be drawn.
|
|
879
|
+
*
|
|
880
|
+
* @param value - icon-opacity value (default `1`)
|
|
881
|
+
*/
|
|
753
882
|
iconOpacity(value: number | StyleExpression): this;
|
|
754
883
|
/**
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
884
|
+
* The color of the icon. This can only be used with sdf icons.
|
|
885
|
+
*
|
|
886
|
+
* @param value - icon-color value (default `#000000`)
|
|
887
|
+
*/
|
|
759
888
|
iconColor(value: string | StyleExpression): this;
|
|
760
889
|
/**
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
890
|
+
* The color of the icon's halo. Icon halos can only be used with SDF icons.
|
|
891
|
+
*
|
|
892
|
+
* @param value - icon-halo-color value (default `rgba(0, 0, 0, 0)`)
|
|
893
|
+
*/
|
|
765
894
|
iconHaloColor(value: string | StyleExpression): this;
|
|
766
895
|
/**
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
896
|
+
* Distance of halo to the icon outline.
|
|
897
|
+
*
|
|
898
|
+
* @param value - icon-halo-width value in pixels
|
|
899
|
+
*/
|
|
771
900
|
iconHaloWidth(value: number | StyleExpression): this;
|
|
772
901
|
/**
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
902
|
+
* Fade out the halo towards the outside.
|
|
903
|
+
*
|
|
904
|
+
* @param value - icon-halo-blur value in pixels
|
|
905
|
+
*/
|
|
777
906
|
iconHaloBlur(value: number | StyleExpression): this;
|
|
778
907
|
/**
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
908
|
+
* Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
|
|
909
|
+
*
|
|
910
|
+
* @param value - icon-translate value in pixels (default `0,0`)
|
|
911
|
+
*/
|
|
783
912
|
iconTranslate(value: number[] | StyleExpression): this;
|
|
784
913
|
/**
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
914
|
+
* Controls the frame of reference for `icon-translate`.
|
|
915
|
+
*
|
|
916
|
+
* Values:
|
|
917
|
+
* - map: Icons are translated relative to the map.
|
|
918
|
+
* - viewport: Icons are translated relative to the viewport.
|
|
919
|
+
*
|
|
920
|
+
* @param value - icon-translate-anchor value (default `map`)
|
|
921
|
+
*/
|
|
793
922
|
iconTranslateAnchor(value: ('map' | 'viewport') | StyleExpression): this;
|
|
794
923
|
/**
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
924
|
+
* The opacity at which the text will be drawn.
|
|
925
|
+
*
|
|
926
|
+
* @param value - text-opacity value (default `1`)
|
|
927
|
+
*/
|
|
799
928
|
textOpacity(value: number | StyleExpression): this;
|
|
800
929
|
/**
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
930
|
+
* The color with which the text will be drawn.
|
|
931
|
+
*
|
|
932
|
+
* @param value - text-color value (default `#000000`)
|
|
933
|
+
*/
|
|
805
934
|
textColor(value: string | StyleExpression): this;
|
|
806
935
|
/**
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
936
|
+
* The color of the text's halo, which helps it stand out from backgrounds.
|
|
937
|
+
*
|
|
938
|
+
* @param value - text-halo-color value (default `rgba(0, 0, 0, 0)`)
|
|
939
|
+
*/
|
|
811
940
|
textHaloColor(value: string | StyleExpression): this;
|
|
812
941
|
/**
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
942
|
+
* Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.
|
|
943
|
+
*
|
|
944
|
+
* @param value - text-halo-width value in pixels
|
|
945
|
+
*/
|
|
817
946
|
textHaloWidth(value: number | StyleExpression): this;
|
|
818
947
|
/**
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
948
|
+
* The halo's fadeout distance towards the outside.
|
|
949
|
+
*
|
|
950
|
+
* @param value - text-halo-blur value in pixels
|
|
951
|
+
*/
|
|
823
952
|
textHaloBlur(value: number | StyleExpression): this;
|
|
824
953
|
/**
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
954
|
+
* Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
|
|
955
|
+
*
|
|
956
|
+
* @param value - text-translate value in pixels (default `0,0`)
|
|
957
|
+
*/
|
|
829
958
|
textTranslate(value: number[] | StyleExpression): this;
|
|
830
959
|
/**
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
960
|
+
* Controls the frame of reference for `text-translate`.
|
|
961
|
+
*
|
|
962
|
+
* Values:
|
|
963
|
+
* - map: The text is translated relative to the map.
|
|
964
|
+
* - viewport: The text is translated relative to the viewport.
|
|
965
|
+
*
|
|
966
|
+
* @param value - text-translate-anchor value (default `map`)
|
|
967
|
+
*/
|
|
839
968
|
textTranslateAnchor(value: ('map' | 'viewport') | StyleExpression): this;
|
|
840
969
|
}
|
|
841
970
|
/**
|
|
842
|
-
|
|
843
|
-
|
|
971
|
+
* Style builder for 'circle' layers.
|
|
972
|
+
*/
|
|
844
973
|
declare class CircleLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
845
974
|
/**
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
975
|
+
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
|
|
976
|
+
*
|
|
977
|
+
* @param value - circle-sort-key value
|
|
978
|
+
*/
|
|
850
979
|
circleSortKey(value: number | StyleExpression): this;
|
|
851
980
|
/**
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
981
|
+
* Circle radius.
|
|
982
|
+
*
|
|
983
|
+
* @param value - circle-radius value in pixels (default `5`)
|
|
984
|
+
*/
|
|
856
985
|
circleRadius(value: number | StyleExpression): this;
|
|
857
986
|
/**
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
987
|
+
* The fill color of the circle.
|
|
988
|
+
*
|
|
989
|
+
* @param value - circle-color value (default `#000000`)
|
|
990
|
+
*/
|
|
862
991
|
circleColor(value: string | StyleExpression): this;
|
|
863
992
|
/**
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
993
|
+
* Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
|
|
994
|
+
*
|
|
995
|
+
* @param value - circle-blur value
|
|
996
|
+
*/
|
|
868
997
|
circleBlur(value: number | StyleExpression): this;
|
|
869
998
|
/**
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
999
|
+
* The opacity at which the circle will be drawn.
|
|
1000
|
+
*
|
|
1001
|
+
* @param value - circle-opacity value (default `1`)
|
|
1002
|
+
*/
|
|
874
1003
|
circleOpacity(value: number | StyleExpression): this;
|
|
875
1004
|
/**
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
1005
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
|
|
1006
|
+
*
|
|
1007
|
+
* @param value - circle-translate value in pixels (default `0,0`)
|
|
1008
|
+
*/
|
|
880
1009
|
circleTranslate(value: number[] | StyleExpression): this;
|
|
881
1010
|
/**
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
1011
|
+
* Controls the frame of reference for `circle-translate`.
|
|
1012
|
+
*
|
|
1013
|
+
* Values:
|
|
1014
|
+
* - map: The circle is translated relative to the map.
|
|
1015
|
+
* - viewport: The circle is translated relative to the viewport.
|
|
1016
|
+
*
|
|
1017
|
+
* @param value - circle-translate-anchor value (default `map`)
|
|
1018
|
+
*/
|
|
890
1019
|
circleTranslateAnchor(value: ('map' | 'viewport') | StyleExpression): this;
|
|
891
1020
|
/**
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
1021
|
+
* Controls the scaling behavior of the circle when the map is pitched.
|
|
1022
|
+
*
|
|
1023
|
+
* Values:
|
|
1024
|
+
* - map: Circles are scaled according to their apparent distance to the camera.
|
|
1025
|
+
* - viewport: Circles are not scaled.
|
|
1026
|
+
*
|
|
1027
|
+
* @param value - circle-pitch-scale value (default `map`)
|
|
1028
|
+
*/
|
|
900
1029
|
circlePitchScale(value: ('map' | 'viewport') | StyleExpression): this;
|
|
901
1030
|
/**
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
1031
|
+
* Orientation of circle when map is pitched.
|
|
1032
|
+
*
|
|
1033
|
+
* Values:
|
|
1034
|
+
* - map: The circle is aligned to the plane of the map.
|
|
1035
|
+
* - viewport: The circle is aligned to the plane of the viewport.
|
|
1036
|
+
*
|
|
1037
|
+
* @param value - circle-pitch-alignment value (default `viewport`)
|
|
1038
|
+
*/
|
|
910
1039
|
circlePitchAlignment(value: ('map' | 'viewport') | StyleExpression): this;
|
|
911
1040
|
/**
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
1041
|
+
* The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.
|
|
1042
|
+
*
|
|
1043
|
+
* @param value - circle-stroke-width value in pixels
|
|
1044
|
+
*/
|
|
916
1045
|
circleStrokeWidth(value: number | StyleExpression): this;
|
|
917
1046
|
/**
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
1047
|
+
* The stroke color of the circle.
|
|
1048
|
+
*
|
|
1049
|
+
* @param value - circle-stroke-color value (default `#000000`)
|
|
1050
|
+
*/
|
|
922
1051
|
circleStrokeColor(value: string | StyleExpression): this;
|
|
923
1052
|
/**
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1053
|
+
* The opacity of the circle's stroke.
|
|
1054
|
+
*
|
|
1055
|
+
* @param value - circle-stroke-opacity value (default `1`)
|
|
1056
|
+
*/
|
|
928
1057
|
circleStrokeOpacity(value: number | StyleExpression): this;
|
|
929
1058
|
}
|
|
930
1059
|
/**
|
|
931
|
-
|
|
932
|
-
|
|
1060
|
+
* Style builder for 'heatmap' layers.
|
|
1061
|
+
*/
|
|
933
1062
|
declare class HeatmapLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
934
1063
|
/**
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1064
|
+
* Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.
|
|
1065
|
+
*
|
|
1066
|
+
* @param value - heatmap-radius value in pixels (default `30`)
|
|
1067
|
+
*/
|
|
939
1068
|
heatmapRadius(value: number | StyleExpression): this;
|
|
940
1069
|
/**
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
1070
|
+
* A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.
|
|
1071
|
+
*
|
|
1072
|
+
* @param value - heatmap-weight value (default `1`)
|
|
1073
|
+
*/
|
|
945
1074
|
heatmapWeight(value: number | StyleExpression): this;
|
|
946
1075
|
/**
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
1076
|
+
* Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.
|
|
1077
|
+
*
|
|
1078
|
+
* @param value - heatmap-intensity value (default `1`)
|
|
1079
|
+
*/
|
|
951
1080
|
heatmapIntensity(value: number | StyleExpression): this;
|
|
952
1081
|
/**
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1082
|
+
* Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.
|
|
1083
|
+
*
|
|
1084
|
+
* @param value - heatmap-color value (default `interpolate,linear,heatmap-density,0,rgba(0, 0, 255, 0),0.1,royalblue,0.3,cyan,0.5,lime,0.7,yellow,1,red`)
|
|
1085
|
+
*/
|
|
957
1086
|
heatmapColor(value: string | StyleExpression): this;
|
|
958
1087
|
/**
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1088
|
+
* The global opacity at which the heatmap layer will be drawn.
|
|
1089
|
+
*
|
|
1090
|
+
* @param value - heatmap-opacity value (default `1`)
|
|
1091
|
+
*/
|
|
963
1092
|
heatmapOpacity(value: number | StyleExpression): this;
|
|
964
1093
|
}
|
|
965
1094
|
/**
|
|
966
|
-
|
|
967
|
-
|
|
1095
|
+
* Style builder for 'fill-extrusion' layers.
|
|
1096
|
+
*/
|
|
968
1097
|
declare class FillExtrusionLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
969
1098
|
/**
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
1099
|
+
* The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.
|
|
1100
|
+
*
|
|
1101
|
+
* @param value - fill-extrusion-opacity value (default `1`)
|
|
1102
|
+
*/
|
|
974
1103
|
fillExtrusionOpacity(value: number | StyleExpression): this;
|
|
975
1104
|
/**
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1105
|
+
* The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.
|
|
1106
|
+
*
|
|
1107
|
+
* @param value - fill-extrusion-color value (default `#000000`)
|
|
1108
|
+
*/
|
|
980
1109
|
fillExtrusionColor(value: string | StyleExpression): this;
|
|
981
1110
|
/**
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1111
|
+
* The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.
|
|
1112
|
+
*
|
|
1113
|
+
* @param value - fill-extrusion-translate value in pixels (default `0,0`)
|
|
1114
|
+
*/
|
|
986
1115
|
fillExtrusionTranslate(value: number[] | StyleExpression): this;
|
|
987
1116
|
/**
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1117
|
+
* Controls the frame of reference for `fill-extrusion-translate`.
|
|
1118
|
+
*
|
|
1119
|
+
* Values:
|
|
1120
|
+
* - map: The fill extrusion is translated relative to the map.
|
|
1121
|
+
* - viewport: The fill extrusion is translated relative to the viewport.
|
|
1122
|
+
*
|
|
1123
|
+
* @param value - fill-extrusion-translate-anchor value (default `map`)
|
|
1124
|
+
*/
|
|
996
1125
|
fillExtrusionTranslateAnchor(value: ('map' | 'viewport') | StyleExpression): this;
|
|
997
1126
|
/**
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1127
|
+
* Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.
|
|
1128
|
+
*
|
|
1129
|
+
* @param value - fill-extrusion-pattern value
|
|
1130
|
+
*/
|
|
1002
1131
|
fillExtrusionPattern(value: string | StyleExpression): this;
|
|
1003
1132
|
/**
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1133
|
+
* The height with which to extrude this layer.
|
|
1134
|
+
*
|
|
1135
|
+
* @param value - fill-extrusion-height value in meters
|
|
1136
|
+
*/
|
|
1008
1137
|
fillExtrusionHeight(value: number | StyleExpression): this;
|
|
1009
1138
|
/**
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1139
|
+
* The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.
|
|
1140
|
+
*
|
|
1141
|
+
* @param value - fill-extrusion-base value in meters
|
|
1142
|
+
*/
|
|
1014
1143
|
fillExtrusionBase(value: number | StyleExpression): this;
|
|
1015
1144
|
/**
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1145
|
+
* Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.
|
|
1146
|
+
*
|
|
1147
|
+
* @param value - fill-extrusion-vertical-gradient value (default `true`)
|
|
1148
|
+
*/
|
|
1020
1149
|
fillExtrusionVerticalGradient(value: boolean | StyleExpression): this;
|
|
1021
1150
|
}
|
|
1022
1151
|
/**
|
|
1023
|
-
|
|
1024
|
-
|
|
1152
|
+
* Style builder for 'raster' layers.
|
|
1153
|
+
*/
|
|
1025
1154
|
declare class RasterLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
1026
1155
|
/**
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1156
|
+
* The opacity at which the image will be drawn.
|
|
1157
|
+
*
|
|
1158
|
+
* @param value - raster-opacity value (default `1`)
|
|
1159
|
+
*/
|
|
1031
1160
|
rasterOpacity(value: number | StyleExpression): this;
|
|
1032
1161
|
/**
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1162
|
+
* Rotates hues around the color wheel.
|
|
1163
|
+
*
|
|
1164
|
+
* @param value - raster-hue-rotate value in degrees
|
|
1165
|
+
*/
|
|
1037
1166
|
rasterHueRotate(value: number | StyleExpression): this;
|
|
1038
1167
|
/**
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1168
|
+
* Increase or reduce the brightness of the image. The value is the minimum brightness.
|
|
1169
|
+
*
|
|
1170
|
+
* @param value - raster-brightness-min value
|
|
1171
|
+
*/
|
|
1043
1172
|
rasterBrightnessMin(value: number | StyleExpression): this;
|
|
1044
1173
|
/**
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1174
|
+
* Increase or reduce the brightness of the image. The value is the maximum brightness.
|
|
1175
|
+
*
|
|
1176
|
+
* @param value - raster-brightness-max value (default `1`)
|
|
1177
|
+
*/
|
|
1049
1178
|
rasterBrightnessMax(value: number | StyleExpression): this;
|
|
1050
1179
|
/**
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1180
|
+
* Increase or reduce the saturation of the image.
|
|
1181
|
+
*
|
|
1182
|
+
* @param value - raster-saturation value
|
|
1183
|
+
*/
|
|
1055
1184
|
rasterSaturation(value: number | StyleExpression): this;
|
|
1056
1185
|
/**
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1186
|
+
* Increase or reduce the contrast of the image.
|
|
1187
|
+
*
|
|
1188
|
+
* @param value - raster-contrast value
|
|
1189
|
+
*/
|
|
1061
1190
|
rasterContrast(value: number | StyleExpression): this;
|
|
1062
1191
|
/**
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1192
|
+
* The resampling/interpolation method to use for overscaling, also known as texture magnification filter
|
|
1193
|
+
*
|
|
1194
|
+
* Values:
|
|
1195
|
+
* - linear: (Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled
|
|
1196
|
+
* - nearest: Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled
|
|
1197
|
+
*
|
|
1198
|
+
* @param value - raster-resampling value (default `linear`)
|
|
1199
|
+
*/
|
|
1071
1200
|
rasterResampling(value: ('linear' | 'nearest') | StyleExpression): this;
|
|
1072
1201
|
/**
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1202
|
+
* Fade duration when a new tile is added.
|
|
1203
|
+
*
|
|
1204
|
+
* @param value - raster-fade-duration value in milliseconds (default `300`)
|
|
1205
|
+
*/
|
|
1077
1206
|
rasterFadeDuration(value: number | StyleExpression): this;
|
|
1078
1207
|
}
|
|
1079
1208
|
/**
|
|
1080
|
-
|
|
1081
|
-
|
|
1209
|
+
* Style builder for 'hillshade' layers.
|
|
1210
|
+
*/
|
|
1082
1211
|
declare class HillshadeLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
1083
1212
|
/**
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1213
|
+
* The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.
|
|
1214
|
+
*
|
|
1215
|
+
* @param value - hillshade-illumination-direction value (default `335`)
|
|
1216
|
+
*/
|
|
1088
1217
|
hillshadeIlluminationDirection(value: number | StyleExpression): this;
|
|
1089
1218
|
/**
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1219
|
+
* Direction of light source when map is rotated.
|
|
1220
|
+
*
|
|
1221
|
+
* Values:
|
|
1222
|
+
* - map: The hillshade illumination is relative to the north direction.
|
|
1223
|
+
* - viewport: The hillshade illumination is relative to the top of the viewport.
|
|
1224
|
+
*
|
|
1225
|
+
* @param value - hillshade-illumination-anchor value (default `viewport`)
|
|
1226
|
+
*/
|
|
1098
1227
|
hillshadeIlluminationAnchor(value: ('map' | 'viewport') | StyleExpression): this;
|
|
1099
1228
|
/**
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1229
|
+
* Intensity of the hillshade
|
|
1230
|
+
*
|
|
1231
|
+
* @param value - hillshade-exaggeration value (default `0.5`)
|
|
1232
|
+
*/
|
|
1104
1233
|
hillshadeExaggeration(value: number | StyleExpression): this;
|
|
1105
1234
|
/**
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1235
|
+
* The shading color of areas that face away from the light source.
|
|
1236
|
+
*
|
|
1237
|
+
* @param value - hillshade-shadow-color value (default `#000000`)
|
|
1238
|
+
*/
|
|
1110
1239
|
hillshadeShadowColor(value: string | StyleExpression): this;
|
|
1111
1240
|
/**
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1241
|
+
* The shading color of areas that faces towards the light source.
|
|
1242
|
+
*
|
|
1243
|
+
* @param value - hillshade-highlight-color value (default `#FFFFFF`)
|
|
1244
|
+
*/
|
|
1116
1245
|
hillshadeHighlightColor(value: string | StyleExpression): this;
|
|
1117
1246
|
/**
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1247
|
+
* The shading color used to accentuate rugged terrain like sharp cliffs and gorges.
|
|
1248
|
+
*
|
|
1249
|
+
* @param value - hillshade-accent-color value (default `#000000`)
|
|
1250
|
+
*/
|
|
1122
1251
|
hillshadeAccentColor(value: string | StyleExpression): this;
|
|
1123
1252
|
}
|
|
1124
1253
|
/**
|
|
1125
|
-
|
|
1126
|
-
|
|
1254
|
+
* Style builder for 'background' layers.
|
|
1255
|
+
*/
|
|
1127
1256
|
declare class BackgroundLayerStyleBuilder extends MapLayerStyleBuilder {
|
|
1128
1257
|
/**
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1258
|
+
* The color with which the background will be drawn.
|
|
1259
|
+
*
|
|
1260
|
+
* @param value - background-color value (default `#000000`)
|
|
1261
|
+
*/
|
|
1133
1262
|
backgroundColor(value: string | StyleExpression): this;
|
|
1134
1263
|
/**
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1264
|
+
* Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.
|
|
1265
|
+
*
|
|
1266
|
+
* @param value - background-pattern value
|
|
1267
|
+
*/
|
|
1139
1268
|
backgroundPattern(value: string | StyleExpression): this;
|
|
1140
1269
|
/**
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1270
|
+
* The opacity at which the background will be drawn.
|
|
1271
|
+
*
|
|
1272
|
+
* @param value - background-opacity value (default `1`)
|
|
1273
|
+
*/
|
|
1145
1274
|
backgroundOpacity(value: number | StyleExpression): this;
|
|
1146
1275
|
}
|
|
1147
1276
|
declare function layerStyle(layerType: 'fill'): FillLayerStyleBuilder;
|
|
@@ -1430,10 +1559,10 @@ interface MapEventTypes {
|
|
|
1430
1559
|
type MapEventType = keyof MapEventTypes;
|
|
1431
1560
|
declare class MapEvent<EventType extends string = MapEventType, TOrig = unknown> {
|
|
1432
1561
|
type: EventType;
|
|
1433
|
-
map:
|
|
1562
|
+
map: FlowCoreMap;
|
|
1434
1563
|
originalEvent?: TOrig;
|
|
1435
|
-
static fromMaplibreEvent(type: string, map:
|
|
1436
|
-
constructor(type: EventType, map:
|
|
1564
|
+
static fromMaplibreEvent(type: string, map: FlowCoreMap, maplibreEvent: MapLibreEvent): MapEvent<any, unknown>;
|
|
1565
|
+
constructor(type: EventType, map: FlowCoreMap, originalEvent?: TOrig);
|
|
1437
1566
|
}
|
|
1438
1567
|
type MapMouseEventType = 'click' | 'dblClick' | 'mouseMove' | 'mouseOut';
|
|
1439
1568
|
declare class MapMouseEvent extends MapEvent<MapMouseEventType, MouseEvent> {
|
|
@@ -1446,24 +1575,24 @@ declare class MapMouseEvent extends MapEvent<MapMouseEventType, MouseEvent> {
|
|
|
1446
1575
|
*/
|
|
1447
1576
|
lngLat: [number, number];
|
|
1448
1577
|
features: MapFeature[];
|
|
1449
|
-
static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: MapMouseEvent$1, map:
|
|
1450
|
-
constructor(type: MapMouseEventType, map:
|
|
1578
|
+
static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: MapMouseEvent$1, map: FlowCoreMap, features: MapFeature[]): MapMouseEvent;
|
|
1579
|
+
constructor(type: MapMouseEventType, map: FlowCoreMap, point: [number, number], lngLat: [number, number], features: MapFeature[], originalEvent: MouseEvent);
|
|
1451
1580
|
}
|
|
1452
1581
|
type SourceEventType = 'sourceAdded' | 'sourceRemoved' | 'beforeSourceAdded' | 'beforeSourceRemoved' | 'sourceFeatureState';
|
|
1453
1582
|
declare class MapSourceEvent extends MapEvent<SourceEventType> {
|
|
1454
1583
|
source: string;
|
|
1455
|
-
constructor(type: SourceEventType, map:
|
|
1584
|
+
constructor(type: SourceEventType, map: FlowCoreMap, source: string);
|
|
1456
1585
|
}
|
|
1457
1586
|
type LoadingEventType = 'loading';
|
|
1458
1587
|
declare class MapLoadingEvent extends MapEvent<LoadingEventType> {
|
|
1459
1588
|
loading: boolean;
|
|
1460
|
-
constructor(map:
|
|
1589
|
+
constructor(map: FlowCoreMap, loading: boolean);
|
|
1461
1590
|
}
|
|
1462
1591
|
type StyleChangeEventType = 'beforeStyleChanged' | 'styleChanged';
|
|
1463
1592
|
declare class MapStyleChangeEvent extends MapEvent<StyleChangeEventType> {
|
|
1464
1593
|
oldStyle: MapStyleSpecification;
|
|
1465
1594
|
newStyle: MapStyleSpecification;
|
|
1466
|
-
constructor(type: StyleChangeEventType, map:
|
|
1595
|
+
constructor(type: StyleChangeEventType, map: FlowCoreMap, oldStyle: MapStyleSpecification, newStyle: MapStyleSpecification);
|
|
1467
1596
|
}
|
|
1468
1597
|
|
|
1469
1598
|
interface Handler {
|
|
@@ -1482,8 +1611,8 @@ declare class PluginManager {
|
|
|
1482
1611
|
private _plugins;
|
|
1483
1612
|
private _initialized;
|
|
1484
1613
|
private _exclusivePlugins;
|
|
1485
|
-
get map():
|
|
1486
|
-
constructor(map:
|
|
1614
|
+
get map(): FlowCoreMap<StateStore>;
|
|
1615
|
+
constructor(map: FlowCoreMap);
|
|
1487
1616
|
usePlugin<T extends MapPluginBase>(plugin: PluginConstructor<T>, options?: PluginOptionsType<T>): T;
|
|
1488
1617
|
getPlugin<T extends MapPluginBase = MapPluginBase>(pluginOrName: PluginConstructor<T> | string): T;
|
|
1489
1618
|
removePlugin<T extends MapPluginBase>(pluginOrName: PluginConstructor<T> | string): this;
|
|
@@ -1524,7 +1653,7 @@ interface MapPluginBase<Options = any, Events extends EventEmitter.ValidEventTyp
|
|
|
1524
1653
|
declare abstract class MapPluginBase<Options extends object | undefined = any, Events extends EventEmitter.ValidEventTypes = string | symbol> extends EventEmitter<Events> {
|
|
1525
1654
|
private _pluginManager;
|
|
1526
1655
|
options: Options;
|
|
1527
|
-
get map():
|
|
1656
|
+
get map(): FlowCoreMap<StateStore>;
|
|
1528
1657
|
get pluginManager(): PluginManager;
|
|
1529
1658
|
abstract readonly name: string;
|
|
1530
1659
|
constructor(pluginManager: PluginManager, options?: Options);
|
|
@@ -1543,7 +1672,6 @@ interface ImageRegistryEntry {
|
|
|
1543
1672
|
image?: HTMLImageElement;
|
|
1544
1673
|
}
|
|
1545
1674
|
/**
|
|
1546
|
-
* @internal
|
|
1547
1675
|
*
|
|
1548
1676
|
* The `ImageRegistry` is a container for map icon images.
|
|
1549
1677
|
*
|
|
@@ -1588,7 +1716,7 @@ declare class ImageRegistry {
|
|
|
1588
1716
|
interface FeatureStreamOptions {
|
|
1589
1717
|
featureIds: Array<string | number>;
|
|
1590
1718
|
fireImmediately?: boolean;
|
|
1591
|
-
map:
|
|
1719
|
+
map: FlowCoreMap;
|
|
1592
1720
|
source: string;
|
|
1593
1721
|
sourceLayer?: string;
|
|
1594
1722
|
}
|
|
@@ -1618,7 +1746,7 @@ interface MapOptions<TState extends StateStore = StateStore> extends Omit<MapOpt
|
|
|
1618
1746
|
featureClickTolerance?: number;
|
|
1619
1747
|
contextId?: string;
|
|
1620
1748
|
}
|
|
1621
|
-
declare class
|
|
1749
|
+
declare class FlowCoreMap<TState extends StateStore = StateStore> extends EventEmitter$1<MapEventTypes> {
|
|
1622
1750
|
private static _defaultOptions;
|
|
1623
1751
|
private _context;
|
|
1624
1752
|
private _initialized;
|
|
@@ -1726,13 +1854,13 @@ declare class MapRegistry {
|
|
|
1726
1854
|
* @param id Map ID.
|
|
1727
1855
|
* @param map Map to register.
|
|
1728
1856
|
*/
|
|
1729
|
-
registerMap(map:
|
|
1857
|
+
registerMap(map: FlowCoreMap): FlowCoreMap;
|
|
1730
1858
|
/**
|
|
1731
1859
|
* Un-register a Flo.w map.
|
|
1732
1860
|
*
|
|
1733
1861
|
* @param id Map ID.
|
|
1734
1862
|
*/
|
|
1735
|
-
unregisterMap(map:
|
|
1863
|
+
unregisterMap(map: FlowCoreMap): void;
|
|
1736
1864
|
/**
|
|
1737
1865
|
* Retrieve the specified map.
|
|
1738
1866
|
*
|
|
@@ -1740,136 +1868,7 @@ declare class MapRegistry {
|
|
|
1740
1868
|
*
|
|
1741
1869
|
* @param id Map ID.
|
|
1742
1870
|
*/
|
|
1743
|
-
getMap(id: string): Promise<
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
/** Result format of a [[Query]]. */
|
|
1747
|
-
type QueryResultFormat = 'json' | 'geojson' | 'csv';
|
|
1748
|
-
/** [[FlowQueryDefinition]] 'attributes' entry. */
|
|
1749
|
-
type QueryAttribute = string | [any, string];
|
|
1750
|
-
/**
|
|
1751
|
-
* [[FlowQueryDefinition]] 'where' clauses.
|
|
1752
|
-
*/
|
|
1753
|
-
interface QueryWhereClauses {
|
|
1754
|
-
[attribute: string]: any;
|
|
1755
|
-
}
|
|
1756
|
-
/**
|
|
1757
|
-
* [[FlowQueryDefinition]] extra parameters.
|
|
1758
|
-
*/
|
|
1759
|
-
interface QueryExtraParams {
|
|
1760
|
-
[key: string]: string | number;
|
|
1761
|
-
}
|
|
1762
|
-
/**
|
|
1763
|
-
* [[FlowQueryDefinition]] 'order' clause.
|
|
1764
|
-
*
|
|
1765
|
-
* A field name or [field, asc/desc] tuple.
|
|
1766
|
-
*/
|
|
1767
|
-
type QueryOrderClause = string | number | [string | number, 'asc' | 'desc'];
|
|
1768
|
-
interface QuerySampleOptions {
|
|
1769
|
-
percentage: number;
|
|
1770
|
-
method?: 'system' | 'bernoulli';
|
|
1771
|
-
seed?: number;
|
|
1772
|
-
}
|
|
1773
|
-
/**
|
|
1774
|
-
* Definition of a Flo.w reactive dataset query.
|
|
1775
|
-
*/
|
|
1776
|
-
interface QueryDefinition {
|
|
1777
|
-
/** ID of dataset to query. */
|
|
1778
|
-
datasetId: string;
|
|
1779
|
-
/** Attributes to return in results. */
|
|
1780
|
-
attributes?: QueryAttribute[];
|
|
1781
|
-
/** DISTINCT ON attributes */
|
|
1782
|
-
distinct?: string | string[];
|
|
1783
|
-
/** Filter results using 'where' clauses. */
|
|
1784
|
-
where?: QueryWhereClauses;
|
|
1785
|
-
/** Sort results by attributes. */
|
|
1786
|
-
order?: QueryOrderClause[];
|
|
1787
|
-
/** Group results by attributes. */
|
|
1788
|
-
group?: (string | number)[];
|
|
1789
|
-
/** Start offset of returned results */
|
|
1790
|
-
offset?: number;
|
|
1791
|
-
/** Limit number of returned results */
|
|
1792
|
-
limit?: number;
|
|
1793
|
-
/** Format of returned data. */
|
|
1794
|
-
format?: QueryResultFormat;
|
|
1795
|
-
/** Additional query parameters. */
|
|
1796
|
-
params?: QueryExtraParams;
|
|
1797
|
-
/** Sampling options. */
|
|
1798
|
-
sample?: QuerySampleOptions;
|
|
1799
|
-
}
|
|
1800
|
-
interface QueryOptions {
|
|
1801
|
-
id?: string;
|
|
1802
|
-
fireImmediately?: boolean;
|
|
1803
|
-
delay?: number;
|
|
1804
|
-
contextId?: string;
|
|
1805
|
-
}
|
|
1806
|
-
/**
|
|
1807
|
-
* [[FlowQuery]] query definition function.
|
|
1808
|
-
*
|
|
1809
|
-
* @typeParam TState Type of application state.
|
|
1810
|
-
*/
|
|
1811
|
-
type QueryDefinitionFn<TState> = (this: TState, store: TState) => QueryDefinition | Promise<QueryDefinition> | null;
|
|
1812
|
-
/**
|
|
1813
|
-
* [[FlowQuery]] result transform function.
|
|
1814
|
-
*
|
|
1815
|
-
* @typeParam T Type of transformed query results.
|
|
1816
|
-
*/
|
|
1817
|
-
type QueryResultTransformFn<T = any> = (results: any) => T | null;
|
|
1818
|
-
|
|
1819
|
-
declare class Query<TResults, TState extends StateStore = any> {
|
|
1820
|
-
private queryFn;
|
|
1821
|
-
private static _defaultOptions;
|
|
1822
|
-
static setDefaultOptions(options: QueryOptions): void;
|
|
1823
|
-
private _options;
|
|
1824
|
-
private _committer;
|
|
1825
|
-
private _disposer;
|
|
1826
|
-
private _transformFn;
|
|
1827
|
-
private get formattedName();
|
|
1828
|
-
get id(): string;
|
|
1829
|
-
results: TResults | null;
|
|
1830
|
-
busy: boolean;
|
|
1831
|
-
error: Error | null;
|
|
1832
|
-
constructor(queryFn: QueryDefinitionFn<TState | null>, transformFn?: QueryResultTransformFn<TResults>, options?: QueryOptions);
|
|
1833
|
-
destroy(): void;
|
|
1834
|
-
runImmediately(): Promise<TResults | null>;
|
|
1835
|
-
private wake;
|
|
1836
|
-
private sleep;
|
|
1837
|
-
private runQuery;
|
|
1838
|
-
}
|
|
1839
|
-
declare function query<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, options: QueryOptions): Query<TResult, TState>;
|
|
1840
|
-
declare function query<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, transformFn?: QueryResultTransformFn<TResult>, options?: QueryOptions): Query<TResult, TState>;
|
|
1841
|
-
declare function queryMany<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, options: QueryOptions): Query<TResult[], TState>;
|
|
1842
|
-
declare function queryMany<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, transformFn?: QueryResultTransformFn<TResult[]>, options?: QueryOptions): Query<TResult[], TState>;
|
|
1843
|
-
declare function queryOne<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, options: QueryOptions): Query<TResult, TState>;
|
|
1844
|
-
declare function queryOne<TResult = any, TState extends StateStore = any>(queryFn: QueryDefinitionFn<TState>, transformFn?: QueryResultTransformFn<TResult>, options?: QueryOptions): Query<TResult, TState>;
|
|
1845
|
-
|
|
1846
|
-
/**
|
|
1847
|
-
* The `QueryRegistry` is a container for [[Query]] instances.
|
|
1848
|
-
*
|
|
1849
|
-
* Queries can be registered and retrieved by ID.
|
|
1850
|
-
*/
|
|
1851
|
-
declare class QueryRegistry {
|
|
1852
|
-
private _queries;
|
|
1853
|
-
/**
|
|
1854
|
-
* Register a Flo.w reactive query.
|
|
1855
|
-
*
|
|
1856
|
-
* @param query Query to register.
|
|
1857
|
-
*/
|
|
1858
|
-
registerQuery(query: Query<any>): void;
|
|
1859
|
-
/**
|
|
1860
|
-
* Un-register a Flo.w reactive query.
|
|
1861
|
-
*
|
|
1862
|
-
* @param query Query to unregister.
|
|
1863
|
-
*/
|
|
1864
|
-
unregisterQuery(query: Query<any>): void;
|
|
1865
|
-
/**
|
|
1866
|
-
* Retrieve the specified query.
|
|
1867
|
-
*
|
|
1868
|
-
* This method returns a promise that resolves when the query has been initialized.
|
|
1869
|
-
*
|
|
1870
|
-
* @param id Map ID.
|
|
1871
|
-
*/
|
|
1872
|
-
getQuery<TResults = any, TState extends StateStore = any>(id: string): Promise<Query<TResults, TState>>;
|
|
1871
|
+
getMap(id: string): Promise<FlowCoreMap>;
|
|
1873
1872
|
}
|
|
1874
1873
|
|
|
1875
1874
|
declare const DEFAULT_CONTEXT_ID = "default";
|
|
@@ -1904,4 +1903,4 @@ declare class FlowContext<TState extends StateStore = StateStore> {
|
|
|
1904
1903
|
evaluateExpression(expr: string): any;
|
|
1905
1904
|
}
|
|
1906
1905
|
|
|
1907
|
-
export {
|
|
1906
|
+
export { type QueryOptions as $, type Annotation as A, BackgroundLayerStyleBuilder as B, CircleLayerStyleBuilder as C, DEFAULT_CONTEXT_ID as D, type MapFeatureIdentifier as E, type FlowContextOptions as F, type MapPaddingOptions as G, HeatmapLayerStyleBuilder as H, type MapSourceIdentifier as I, type MapOptions as J, FlowCoreMap as K, LineLayerStyleBuilder as L, type MapStyleSpecification as M, Query as N, query as O, queryMany as P, QueryRegistry as Q, ReactiveExpression as R, StateStore as S, queryOne as T, type QueryResultFormat as U, type QueryAttribute as V, type QueryWhereClauses as W, type QueryExtraParams as X, type QueryOrderClause as Y, type QuerySampleOptions as Z, type QueryDefinition as _, FlowContext as a, type QueryDefinitionFn as a0, type QueryResultTransformFn as a1, traceReaction as a2, type Path as a3, type PathValue as a4, type StoreConstructor as a5, type StoreAnnotations as a6, type SerializationFormat as a7, MapEvent as a8, type MapFeatureId as a9, MapPluginBase as aa, PluginManager as ab, MapSourceEvent as ac, MapMouseEvent as ad, MapFeatureStream as ae, type PartialBy as af, MapStyleChangeEvent as ag, type PluginOptionsType as ah, type PluginEventsType as ai, type PluginConstructor as aj, type EventHandlers as ak, MapDataSource as b, MapLayer as c, MapRegistry as d, type FlowEngineEndpoint as e, type MapLayerType as f, FillLayerStyleBuilder as g, SymbolLayerStyleBuilder as h, FillExtrusionLayerStyleBuilder as i, RasterLayerStyleBuilder as j, HillshadeLayerStyleBuilder as k, layerStyle as l, MapLayerStyleBuilder as m, StyleExpression as n, expr as o, type MapLayerOptions as p, type MapLayerExpression as q, type MapLayerSpecification as r, type MapLayerPropertyMetadataIndex as s, type MapDataSourceType as t, type MapDataSourceOptions as u, type MapDataSourceSpecification as v, type MapGeojsonData as w, type MapAnimationOptions as x, type MapCenterOptions as y, type MapFeature as z };
|