mapbox-gl
Version:
A WebGL interactive maps library
43 lines (34 loc) • 1.58 kB
JavaScript
// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.
// @flow
/* eslint-disable */
import styleSpec from '../../style-spec/reference/latest';
import {
Properties,
DataConstantProperty,
DataDrivenProperty,
CrossFadedDataDrivenProperty,
CrossFadedProperty,
ColorRampProperty
} from '../properties';
import type Color from '../../style-spec/util/color';
import type Formatted from '../../style-spec/expression/types/formatted';
export type PaintProps = {|
"heatmap-radius": DataDrivenProperty<number>,
"heatmap-weight": DataDrivenProperty<number>,
"heatmap-intensity": DataConstantProperty<number>,
"heatmap-color": ColorRampProperty,
"heatmap-opacity": DataConstantProperty<number>,
|};
const paint: Properties<PaintProps> = new Properties({
"heatmap-radius": new DataDrivenProperty(styleSpec["paint_heatmap"]["heatmap-radius"]),
"heatmap-weight": new DataDrivenProperty(styleSpec["paint_heatmap"]["heatmap-weight"]),
"heatmap-intensity": new DataConstantProperty(styleSpec["paint_heatmap"]["heatmap-intensity"]),
"heatmap-color": new ColorRampProperty(styleSpec["paint_heatmap"]["heatmap-color"]),
"heatmap-opacity": new DataConstantProperty(styleSpec["paint_heatmap"]["heatmap-opacity"]),
});
// Note: without adding the explicit type annotation, Flow infers weaker types
// for these objects from their use in the constructor to StyleLayer, as
// {layout?: Properties<...>, paint: Properties<...>}
export default ({ paint }: $Exact<{
paint: Properties<PaintProps>
}>);