larsmaxfield / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in WebGL2
https://maplibre.org/maplibre-gl-js/docs/
Other
0 stars 0 forks source link

Determine how to generate style code for elevation_style_layer_properties.g.ts #6

Closed larsmaxfield closed 3 months ago

larsmaxfield commented 3 months ago

In generate-style-code.ts the properties of style_layer files are created by pulling those styles from v8 of maplibre-gl-style-spec. This means the properties of elevation_style_layer are not generated automatically.

There should be a way to generate this. Or figure out a workaround?

larsmaxfield commented 3 months ago

The solution is indeed to directly specify the properties of the elevation layer style within the properties file, including the defaults.

Reminder here that the idea is to have the elevation layer function as the hillshading layer. That means the number of files, functions, classes, types, etc. which we use to achieve elevation should (at most) be the same as hillshading, except in specifying defaults or shader functions or other result-related behavior. If we can show how to duplicate all the hillshading mechanisms with elevation, we could possibly generalize/abstract it, allowing us to more easily add more layers like slope-aspect.