API Reference HoloMap v#0.4.0

Copy Markdown View Source

Modules

Declarative MapLibre GL JS map components for the Hologram Elixir framework.

Imperative commands for things that are not state.

Namespace for MapLibre's built-in map controls.

Data attribution for the sources on the map.

A control the application builds in JavaScript.

A button that expands the map to fill the screen.

Locate the user, and optionally follow them.

A button that switches the map between the flat mercator projection and a globe.

MapLibre's logo, a link to maplibre.org.

Zoom in/out buttons and a compass.

A scale bar showing ground distance.

A button that lets the user turn 3D terrain on and off.

Shared plumbing for the definition components nested inside a HoloMap.Map.

Normalises the event-handler props that components accept.

Registers an image so layers can name it.

A small JSON encoder that runs in the browser.

A MapLibre layer of any type.

A colour or a pattern over the whole map, beneath everything else.

The shared body of every layer component.

Circles, the usual way to draw points.

Elevation drawn as colour, from a HoloMap.Source.RasterDEM.

A layer that draws with WebGL code the application provides, such as a three.js scene or deck.gl layers.

Filled polygons.

Extruded polygons, the standard way to draw 3D buildings.

Point density rendered as a heat surface.

Stroked lines.

Icons and text labels.

The light that shades HoloMap.Layer.FillExtrusion layers.

The map container. Everything else in HoloMap goes inside one.

A pin at a coordinate, rendered as a DOM element above the map.

A tooltip anchored to a coordinate.

The Elixir seam onto the browser runtime.

Atmosphere at the horizon, for tilted and 3D maps.

Namespace for the data sources a map can draw from.

GeoJSON features, given inline or fetched from a URL.

A single image pinned to four geographic corners.

Raster tiles: aerial imagery, scanned maps, any pre-rendered tile pyramid.

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

Vector tiles, from a TileJSON endpoint or an explicit tile URL template.

Turns Elixir-flavoured component props into MapLibre style-specification maps.

Adds an icon sprite to the map's style, next to the style's own.

3D terrain, draped over the map from an elevation source.