Understanding layers
Layers are the building blocks of your interactive energy visualizations. They transform your geospatial and weather data into stunning visual representations on interactive maps. The Rebase Dashboard API uses a unified layer system that consolidates both map layers and weather layers into a single, flexible structure using DeckGL for powerful, performant rendering.Layer structure
The API uses a unified layer structure with type discrimination:Layer types
Thetype field acts as a discriminator that determines which layer model to use:
- Weather layers:
typestarts with"wl:"(e.g.,"wl:RasterLayer") - Map layers:
typedoesn’t start with"wl:"(e.g.,"ScatterPlotLayer")
Map Layer Types
ScatterPlotLayer
Perfect for visualizing point data like wind turbines, solar panels, or power plants.radiusScale: Scale factor for point sizesradiusMinPixels/radiusMaxPixels: Min/max size constraintsgetFillColor: Fill color for each pointgetLineColor: Border color for each pointpickable: Enable click interactionsstroked: Enable borders
GeoJsonLayer
For complex geometries like wind farm boundaries, transmission lines, or service areas.getFillColor: Fill color for polygonsgetLineColor: Border color for geometrieslineWidthMinPixels: Border thicknessextruded: Enable 3D extrusion for height data
Weather Layer Types
wl:RasterLayer
Raster-based weather data visualization for wind speed, temperature, precipitation, etc.wl:ParticleLayer
Particle-based weather visualization for wind flow, air currents, etc.wl:IsolineLayer
Contour/isoline weather visualization for pressure, temperature gradients, etc.Other DeckGL Layer Types
You can use any DeckGL layer type by specifying it as a string. The API will pass thedeckgl_props directly to the specified layer type.
Advanced layer features
Dynamic styling
Make your layers respond to data properties:UI Configuration
Add interactive controls for layer properties:Layer management
Creating layers
Updating layers
Retrieving layers
Deleting layers
Component integration
Creating map components with unified layers
Layer type reference
Weather Layer Types
| Type | Description | Required Fields |
|---|---|---|
wl:RasterLayer | Raster weather data visualization | weather_model_id, variable, altitude |
wl:ParticleLayer | Particle-based weather visualization | weather_model_id, variable, altitude |
wl:IsolineLayer | Contour/isoline weather visualization | weather_model_id, variable, altitude |
Map Layer Types
| Type | Description | Required Fields |
|---|---|---|
ScatterPlotLayer | Point-based geospatial data | dataset_id |
GeoJsonLayer | GeoJSON polygon/line data | dataset_id |
Important Limitations
- Layer ordering: Z-index and layer stacking order is not supported
- Interactive events: onClick handlers and tooltips are not implemented
- Layer types: Any DeckGL layer type can be used, but not all may work as expected
- Updates: All parameters (name, type, dataset_id/weather_model_id) are required when updating layers
- UI controls: Only basic property controls (slider, colorScheme, toggle, dropdown) are supported
Best practices
Performance optimization
- Use appropriate layer types for your data
- Limit the number of points in large datasets
- Use data filtering to show relevant subsets
- Consider using clustering for dense point data
Visual design
- Choose colors that work well together
- Use opacity to show overlapping data
- Provide clear visual hierarchy
- Include legends for clarity
User experience
- Add interactive controls for layer properties using
ui_config - Use consistent styling across related layers
- Test layer performance with your actual data
- Validate that your chosen DeckGL layer type works as expected