All notable changes to this project are documented here. The format follows Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.3.0 - 2026-11-30
This release lets the map answer questions and report more of what happens on it, and turns MapLibre's style state into props. The one change that can break an application that upgrades is marked Breaking below.
Added
- A request and reply channel:
HoloMap.APIcan ask the map something, and the answer arrives as the params of the action named with:reply, which takes the shapes an event prop takes. The params hold:result, the answer as plain data, or:error,%{message: message}, when MapLibre throws or reports an error while it answers, a promise it returns rejects, or there is no map to answer: one that did not boot within five seconds, that MapLibre could not build, or thatHoloMap.Runtime.destroy/1tore down. Coordinates arrive as[lng, lat], pixel positions as[x, y], bounds as[[west, south], [east, north]], and features as layer events carry them. Requests queue with the other calls, in order, and wait for the map to boot and for a style to load.HoloMap.Runtime.call/3still discards what the method returns. HoloMap.API.query_rendered_features/2andquery_source_features/3find features and send them to the reply action. An answer carries at most 100 features, or the number given with:limit, says withtruncated: truewhen it left some out, and leaves geometry out withgeometry: false.HoloMap.API.project/3,unproject/3,query_terrain_elevation/3,camera_for_bounds/3andget_feature_state/3, andHoloMap.API.request/4, which asks any method of the map, or with:sourceof one of its sources, by name, such asgetCenter,getStyleorareTilesLoaded. Its documentation lists what each getter answers. Each checks its options and raisesArgumentErrorfor one it does not take. The Imperative API guide's new section, Asking the map, explains the pattern and the bound on answers.- Every layer component takes
expand_cluster_on_click: a click on a cluster of a clustered GeoJSON source eases the camera to the cluster's point, at the zoom where it breaks apart, as MapLibre'sgetClusterExpansionZoomgives it, all in the browser, with no action. A click on a feature that is not a cluster does nothing more. The layer'son_clickstill hears the click and is dispatched first. The move useseaseTo's defaults and is reported to the map's move events as a user's move is. A source that is not clustered leaves the camera where it is, with a console warning.HoloMap.Layer's new section, Expanding clusters, has the details. HoloMap.API.expand_cluster/4makes the same move from an action, with the options ofease_to/2other than:zoom, such as:centerand:duration.get_cluster_leaves/4reads the points a cluster holds andget_cluster_children/4what it breaks into at the next zoom, and both send them to the reply action as features, as queries do, each with the source asked as itssource.get_cluster_leaves/4pages through the points::limit, 100 unless given, is the most the answer holds, and is MapLibre's ownlimit,:offsethow many it skips, andtruncated: truesays the cluster holds more after them.request/4gives the two source methods the same bounded answer, and answers them with an:errorfor a source that is not clustered. The Imperative API guide's new section, Clusters, shows both.HoloMap.Maptakesglobal_state, a map of the values a style'sglobal-stateexpressions read, sent as MapLibre's global state with each name as written. The map is built with it, so the first render draws with it. A change sets each name that changed withsetGlobalStateProperty, and MapLibre restyles the layers that read it without their paint, layout or filter being sent again. A name taken out, or set tonil, goes back to the default the style declares for it. Every new style is handed the global state, whether MapLibre diffs it or builds it from scratch, so the values hold through a style change. The Getting started guide's new section, Many layers from one value, shows the pattern.HoloMap.Maptakesprojection:"mercator","globe","vertical-perspective"or an expression that picks one by zoom. It wins over the style's own projection. It is put in place once the first style has loaded and as it changes, withsetProjectionand no style reload, and a style change keeps it, whether MapLibre diffs the new style or builds it from scratch. Set back tonil, the style's own projection returns.HoloMap.Control.Globeswitches it until the prop or the style changes. MapLibre keeps an expression's projection when asked for"globe"after it; the browser runtime puts mercator in between, unreported, so the prop switches to a real globe.on_projection_transitiononHoloMap.Mapreports each projection MapLibre puts in place, including the first, a change to the prop and a click onHoloMap.Control.Globe, with the camera andprojection, the projection's type as the prop takes it. A style the prop replaces the projection of reports only the prop's, so writing the payload back into state never echoes.HoloMap.Control.Geolocatereports its events:on_geolocatewith the browser's position, ascoords(longitude,latitude,accuracy,altitude,altitude_accuracy,heading,speed) andtimestamp,on_errorwith the error'scodeandmessage,on_out_of_max_boundswith the position outside the map'smax_bounds, andon_track_start,on_track_end,on_user_location_focusandon_user_location_lost_focuswith no payload.HoloMap.Control.Fullscreenreportson_enterandon_exit. A change to a control's handlers alone keeps the control, still following the user if it was, and a control rebuilt for another prop has its listeners moved to it. MapLibre GL JS 6.20.0 fires the geolocate control's events without the position's or the error's fields, which browsers keep on the prototype; the browser runtime reads them from what the control was handed, so the payloads are the same on 6.19.0 and 6.20.0.HoloMap.Control.Geolocatetakeszoom_to_user_accuracy:falsekeeps the zoom when the camera moves to the user.HoloMap.API.trigger_geolocate/1asks for the user's position from an action, as a click on the map's geolocate button does; the answer arrives through the control's events. A map with no geolocate control logs a console warning, and one with several triggers the first declared, with a warning.- Every event prop takes a rate limit in its handler map:
%{action: :moved, throttle: 100}dispatches the first event at once and then at most one every 100 ms, always ending with the last, and%{action: :rested, debounce: 250}dispatches the last event once none has come for 250 ms.0dispatches every event. A handler with both, or with a value that is not a non-negative integer, raisesArgumentError. The Events guide's new section, Throttling and debouncing, has the details. HoloMap.Mapreports 39 more MapLibre events. Loading:on_data,on_data_loading,on_data_abort,on_source_data,on_source_data_loading,on_source_data_abortandon_style_data, withdata_type, and for a sourcesource_id,is_source_loadedandsource_data_type, so an application can show a loading state per source. Robustness:on_style_image_missingwith the image'sid,on_webgl_context_lost,on_webgl_context_restored,on_resize,on_cooperative_gesture_preventedwithgesture_type, andon_terrainwith theterrainput in place ornil. Gestures:on_drag_start,on_drag_end,on_zoom_start,on_rotate_start,on_pitch_start,on_roll_start,on_roll_end,on_box_zoom_start,on_box_zoom_end,on_box_zoom_cancel,on_wheel,on_mouse_down,on_mouse_up,on_mouse_over,on_mouse_out, andon_touch_start,on_touch_move,on_touch_endandon_touch_cancelwithlng_latandpoint. Every frame:on_move,on_zoom,on_rotate,on_pitch,on_roll,on_dragandon_render, throttled to 100 ms unless the handler names a limit of its own. Each carries the camera, as the other map events do, and a camera move the runtime makes for a camera prop reports none of them.- Layers report
on_mouse_over,on_mouse_outandon_touch_cancel. HoloMap.Spriteadds an icon sprite next to the style's own, with MapLibre'saddSprite, and a symbol layer names its icons"<id>:<icon>". A URL relative to the page is resolved against it, since MapLibre takes only an absolute one. A newurlreplaces the sprite, and the component's removal takes it off. A sprite whoseidthe style's sprite uses is the style's, with a console warning, as a source or a layer is. A style change keeps the sprite: a diff carries it into the new style, after the new style's own, a style built from scratch has it added again, and the style MapLibre builds again after a WebGL context loss holds it.HoloMap.Maptakesglyphs, a glyph server URL, andfont_faces, font files by the font name a layer'stext_fontnames, for scripts a glyph server cannot draw, as a URL or a list of%{url: url, unicode_range: ranges}. Each replaces the style's own once the first style has loaded, and as it changes, withsetGlyphsandsetFontFaces, and holds through every style change and a WebGL context loss. Set tonil, the style's own return.HoloMap.Map's new section, Glyphs and font faces, has the details.HoloMap.Lightsets the light that shades fill-extrusion layers, withanchor,color,intensityandposition, over the style's own light with MapLibre'ssetLight, and updates it as its props change. Taken out of the template, it returns the map to the style's light, or to MapLibre's default. MapLibre leaves the style's own light in the stylesheet, which a diff and the copy a WebGL context loss rebuilds from carry, so the browser runtime sets the light again once every new style has loaded.HoloMap.Layer.Background, a colour or pattern over the whole map, which draws no source and so takes nosource,source_layer,filteror event props, andHoloMap.Layer.ColorRelief, elevation drawn as colour from aHoloMap.Source.RasterDEM, MapLibre GL JS 5.6.0 and later.HoloMap.Source.Vectortakesencoding,"mvt"or"mlt"for MapLibre Tiles, andsparse, experimental in MapLibre, which draws a tile the server answers with a 404 from a lower zoom.
Changed
- A change to a vector, raster or raster-dem source's
tilesorurl, or to a GeoJSON source'scluster,cluster_radiusorcluster_max_zoom, now applies in place, with MapLibre'ssetTiles,setUrlandsetClusterOptions, where it took the source's layers off the map, built the source again and put the layers back. The layers stay as they are, and keep whatHoloMap.APIset on them, the terrain stays on its source, and MapLibre requests the tiles again or builds the clusters again. A change todatawith the cluster options goes throughsetClusterOptions, thensetData. Takingtiles,url,cluster_radiusorcluster_max_zoomaway, and any other source change, still rebuilds the source. After a WebGL context loss, the browser runtime sets cluster options changed in place again on the source MapLibre builds again, which its snapshot holds with the options the source was added with. The Architecture guide's Update costs table and the Limitations guide list the new costs.
Fixed
- On a map built with
collectResourceTimingthroughHoloMap.Map'soptions, a change to a GeoJSON source'sdatarebuilt the source and its layers instead of going throughsetData: MapLibre writes the flag into the source specaddSourceis given, and the browser runtime compared the next spec with that one, which then differed. MapLibre is now handed a copy. - After the browser took a map's WebGL context away and gave it back, prop
changes no longer reached the components' sources and layers. MapLibre
builds the style it had again from a snapshot that holds them, and the
browser runtime took it for a new style that used their ids: it logged a
"the new style already defines" warning for each and left them to the
style. The rebuilt style now counts as the map's own: the components'
sources, layers, images, terrain and sky stay theirs, an id the style held
before stays the style's without a second warning, and the declared
global_stateandprojectionhold, where MapLibre would hand the style the global state the map was built with. Changes,HoloMap.APIcalls, an image that arrives and astylechange made while the context is lost wait for the rebuilt style, where they reached a map with no style and were dropped, or made MapLibre build an empty one.HoloMap.Map's new section, Losing the WebGL context, has the details. - An event a map fired while Hologram navigated away could run its action
on the next page, raising
FunctionClauseErrorthere: the morph patches the map's container into an element of the next page, which stays in the document under another id, and the browser runtime dispatched until it disposed of the map, a moment later. It now dispatches nothing from a map whose container no longer has the map's id. A navigation away from a page withon_source_datahit it every time. - An atom named after a browser global among the arguments of a
HoloMap.APIcall orHoloMap.Runtime.call/3reached MapLibre as that global: Hologram's interop reads an atom such as:top,:nameor:statusaswindow.top,window.nameorwindow.status, soset_feature_state(cid, feature, %{mode: :top})setmodeto theWindowobject.call/3now sends the method and its arguments as one JSON string, encoded withHoloMap.JSON, as requests do, and every atom arrives as its name. A tuple still arrives as a list, a keyword list as a list of[key, value]pairs, andnilasnull. - Breaking: as a result,
HoloMap.Runtime.call/3no longer accepts a term JSON cannot carry. A struct (aHologram.JS.NativeValueamong them), a function or a pid among the arguments now raisesArgumentErrorbefore anything is sent, where the interop handed it over to MapLibre.
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/3takesdiff: 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/2lets MapLibre diff the new style, as thestyleprop does. An unknown option, or a:diffthat is not a boolean, raisesArgumentError.HoloMap.PopuptakestextandHoloMap.Markertakespopup_text: a popup's content as plain text, which MapLibre'ssetTextputs 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.textwins overhtmland slot content, andpopup_textoverpopup_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'ssetHTMLas the markup Hologram rendered, in which a value Hologram rendered as text stays escaped.
Changed
- Breaking:
HoloMapis now written against MapLibre GL JS 6.19.0, and the Installation guide installsmaplibre-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/0returns"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 withnpm 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 copiesmaplibre-gl-shared.mjseither: 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 servesmaplibre-gl-shared.mjsnext to the worker. - Breaking:
HoloMap.Map's defaultworker_urlnow carries the version of the MapLibre the page loaded as avquery parameter,/assets/maplibre-gl-worker.mjs?v=6.19.0on 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'sgetVersion().Plug.Staticignores 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. Aworker_urlthe application sets is used as it is, with nothing added. - The
HoloMap.Mapand Installation guide text on a worker that fails to load now matches MapLibre 6.11.0 and later, which reports it through the map'serrorevent.on_errorreceives it with the message "Worker failed to load. Check that the worker URL is correct.", and a map withouton_errorleaves MapLibre to log it to the console. The earlier text said nothing reports it. - Breaking:
HoloMapnow 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'shtmlandHoloMap.Marker'spopup_htmlare 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 ashtml="<b>hi</b>"arrives with its character references decoded, and a literal with an inserted value such ashtml="<b>{@name}</b>"arrives as the text and the value joined, unescaped. A value passed as an expression, such ashtml={@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
ArgumentErrororKeyError, so code that rescues either for one getsHologram.PropErrororHologram.CompileErrorinstead. When the Hologram compiler runs, in a production build or withHOLOGRAM_START=1in development and test, a template call site that misses a required prop, such asHoloMap.Control.Terrain'ssourceorHoloMap.Image'surl, or gives a prop a literal value it does not accept, such asposition="middle"on a control, fails the build withHologram.CompileError. Hologram's renderer raisesHologram.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'sfly_to/2,ease_to/2andjump_to/2take:easingas one of:linear,:ease_in,:ease_outand:ease_in_out, the curves of CSS's timing keywords, or{:cubic_bezier, x1, y1, x2, y2}, and raiseArgumentErrorfor 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 firedmovestart, threw an uncaughtTypeErrorin its first frame, and stayed in progress, with nomoveendand 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:easingmust 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.Staticand a gzip step for the Hologram bundles. Hologram 0.12 writes them to its own build directory, removespriv/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'sPlug.Staticonly:list. Refusing sourcemaps outside development still needs a plug placed beforeplug Hologram.Routerin the endpoint. - A change to
HoloMap.Map'sstyle, or aHoloMap.API.set_stylecall, 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 atransformStylethat 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 theirbefore_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 whoseidthe 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 setscenterAltitude, 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-specanddata-hm-eventsof every definition on the map whenever any of them changed, so a marker dragged with its position written back on everydragevent, asHoloMap.Markerdocuments, 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. AHoloMap.Mapevent handler whoseparamshold a whole-number float, such as1.0, no longer has its listener bound again on every render.
Deprecated
HoloMap.Control.Geolocate'sshow_user_headingnever drew a heading arrow: MapLibre GL JS 6 has noshowUserHeadingoption, 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'santialiashad no effect: it reached MapLibre as a top-level option, which MapLibre has not read since 5.0.0 moved it intocanvasContextAttributes. It is now sent there, as%{"antialias" => true}, merged with anycanvasContextAttributesgiven throughoptions, whose keys win.- A
HoloMap.Maplimit set back tonil,max_bounds,min_zoom,max_zoom,min_pitchormax_pitch, stayed in force: a prop set tonilleaves 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 givennull, and the camera is as free as on a map built without it. Like setting a limit, lifting one reports no move. HoloMap.Map'srender_world_copiesandpixel_ratiowere read only when the map was built. A change now goes through MapLibre'ssetRenderWorldCopiesandsetPixelRatio, andnilreturns 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 toon_move_startoron_move_end.HoloMap.Map'sinteractive,cooperative_gesturesand the seven interaction handler props,drag_rotate,drag_pan,scroll_zoom,double_click_zoom,box_zoom,keyboardandtouch_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 forinteractive, so the runtime makes the choices its constructor makes:interactive={false}turns off every handler that option covers,touchPitchincluded, 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 notfalse. It leavescooperative_gesturesalone, as MapLibre does.- A change to a
HoloMap.Mapprop that MapLibre reads only while it builds the map, such ashash,fade_duration,antialiasorlocale, 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 ofoptionsthat 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'smax_boundsthat left the camera outside the new bounds reachedon_move_start,on_move_endandon_zoom_endas if the user had moved the map: since 6.18.0, MapLibre'ssetMaxBoundsfires the events of the move that brings the camera back, with nothing to tell them from a user's. A change tomin_zoom,max_zoom,min_pitchormax_pitchthat moved the camera did the same,on_pitch_endincluded. Like a change tocenterorzoom, 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 reachesHoloMap.Map'son_erroronce, with MapLibre's message and no camera keys, since there is no camera to read them from, or the console when there is noon_error. Camera limits MapLibre refuses when it builds the map, such as amin_zoomabovemax_zoom, are reported the same way. The map is not built again on that container, and the other maps on the page are unaffected. Anon_errorhandler that readscenteror another camera key from every payload has to allow for its absence. - A
HoloMap.APIcall 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_urlthan 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 noworker_urlasks for the default. - A render that changed both ends of a
HoloMap.Mapzoom 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, somin_zoomandmax_zoomgoing from 2 and 4 to 8 and 12, ormin_zoomraised pastmax_zoomwhilemax_zoomwas set back tonil, 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'son_click,on_drag_start,on_dragandon_drag_endstopped firing once a change to the slot content,color,scaleorclass_namereplaced the MapLibre marker. The listeners are now bound to the new marker and taken off the old one.HoloMap.Popup'son_opennever fired: MapLibre emitsopenwhile 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.MarkerandHoloMap.Popupprops were read only when the MapLibre object was built, so changing them from state did nothing. A marker'sopacity,pitch_alignment,rotation_alignment,subpixel_positioning,popup_htmlandpopup_options, and a popup'smax_width,offset,class_nameandsubpixel_positioning, now go through MapLibre's setters. Options MapLibre has no setter for replace the object: a marker'sanchorandclick_tolerance, and a popup'sanchor,close_button,close_on_click,close_on_moveandfocus_after_open. A popup replaced this way reports neitheron_closenoron_open, and a marker's popup that was open stays open when its options change. HoloMap.Marker'spopup_optionsreached MapLibre with its keys untouched, so the documentedHoloMap.Popupvocabulary (close_button,max_widthand the rest) was ignored. Those keys are now converted, with the same boolean coercionHoloMap.Popupapplies; string keys still pass through unchanged. An option set tonilis left out whatever its key, as everywhere else.- Clicking a
HoloMap.Markerthat hason_clickneither opened itspopup_htmlpopup nor closed popups withclose_on_click. The runtime stopped the DOM click so the map'son_clickwould not also fire, but MapLibre makes the map's own click from that same DOM event, and handles marker popups andclose_on_clickfrom it. The click is now marked instead of stopped: MapLibre sees it, while the map's and layers'on_clickstill 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'son_clickis dispatched once the click has finished propagating, after theon_closeof any popup it closed, so a popup whoseon_closeclears the selection no longer undoes the selection made by clicking another marker. - A source, a layer and a
HoloMap.Imagethat shared anid, 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 calledterrainorskynext toHoloMap.TerrainorHoloMap.Sky. Definitions are now told apart by kind as well asid, and MapLibre still receives theidunchanged. 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,sourceorsource_layerchanged, or re-added by a structural source change went on top of every other layer; a changedbefore_idwas ignored; and abefore_idnaming a layer declared further down, or not rendered yet, was dropped for good. Each layer is now placed where the template puts it, abefore_idchange moves the layer, and abefore_idtakes 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
stylemap was set again on every change to anyHoloMap.Mapprop, such aszoom, 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 orHoloMap.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 andHoloMap.APIcalls 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 sameid, 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.RasterDEMafter a change to the source'stiles,url,encodingor 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, whetherHoloMap.Terrainor the terrain control turned it on. Removing the source turns terrain off with a warning until the source is rendered again.HoloMap.Terraindeclared 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.APIcall made before its map had booted was dropped with a console warning. Hologram runs the actions scheduled frominitin the order of the components' cids, so the documented pattern of moving the camera from a page'sinitaction 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'son_errorreceived the camera but not the error. Its payload now also has anerrormap with themessage, plus the HTTPstatusandurlof a failed request and thesource_idof a source's error when MapLibre reports them. Only plain values cross into Elixir.HoloMap.Imageapplied whichever image load finished last: a slow response for an earlierurlreplaced 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'spopup_htmlpopup that the user had opened closed whenever a change to the slot content,color,scale,class_name,anchororclick_tolerancereplaced 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
offsetfrom aHoloMap.Markerdrawn 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_namewith a leading, trailing or repeated space kept aHoloMap.MarkerorHoloMap.Popupoff the map, and apopup_optionsone 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.Popuprewrote its content, even a change tolng_latalone, so a popup following a moving feature lost its scroll position and text selection on every move and, withfocus_after_open, took keyboard focus back. The content is now rewritten only whenhtmlor the slot content changes what the popup shows. - A layer's
on_clickwas dispatched before theon_closeof aclose_on_clickpopup 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 whoseon_closeclears the selection therefore undid the selection made by clicking another feature. A layer'son_clickis now dispatched once the click has finished, as a marker's is. - Changing a
HoloMap.Image'surlto an image of another size left the old image in place and logged an error, because MapLibre'supdateImageaccepts 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'sidoff the map and put the component's back, and abefore_idmoved 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.APIcall for a map torn down withHoloMap.Runtime.destroy/1waited 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_openandon_closefire, and the MapLibre GL JS release that introduced the globe control (5.0.0, not 6). HoloMap.Map'son_clickwas dispatched before theon_closeof aclose_on_clickpopup that the same click closed, because the map's listener is added when the map boots, before any popup. A popup whoseon_closeclears state could therefore undo what the map'son_clickhad 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
idthe 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 whoseidthe style uses also kept its event listeners, so itson_clickand other events reported the style's layer of thatid. Its listeners now come off while the style holds theid, 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-jsin 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 Hologramcid, which is also the DOM container id and the handle for everyHoloMap.APIcall.- Sources:
HoloMap.Source.GeoJSON,.Vector,.Raster,.RasterDEM,.Image. - Layers:
HoloMap.Layer.Fill,.Line,.Circle,.Symbol,.Raster,.Heatmap,.Hillshade,.FillExtrusion, plus a genericHoloMap.Layerfor a type decided at runtime. - Overlays:
HoloMap.MarkerandHoloMap.Popup, both accepting slot content. HoloMap.Image, which registers an image so a symbol layer'sicon_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 emitsstyleimagemissingand draws nothing.- Controls:
HoloMap.Control.Navigation,.Scale,.Geolocate,.Fullscreen,.Attribution,.Globeand.Terrain. - 3D:
HoloMap.TerrainandHoloMap.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
MutationObserverin 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.JSONexists becauseJasoncannot be compiled to JavaScript by Hologram, and specifications have to be encoded during client-side re-renders.HoloMap.Mapsets MapLibre's worker URL explicitly. MapLibre resolves its worker againstimport.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, notload. 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 thanisConnected, 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.Popupnow reportson_close(andon_open), a changed declaration re-asserts a popup MapLibre had closed, andaddPopupremoves any existing instance first so no path can stack two on one coordinate.HoloMap.Skycleared itself withsetSky(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