1 |
|
2 |
|
3 |
|
4 | import styleSpec from '../../style-spec/reference/latest';
|
5 |
|
6 | import {
|
7 | Properties,
|
8 | DataConstantProperty,
|
9 | DataDrivenProperty,
|
10 | CrossFadedDataDrivenProperty,
|
11 | CrossFadedProperty,
|
12 | ColorRampProperty,
|
13 | PossiblyEvaluatedPropertyValue,
|
14 | CrossFaded
|
15 | } from '../properties';
|
16 |
|
17 | import type Color from '../../style-spec/util/color';
|
18 |
|
19 | import type Formatted from '../../style-spec/expression/types/formatted';
|
20 |
|
21 | import type ResolvedImage from '../../style-spec/expression/types/resolved_image';
|
22 | import {StylePropertySpecification} from '../../style-spec/style-spec';
|
23 |
|
24 |
|
25 | export type HeatmapPaintProps = {
|
26 | "heatmap-radius": DataDrivenProperty<number>,
|
27 | "heatmap-weight": DataDrivenProperty<number>,
|
28 | "heatmap-intensity": DataConstantProperty<number>,
|
29 | "heatmap-color": ColorRampProperty,
|
30 | "heatmap-opacity": DataConstantProperty<number>,
|
31 | };
|
32 |
|
33 | export type HeatmapPaintPropsPossiblyEvaluated = {
|
34 | "heatmap-radius": PossiblyEvaluatedPropertyValue<number>,
|
35 | "heatmap-weight": PossiblyEvaluatedPropertyValue<number>,
|
36 | "heatmap-intensity": number,
|
37 | "heatmap-color": ColorRampProperty,
|
38 | "heatmap-opacity": number,
|
39 | };
|
40 |
|
41 | const paint: Properties<HeatmapPaintProps> = new Properties({
|
42 | "heatmap-radius": new DataDrivenProperty(styleSpec["paint_heatmap"]["heatmap-radius"] as any as StylePropertySpecification),
|
43 | "heatmap-weight": new DataDrivenProperty(styleSpec["paint_heatmap"]["heatmap-weight"] as any as StylePropertySpecification),
|
44 | "heatmap-intensity": new DataConstantProperty(styleSpec["paint_heatmap"]["heatmap-intensity"] as any as StylePropertySpecification),
|
45 | "heatmap-color": new ColorRampProperty(styleSpec["paint_heatmap"]["heatmap-color"] as any as StylePropertySpecification),
|
46 | "heatmap-opacity": new DataConstantProperty(styleSpec["paint_heatmap"]["heatmap-opacity"] as any as StylePropertySpecification),
|
47 | });
|
48 |
|
49 | export default ({ paint } as {
|
50 | paint: Properties<HeatmapPaintProps>
|
51 | }); |
\ | No newline at end of file |