Hi all,
I’ve just released the first version of MaplibreX, which exposes MapLibre GL JS as declarative LiveView components. The map follows your assigns, and map interactions come back as ordinary handle_event/3 callbacks.
A few things that might be of interest:
- 32 components — layers, sources, controls, markers, popups, 3D terrain,
deck.gl, and custom WebGL layers with your own GLSL shaders. - Map commands are Phoenix.LiveView.JS structs. fly_to, fit_bounds
and friends run entirely on the client, no server round-trip. - maplibre-gl is a peer dependency, not bundled. The published bundle is
65 KB (12 KB gzipped), and an app that already uses MapLibre never ends up
with two copies of it on the page. - deck.gl is imported dynamically on first use, so pages without it pay
nothing for the ~600 KB. - map:moved is debounced client-side, so panning doesn’t flood the socket.
Requires Elixir 1.15+ and LiveView 1.0+ (tested through 1.2).
Known limitation in 0.1.0: <.deckgl_layer> needs maplibre-gl v5.
@deck.gl/mapbox still reads the internal map.transform that v6 removed, and no published version has stopped — including the 9.4 alphas. Every other component works on both majors, and the library raises a message naming the constraint instead of failing somewhere inside deck.gl.
- Hex: maplibrex | Hex
- Docs: MaplibreX v0.1.0 — Documentation
- Demo app, nine pages each a single LiveView:
GitHub - CountlinkX-Solutions/maplibrex_demo · GitHub - Source:
It’s a 0.1.0 and the component API will likely move as people actually use
it, so feedback is very welcome — particularly on the shape of the API.






















