HoloMap.Source.RasterDEM (HoloMap v0.1.0)

Copy Markdown View Source

Elevation tiles, encoded as RGB. The input for terrain and hillshade.

<HoloMap.Source.RasterDEM
  id="dem"
  tiles={["https://tiles.example.com/dem/{z}/{x}/{y}.png"]}
  encoding="terrarium"
  tile_size={256}
/>

<HoloMap.Terrain source="dem" exaggeration={1.5} />
<HoloMap.Layer.Hillshade id="relief" source="dem" />

Encoding

encoding must match how the tiles were produced, and there is no way to detect it. The wrong value renders a plausible-looking but entirely fictional landscape.

  • "mapbox": the Mapbox Terrain-RGB scheme (the default)
  • "terrarium": the Mapzen/AWS Terrain Tiles scheme
  • "custom": supply your own red_factor, green_factor, blue_factor and base_shift

Props

PropTypeNotes
idstringRequired. Referenced by HoloMap.Terrain and hillshade layers
urlstringTileJSON endpoint. Supply this or tiles
tileslistTile URL templates containing {z}, {x}, {y}
encodingstring"mapbox", "terrarium" or "custom"
tile_sizenumberPixel size of one tile
min_zoom / max_zoomnumberZoom range the tiles exist at
boundslist[west, south, east, north] extent of the data
red_factor / green_factor / blue_factor / base_shiftnumberCustom encoding coefficients
attributionstringAttribution text

Summary

Functions

Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).

Returns the list of property definitions for the compiled component.

Functions

__is_hologram_component__()

@spec __is_hologram_component__() :: boolean()

Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).

Examples

iex> __is_hologram_component__()
true

__props__()

@spec __props__() :: [{atom(), atom(), keyword()}]

Returns the list of property definitions for the compiled component.