ExRatatui.Widgets.Canvas.Map (ExRatatui v0.8.2)

Copy Markdown View Source

A world map shape to paint on a ExRatatui.Widgets.Canvas.

Plots Earth's continents inside the canvas' coordinate system. Pair with longitude/latitude bounds — x_bounds: {-180.0, 180.0} and y_bounds: {-90.0, 90.0} — to get a recognisable world view.

Fields

  • :resolution - :low (~1000 points) or :high (~5000 points, best with the :braille marker); default :low
  • :color - ExRatatui.Style.color() for the map points (required)

Examples

iex> alias ExRatatui.Widgets.Canvas.Map
iex> %Map{color: :green}
%ExRatatui.Widgets.Canvas.Map{
  resolution: :low,
  color: :green
}

Summary

Types

resolution()

@type resolution() :: :low | :high

t()

@type t() :: %ExRatatui.Widgets.Canvas.Map{
  color: ExRatatui.Style.color(),
  resolution: resolution()
}