Skip to main content

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

The type field acts as a discriminator that determines which layer model to use:
  • Weather layers: type starts with "wl:" (e.g., "wl:RasterLayer")
  • Map layers: type doesn’t start with "wl:" (e.g., "ScatterPlotLayer")
The API automatically validates required fields based on the layer type.

Map Layer Types

ScatterPlotLayer

Perfect for visualizing point data like wind turbines, solar panels, or power plants.
Key properties:
  • radiusScale: Scale factor for point sizes
  • radiusMinPixels/radiusMaxPixels: Min/max size constraints
  • getFillColor: Fill color for each point
  • getLineColor: Border color for each point
  • pickable: Enable click interactions
  • stroked: Enable borders

GeoJsonLayer

For complex geometries like wind farm boundaries, transmission lines, or service areas.
Key properties:
  • getFillColor: Fill color for polygons
  • getLineColor: Border color for geometries
  • lineWidthMinPixels: Border thickness
  • extruded: 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 the deckgl_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

Map Layer Types

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

Next steps

Now that you understand layers, learn how to combine them:

Map Components

Combine multiple layers into interactive map components.

Weather Integration

Learn more about weather data integration.

API Reference

Explore all layer endpoints and options.