All notable changes to this project are documented here. The format follows Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

0.2.0 - 2026-11-30

This release moves to Hologram 0.12 and MapLibre GL JS 6.19. The changes that can break an application that upgrades are marked Breaking below.

Added

  • HoloMap.API.set_style/3 takes diff: false, which asks MapLibre to build the new style from scratch, as every style change did before this release: the map starts from an empty style, and the runtime declares the components' sources, layers, images, terrain and sky again once it has loaded. set_style/2 lets MapLibre diff the new style, as the style prop does. An unknown option, or a :diff that is not a boolean, raises ArgumentError.
  • HoloMap.Popup takes text and HoloMap.Marker takes popup_text: a popup's content as plain text, which MapLibre's setText puts in a text node, so a value the application does not control, such as a place name or a review, shows as it is and is never read as markup. text wins over html and slot content, and popup_text over popup_html. A popup or marker given both shows the text and logs a console warning, since showing the html instead would silently drop the choice of text. A change updates the popup in place. The Limitations guide's new section on untrusted content in popups compares the three kinds of content, and says that slot content reaches MapLibre's setHTML as the markup Hologram rendered, in which a value Hologram rendered as text stays escaped.

Changed

  • Breaking: HoloMap is now written against MapLibre GL JS 6.19.0, and the Installation guide installs maplibre-gl@^6.19.0. The browser suites run on 6.19.0 and 6.20.0, and the demo locks 6.20.0, the release that requirement resolves to today. HoloMap.maplibre_version/0 returns "6.19.0", the lowest release the requirement accepts. An application that locks an earlier 6.x release should move to 6.19.0 or later with npm install --prefix assets maplibre-gl@^6.19.0.
  • Breaking: MapLibre GL JS 6.19.0 ships no maplibre-gl-shared.mjs.map, so a copy step that lists it, as the demo's did, fails. The Installation guide no longer copies maplibre-gl-shared.mjs either: since MapLibre 6.13.0 the worker is self-contained and that file is empty, kept by MapLibre only until its next major version. Remove both from the copy step. An application pinned below 6.13.0 still serves maplibre-gl-shared.mjs next to the worker.
  • Breaking: HoloMap.Map's default worker_url now carries the version of the MapLibre the page loaded as a v query parameter, /assets/maplibre-gl-worker.mjs?v=6.19.0 on 6.19.0, as MapLibre's own default has since 6.13.0, so a browser or proxy can no longer keep serving the worker of an earlier release after an upgrade. The browser runtime reads the version from MapLibre's getVersion(). Plug.Static ignores the query and needs no change; anything that matches the worker's full URL, such as a rewrite rule or a CDN cache key, must allow the query. worker_url={nil} now selects this default, where it used to leave MapLibre's own resolution in place, which fails once Hologram bundles MapLibre. A worker_url the application sets is used as it is, with nothing added.
  • The HoloMap.Map and Installation guide text on a worker that fails to load now matches MapLibre 6.11.0 and later, which reports it through the map's error event. on_error receives it with the message "Worker failed to load. Check that the worker URL is correct.", and a map without on_error leaves MapLibre to log it to the console. The earlier text said nothing reports it.
  • Breaking: HoloMap now requires Hologram ~> 0.12.11, that is 0.12.11 or a later 0.12 release, and is tested on 0.12.11. Hologram 0.11 is no longer supported. The previous requirement, ~> 0.11, accepted every release up to 1.0, including minor releases nothing had tested.
  • Breaking: a template that relied on Hologram escaping a literal attribute now renders it as markup. HoloMap.Popup's html and HoloMap.Marker's popup_html are inserted as markup however they are written. Hologram 0.11 escaped both the text of a literal attribute and any value inserted into it. Hologram 0.12 escapes neither: a plain literal such as html="<b>hi</b>" arrives with its character references decoded, and a literal with an inserted value such as html="<b>{@name}</b>" arrives as the text and the value joined, unescaped. A value passed as an expression, such as html={@html}, arrives as it is, as before, so an escaped string passed that way stays escaped. An application must escape any value it does not control before it interpolates it. The Limitations guide shows how.
  • Breaking: a bad or missing prop no longer raises ArgumentError or KeyError, so code that rescues either for one gets Hologram.PropError or Hologram.CompileError instead. When the Hologram compiler runs, in a production build or with HOLOGRAM_START=1 in development and test, a template call site that misses a required prop, such as HoloMap.Control.Terrain's source or HoloMap.Image's url, or gives a prop a literal value it does not accept, such as position="middle" on a control, fails the build with Hologram.CompileError. Hologram's renderer raises Hologram.PropError, naming the component and the prop, for what the compiler cannot check: a spread, a dynamic tag, a value computed as the template renders, a component rendered programmatically, and every render in development and test without the compiler.
  • Breaking: HoloMap.API's fly_to/2, ease_to/2 and jump_to/2 take :easing as one of :linear, :ease_in, :ease_out and :ease_in_out, the curves of CSS's timing keywords, or {:cubic_bezier, x1, y1, x2, y2}, and raise ArgumentError for any other value. MapLibre takes the easing as a function, which JSON cannot carry, and the option used to reach it as the string or number it was given, which MapLibre called inside an animation frame. On MapLibre 6.20.0 the move fired movestart, threw an uncaught TypeError in its first frame, and stayed in progress, with no moveend and the camera where it was, until another move interrupted it. The browser runtime now builds the function from the name or the control points. A call that passed anything else as :easing must pass one of these values or leave the option out, which keeps MapLibre's own easing.
  • The Installation guide no longer asks for a Plug.Static and a gzip step for the Hologram bundles. Hologram 0.12 writes them to its own build directory, removes priv/static/hologram, and serves them compressed and cached from its own router, so an application that followed the earlier guide can drop both. An application set up with Hologram 0.11's own installation guide can also remove "hologram" from its endpoint's Plug.Static only: list. Refusing sourcemaps outside development still needs a plug placed before plug Hologram.Router in the endpoint.
  • A change to HoloMap.Map's style, or a HoloMap.API.set_style call, no longer rebuilds the whole style. The runtime asked MapLibre for a new style every time, so the map went blank and the sprite and glyphs were requested again, even when both styles shared them. It now lets MapLibre diff the new style against the map, with a transformStyle that carries the sources and layers the components declared into the new style, so only the basemap changes. The components' layers keep their template order and their before_id, and go back to their props, as before. Images, terrain, sky and the feature state of the components' sources stay as they were; feature state used to be cleared. A source or layer whose id the new style uses is still left to it, with a warning. A new style that fails MapLibre's validation now leaves the map on the style it had, where the map used to go blank. A change MapLibre cannot diff, such as a style that sets centerAltitude, and a change made before the first style has loaded build the new style from scratch, as every change did before, and the runtime declares everything again once it has loaded.
  • A render no longer parses every component's specification again. The browser runtime parsed the data-hm-spec and data-hm-events of every definition on the map whenever any of them changed, so a marker dragged with its position written back on every drag event, as HoloMap.Marker documents, parsed the GeoJSON of every source on the map on every event. It now parses only the attributes that changed, and nothing when only a marker's or a popup's slot changed. A HoloMap.Map event handler whose params hold a whole-number float, such as 1.0, no longer has its listener bound again on every render.

Deprecated

  • HoloMap.Control.Geolocate's show_user_heading never drew a heading arrow: MapLibre GL JS 6 has no showUserHeading option, and it ignored the key. The prop is still accepted but no longer sent to MapLibre, and the browser runtime logs a console warning, once per map, while it is set. A later release removes it.

Fixed

  • HoloMap.Map's antialias had no effect: it reached MapLibre as a top-level option, which MapLibre has not read since 5.0.0 moved it into canvasContextAttributes. It is now sent there, as %{"antialias" => true}, merged with any canvasContextAttributes given through options, whose keys win.
  • A HoloMap.Map limit set back to nil, max_bounds, min_zoom, max_zoom, min_pitch or max_pitch, stayed in force: a prop set to nil leaves its key out of the map's specification, like one never set, and the browser runtime skipped a key that was gone. It now lifts the limit, as MapLibre's setters do when given null, and the camera is as free as on a map built without it. Like setting a limit, lifting one reports no move.
  • HoloMap.Map's render_world_copies and pixel_ratio were read only when the map was built. A change now goes through MapLibre's setRenderWorldCopies and setPixelRatio, and nil returns to MapLibre's defaults, world copies drawn and the device's pixel ratio. A new pixel ratio resizes the canvas, which MapLibre announces as a move, and that move is not reported to on_move_start or on_move_end.
  • HoloMap.Map's interactive, cooperative_gestures and the seven interaction handler props, drag_rotate, drag_pan, scroll_zoom, double_click_zoom, box_zoom, keyboard and touch_zoom_rotate, were read only when the map was built, so a "lock the map" toggle bound to one did nothing. They now turn MapLibre's handlers on and off as they change. MapLibre has no setter for interactive, so the runtime makes the choices its constructor makes: interactive={false} turns off every handler that option covers, touchPitch included, and takes away the grab cursor and the canvas's place in the tab order; turned back on, it turns on each handler whose own prop is not false. It leaves cooperative_gestures alone, as MapLibre does.
  • A change to a HoloMap.Map prop that MapLibre reads only while it builds the map, such as hash, fade_duration, antialias or locale, was dropped without a word, and nothing said which props those are. The props table now marks each prop build only or applies, and a change to a build only prop, or to a key of options that is not the name of an option that applies, logs a console warning naming the MapLibre option, once for each option on each map.
  • A change to HoloMap.Map's max_bounds that left the camera outside the new bounds reached on_move_start, on_move_end and on_zoom_end as if the user had moved the map: since 6.18.0, MapLibre's setMaxBounds fires the events of the move that brings the camera back, with nothing to tell them from a user's. A change to min_zoom, max_zoom, min_pitch or max_pitch that moved the camera did the same, on_pitch_end included. Like a change to center or zoom, these moves are no longer reported, and the next move the user makes reports where the camera ended up.
  • On a browser that cannot create a WebGL2 context, a map failed with an uncaught GPUInitializationError, which MapLibre's constructor has thrown since 6.7.0, and the application never heard why the map was blank. The runtime also went on listing the map as live. The failure now reaches HoloMap.Map's on_error once, with MapLibre's message and no camera keys, since there is no camera to read them from, or the console when there is no on_error. Camera limits MapLibre refuses when it builds the map, such as a min_zoom above max_zoom, are reported the same way. The map is not built again on that container, and the other maps on the page are unaffected. An on_error handler that reads center or another camera key from every payload has to allow for its absence.
  • A HoloMap.API call for a map MapLibre could not build was queued as if the map were about to boot, and dropped five seconds later with a warning that no map had booted. It is now dropped at once, with a console warning that names MapLibre's error, and so are the calls queued for the map before it failed.
  • A map that asked for another worker_url than the first map on the page ran on the first map's worker without a word, since MapLibre keeps one worker URL per page. The browser runtime now warns, once for each other URL, naming the map and both URLs. A map that sets no worker_url asks for the default.
  • A render that changed both ends of a HoloMap.Map zoom or pitch range could leave the map with a range the application did not ask for. The runtime set the minimum first, and MapLibre refuses a minimum above the maximum in force, so min_zoom and max_zoom going from 2 and 4 to 8 and 12, or min_zoom raised past max_zoom while max_zoom was set back to nil, applied the new maximum and kept the old minimum, with the refusal logged to the console. A range that moves up past its old maximum now takes its new maximum first, so any valid pair of limits applies whatever the previous pair was.

0.1.1 - 2026-11-26

Fixed

  • HoloMap.Marker's on_click, on_drag_start, on_drag and on_drag_end stopped firing once a change to the slot content, color, scale or class_name replaced the MapLibre marker. The listeners are now bound to the new marker and taken off the old one.
  • HoloMap.Popup's on_open never fired: MapLibre emits open while the popup is being added, and the listener was attached afterwards. It now fires when the popup first renders and when a changed declaration reopens a popup MapLibre had closed.
  • Most HoloMap.Marker and HoloMap.Popup props were read only when the MapLibre object was built, so changing them from state did nothing. A marker's opacity, pitch_alignment, rotation_alignment, subpixel_positioning, popup_html and popup_options, and a popup's max_width, offset, class_name and subpixel_positioning, now go through MapLibre's setters. Options MapLibre has no setter for replace the object: a marker's anchor and click_tolerance, and a popup's anchor, close_button, close_on_click, close_on_move and focus_after_open. A popup replaced this way reports neither on_close nor on_open, and a marker's popup that was open stays open when its options change.
  • HoloMap.Marker's popup_options reached MapLibre with its keys untouched, so the documented HoloMap.Popup vocabulary (close_button, max_width and the rest) was ignored. Those keys are now converted, with the same boolean coercion HoloMap.Popup applies; string keys still pass through unchanged. An option set to nil is left out whatever its key, as everywhere else.
  • Clicking a HoloMap.Marker that has on_click neither opened its popup_html popup nor closed popups with close_on_click. The runtime stopped the DOM click so the map's on_click would not also fire, but MapLibre makes the map's own click from that same DOM event, and handles marker popups and close_on_click from it. The click is now marked instead of stopped: MapLibre sees it, while the map's and layers' on_click still ignore a click on a marker that reports its own. The DOM click now bubbles past the map like any other click on it. The marker's on_click is dispatched once the click has finished propagating, after the on_close of any popup it closed, so a popup whose on_close clears the selection no longer undoes the selection made by clicking another marker.
  • A source, a layer and a HoloMap.Image that shared an id, as a source and the layer drawing it often do, replaced one another on every render, leaving the map without the source or the layer. The same happened to a layer called terrain or sky next to HoloMap.Terrain or HoloMap.Sky. Definitions are now told apart by kind as well as id, and MapLibre still receives the id unchanged. This also fixes a definition that changed from a source or layer to a marker, popup or control before the style had loaded: its new object lost its events, and removing the definition left it on the map.
  • A layer whose source did not exist yet was handed to MapLibre anyway, which refused it with a "source not found" error, and nothing added it later: a layer written above its source, a layer rendered while its source was not, and the layers of a source that was removed and rendered again all stayed missing. Such a layer now waits for its source and is added, in declared order, as soon as the source is.
  • Layers and controls kept their declared order only on first load. A layer rendered conditionally, re-added because its type, source or source_layer changed, or re-added by a structural source change went on top of every other layer; a changed before_id was ignored; and a before_id naming a layer declared further down, or not rendered yet, was dropped for good. Each layer is now placed where the template puts it, a before_id change moves the layer, and a before_id takes effect once the layer it names is on the map. A control rendered conditionally, or replaced by a prop change, went to the far end of its corner; it now goes back to its declared place, and the controls around it are left as they are.
  • An inline style map was set again on every change to any HoloMap.Map prop, such as zoom, and MapLibre's diff then took every source and layer off the map and back on. It is now compared by value. A style change, from the prop or HoloMap.API.set_style/2, now always builds the new style from scratch instead of diffing it, so it always ends in the re-declaration of the map's sources, layers, images, terrain and sky; work and HoloMap.API calls issued while the new style loads wait for it instead of reaching the old style or failing with "Style is not done loading". When the new style already defines a source of the same id, the layers drawing from it are no longer added to the style's source, where a vector source refused each one with an error; the warning now names them. A style change also no longer warns that the new style defines each of the map's own layers.
  • Terrain stayed bound to its HoloMap.Source.RasterDEM after a change to the source's tiles, url, encoding or other structural keys rebuilt it, and after the source was removed, so it went on drawing from a source that was no longer on the map. It now comes off before the source and goes back on the rebuilt one, whether HoloMap.Terrain or the terrain control turned it on. Removing the source turns terrain off with a warning until the source is rendered again. HoloMap.Terrain declared above its source, or rendered while the source was not, made MapLibre throw "cannot load terrain" and was never applied; it now waits for its source, as layers do.
  • A HoloMap.API call made before its map had booted was dropped with a console warning. Hologram runs the actions scheduled from init in the order of the components' cids, so the documented pattern of moving the camera from a page's init action lost the call whenever the map's cid sorts after "page". Such calls are now queued and run in order once the map's style has loaded; calls for a map that has not booted within five seconds are dropped with a warning.
  • HoloMap.Map's on_error received the camera but not the error. Its payload now also has an error map with the message, plus the HTTP status and url of a failed request and the source_id of a source's error when MapLibre reports them. Only plain values cross into Elixir.
  • HoloMap.Image applied whichever image load finished last: a slow response for an earlier url replaced the image of a later one, and a response for an image removed while it loaded registered it again, with no component left to remove it. A load is now applied only if it is the latest one for an image that is still declared.
  • Booting a map retried every animation frame for as long as its container was missing, for the rest of the page's life if the page moved on first, and built the map with no options, so with no style ever, when the map definition still named another map during a navigation. Boot now waits a frame at a time for both the container and a definition that names the map, and gives up with a warning after 60 frames.
  • A HoloMap.Marker's popup_html popup that the user had opened closed whenever a change to the slot content, color, scale, class_name, anchor or click_tolerance replaced the MapLibre marker, so a marker whose content follows state closed its own popup on every change. It is now opened again on the new marker; a popup the user had not opened stays closed.
  • Removing offset from a HoloMap.Marker drawn as MapLibre's default pin set its offset to [0, 0], which moved the tip of the pin off its coordinate. It now goes back to MapLibre's own offset for the pin, [0, -14]; a marker with slot content still goes back to [0, 0].
  • A class_name with a leading, trailing or repeated space kept a HoloMap.Marker or HoloMap.Popup off the map, and a popup_options one kept the marker's popup from opening: MapLibre splits it on single spaces and the browser refuses the empty class name between two of them. The names now reach MapLibre separated by single spaces.
  • Every change to an open HoloMap.Popup rewrote its content, even a change to lng_lat alone, so a popup following a moving feature lost its scroll position and text selection on every move and, with focus_after_open, took keyboard focus back. The content is now rewritten only when html or the slot content changes what the popup shows.
  • A layer's on_click was dispatched before the on_close of a close_on_click popup that the same click closed, whenever the popup had opened after the layer was added, which is the usual case for a popup showing a selected feature. A popup whose on_close clears the selection therefore undid the selection made by clicking another feature. A layer's on_click is now dispatched once the click has finished, as a marker's is.
  • Changing a HoloMap.Image's url to an image of another size left the old image in place and logged an error, because MapLibre's updateImage accepts only an image of the same size. Such an image is now registered again, with the same options; one of the same size is still updated in place.
  • When a new style already defined a source or layer with a component's id, the runtime left that id to the style with a warning, but went on treating it as its own: removing the component removed the style's source, a data or structural change to it rewrote or replaced the style's source, a prop change to a layer component changed the style's layer, a structural change to a source took the style's layer of a layer component's id off the map and put the component's back, and a before_id moved the style's layer. Until the style changes again, such a component now leaves the style's source or layer alone.
  • Since calls made before a map boots are queued, a HoloMap.API call for a map torn down with HoloMap.Runtime.destroy/1 waited five seconds before it was dropped with a warning. It is now dropped at once, with a warning naming the destroyed map. Calls are queued again once the map boots again, or once a page has moved its container away, so a page that renders the map again still hands it the calls made before its boot.
  • Module docs and guides that contradicted the runtime are corrected, among them how long an imperative change lasts, when a popup's on_open and on_close fire, and the MapLibre GL JS release that introduced the globe control (5.0.0, not 6).
  • HoloMap.Map's on_click was dispatched before the on_close of a close_on_click popup that the same click closed, because the map's listener is added when the map boots, before any popup. A popup whose on_close clears state could therefore undo what the map's on_click had just set. It is now dispatched once the click has finished, as a layer's and a marker's are.
  • A source or layer component whose id the style already used when the component was added, on the first style or rendered later, was skipped without a warning and then treated as the map's own: a change to it rewrote the style's source or layer, and removing it removed them. It now warns once and leaves the style's source or layer alone, as after a style change, and the layers of such a source stay off the map instead of drawing the style's data. A layer component whose id the style uses also kept its event listeners, so its on_click and other events reported the style's layer of that id. Its listeners now come off while the style holds the id, and go back on once a style change leaves it free.

Security

  • Locked dependencies with published advisories were refreshed: Phoenix 1.8.17, Plug 1.20.4 and Plug.Crypto 2.2.1 in the library's lockfile, and the same plus Bandit 1.15.0 and source-map-js in the demo's. No version requirement changed, so applications resolve their own versions as before.

0.1.0 - 2026-08-23

Added

  • HoloMap.Map, the map container. Stateful, keyed by its Hologram cid, which is also the DOM container id and the handle for every HoloMap.API call.
  • Sources: HoloMap.Source.GeoJSON, .Vector, .Raster, .RasterDEM, .Image.
  • Layers: HoloMap.Layer.Fill, .Line, .Circle, .Symbol, .Raster, .Heatmap, .Hillshade, .FillExtrusion, plus a generic HoloMap.Layer for a type decided at runtime.
  • Overlays: HoloMap.Marker and HoloMap.Popup, both accepting slot content.
  • HoloMap.Image, which registers an image so a symbol layer's icon_image, or a fill or line layer's pattern, can name it. Without it, only icons the style's own sprite carries are reachable, and naming anything else fails silently: MapLibre emits styleimagemissing and draws nothing.
  • Controls: HoloMap.Control.Navigation, .Scale, .Geolocate, .Fullscreen, .Attribution, .Globe and .Terrain.
  • 3D: HoloMap.Terrain and HoloMap.Sky.
  • HoloMap.API: fly_to/2, ease_to/2, jump_to/2, fit_bounds/3, resize/1, set_style/2, set_filter/3, set_paint_property/4, set_layout_property/4, set_feature_state/3, remove_feature_state/3.
  • MapLibre events surfaced as Hologram actions, with payloads documented per component and in the Events guide.
  • window.HoloMap.map/1, so MapLibre plugins can reach the raw instance.
  • A Phoenix + Hologram demo application exercising every component across eleven pages, and Playwright suites driving a real MapLibre instance: component behaviour, full source/layer coverage, and navigation.

Notes on the design

  • Components do not call MapLibre. Each renders one hidden element carrying its specification as JSON, and a MutationObserver in the browser reconciles those elements against the live map. This is what supplies the mount, update and unmount hooks Hologram 0.11 does not have. See the Architecture guide.
  • HoloMap.JSON exists because Jason cannot be compiled to JavaScript by Hologram, and specifications have to be encoded during client-side re-renders.
  • HoloMap.Map sets MapLibre's worker URL explicitly. MapLibre resolves its worker against import.meta.url, which points at Hologram's page bundle once bundled; the resulting import failure happens inside a worker and surfaces as a map that renders its background and never draws a tile.
  • Style-scoped work waits for style.load, not load. The latter also waits for a first complete render, which never arrives if a tile request hangs.
  • Definitions are matched to their map by data-hm-map, and disposal is decided by the container's id rather than isConnected, because Hologram morphs the old page's DOM into the new one on navigation rather than replacing it.

Behaviour worth knowing

  • A popup MapLibre closed on its own (the close button, a click on the map, a camera move) left the reconciler believing it was still open. Clicking the same feature again changed no state, re-rendered nothing, and the popup never returned. HoloMap.Popup now reports on_close (and on_open), a changed declaration re-asserts a popup MapLibre had closed, and addPopup removes any existing instance first so no path can stack two on one coordinate.

  • HoloMap.Sky cleared itself with setSky(null), which MapLibre validates and rejects with "sky: object expected, null found". The sky was cleared anyway, but a console error was logged every time the component was removed.

  • The documented shape of layer event payloads was wrong. Hologram converts JavaScript object keys to atoms recursively, so a feature's properties arrive as %{parcel_id: id}, not %{"parcel_id" => id}. Matching with string keys silently fails rather than raising, which is why it survived until every component was exercised in a browser.

Requirements

  • Elixir 1.19+, OTP 28.1+, Hologram 0.11+
  • MapLibre GL JS 6.x, installed and served by the host application