mapbox-gl
Version:
A WebGL interactive maps library
45 lines (36 loc) • 1.97 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 = {|
"hillshade-illumination-direction": DataConstantProperty<number>,
"hillshade-illumination-anchor": DataConstantProperty<"map" | "viewport">,
"hillshade-exaggeration": DataConstantProperty<number>,
"hillshade-shadow-color": DataConstantProperty<Color>,
"hillshade-highlight-color": DataConstantProperty<Color>,
"hillshade-accent-color": DataConstantProperty<Color>,
|};
const paint: Properties<PaintProps> = new Properties({
"hillshade-illumination-direction": new DataConstantProperty(styleSpec["paint_hillshade"]["hillshade-illumination-direction"]),
"hillshade-illumination-anchor": new DataConstantProperty(styleSpec["paint_hillshade"]["hillshade-illumination-anchor"]),
"hillshade-exaggeration": new DataConstantProperty(styleSpec["paint_hillshade"]["hillshade-exaggeration"]),
"hillshade-shadow-color": new DataConstantProperty(styleSpec["paint_hillshade"]["hillshade-shadow-color"]),
"hillshade-highlight-color": new DataConstantProperty(styleSpec["paint_hillshade"]["hillshade-highlight-color"]),
"hillshade-accent-color": new DataConstantProperty(styleSpec["paint_hillshade"]["hillshade-accent-color"]),
});
// 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>
}>);