UNPKG

mapbox-gl

Version:
54 lines (43 loc) 2.48 kB
// 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.js'; import { Properties, DataConstantProperty, DataDrivenProperty, ColorRampProperty } from '../properties.js'; import type Color from '../../style-spec/util/color.js'; import type Formatted from '../../style-spec/expression/types/formatted.js'; import type ResolvedImage from '../../style-spec/expression/types/resolved_image.js'; export type LayoutProps = {| "visibility": DataConstantProperty<"visible" | "none">, |}; const layout: Properties<LayoutProps> = new Properties({ "visibility": new DataConstantProperty(styleSpec["layout_hillshade"]["visibility"]), }); 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>, "hillshade-emissive-strength": DataConstantProperty<number>, |}; 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"]), "hillshade-emissive-strength": new DataConstantProperty(styleSpec["paint_hillshade"]["hillshade-emissive-strength"]), }); // 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, layout }: $Exact<{ paint: Properties<PaintProps>, layout: Properties<LayoutProps> }>);