yendrisrogelio

yendrisrogelio

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.

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.

Showing Posts 1 to 6

alvinkatojr

alvinkatojr

Once again, the members of this community have blown me away. You guys are on a rampage!

Great project, @yendrisrogelio! Mapping is something that has been neglected or under the radar, so this is very much needed. I can’t wait to dive into the source and put this to good use!

Thanks for the good work!

yendrisrogelio

yendrisrogelio OP

Thanks, @alvinkatojr! Really appreciate the kind words.

Definitely let me know how it goes once you test it out or if you run into any rough edges. Feedback and PRs/issues are more than welcome!

alvinkatojr

alvinkatojr

Will definitely do so. Thanks again!

tmbb

tmbb

I love the idea of using MapLibre from inside of Elixir with minimal JS, but I have some questions:

  1. Is there support for running a flyTo animation when the map loads to get a “Google Earth” like initial rotation effect?
  2. Because loading the initial tiling takes a while, is it possible to cover the map with a div that works like a “curtain” and lift it (i.e. fade it out) on the “idle” event?
  3. Does this support completely custom tylesets, or just the whitelist of styles defined in the docs?
  4. Is it easto to overlay, say layers of type :text and of type :fill to create a box with text?

Thanks for what seems to be a very interesting library!

tmbb

tmbb

To answer my own questions

  1. Is there support for running a flyTo animation when the map loads to get a “Google Earth” like initial rotation effect?

No, and I’ve done a PR to implement it, but I’ve bundled that with some somwhat questionable choices to minimize UI glitches, and I understand some people may prefer the old glitches to my own approach.

  1. Because loading the initial tiling takes a while, is it possible to cover the map with a div that works like a “curtain” and lift it (i.e. fade it out) on the “idle” event?

It is possible and I have done so on my PR… But I’m not sure everyone will agree it is an improvement.

  1. Does this support completely custom tylesets, or just the whitelist of styles defined in the docs?

Apparently yes?

@yendrisrogelio I’d love your feedback on this.

yendrisrogelio

yendrisrogelio OP

Hi @tmbb,

Thanks for trying it out and especially for taking the time to open a PR!

I will review your PR in detail to see how you approached both, and we can discuss the trade-offs there to find the most idiomatic API shape!

3. Custom tilesets & styles: Yes, absolutely! There is no hardcoded whitelist. Any valid MapLibre style JSON URL, inline style object, or custom Vector Tile source is supported. In fact, one of our main internal benchmarks and use cases is integrating MaplibreX directly with TileserveX, our own high-performance vector tile and OGC API server (built with Elixir and Rust NIFs). You can point sources directly to any standard TileJSON, XYZ, or OGC API endpoints.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 12366 136
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New

Other Trending Topics Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews