Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/style/create_style_layer.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style/create_style_layer.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/style/create_style_layer.js
-
curl -L -o create_style_layer.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style/create_style_layer.js
1.14 kB
| // @flow | |
| import circle from './style_layer/circle_style_layer'; | |
| import heatmap from './style_layer/heatmap_style_layer'; | |
| import hillshade from './style_layer/hillshade_style_layer'; | |
| import fill from './style_layer/fill_style_layer'; | |
| import fillExtrusion from './style_layer/fill_extrusion_style_layer'; | |
| import line from './style_layer/line_style_layer'; | |
| import symbol from './style_layer/symbol_style_layer'; | |
| import background from './style_layer/background_style_layer'; | |
| import raster from './style_layer/raster_style_layer'; | |
| import CustomStyleLayer from './style_layer/custom_style_layer'; | |
| import type {CustomLayerInterface} from './style_layer/custom_style_layer'; | |
| import type {LayerSpecification} from '../style-spec/types'; | |
| const subclasses = { | |
| circle, | |
| heatmap, | |
| hillshade, | |
| fill, | |
| 'fill-extrusion': fillExtrusion, | |
| line, | |
| symbol, | |
| background, | |
| raster | |
| }; | |
| export default function createStyleLayer(layer: LayerSpecification | CustomLayerInterface) { | |
| if (layer.type === 'custom') { | |
| return new CustomStyleLayer(layer); | |
| } else { | |
| return new subclasses[layer.type](layer); | |
| } | |
| } | |