# `Meridian.Render.MapLibre`
[🔗](https://github.com/code-shoily/meridian/blob/v0.1.0/lib/meridian/render/maplibre.ex#L1)

Renders a `Meridian.Graph` as an interactive MapLibre map in Livebook.

Requires the optional dependencies `:maplibre`, `:kino_maplibre`, and `:jason`.

## Usage

    graph
    |> Meridian.Render.MapLibre.new()

With options:

    graph
    |> Meridian.Render.MapLibre.new(
      style: :street,
      zoom: 12,
      node_color: "#e74c3c",
      edge_color: "#3498db"
    )

The returned value is a `Kino.MapLibre` struct that renders directly in Livebook.

# `new`

```elixir
@spec new(
  Meridian.Graph.t(),
  keyword()
) :: Kino.MapLibre.t()
```

Creates a MapLibre map from a `Meridian.Graph`.

## Options

  * `:center` — `{lng, lat}` tuple for initial map center. Defaults to the graph's
    bounding-box centroid or `{0.0, 0.0}` if the graph has no geometries.
  * `:zoom` — initial zoom level (default: `10`)
  * `:style` — MapLibre base style: `:default`, `:street`, `:terrain`, or a style URL
    (default: `:default`)
  * `:key` — MapTiler API key. Required when `:style` is `:street` or `:terrain`.
  * `:node_color` — circle color for point features (default: `"#3FB1CE"`)
  * `:node_radius` — circle radius in pixels (default: `6`)
  * `:edge_color` — line color for line features (default: `"#888888"`)
  * `:edge_width` — line width in pixels (default: `2`)
  * `:include_edges` — whether to render edges as line layers (default: `true`)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
