• v0.21.0
    Some checks failed
    CI / Build and Test (push) Has been cancelled
    Stable

    ryan released this 2026-02-19 23:37:16 +00:00 | 22 commits to main since this release

    Features

    • New maplibre subpackage — Type-safe Go API for MapLibre GL JS maps within Via applications
      • maplibre.Plugin serves vendored MapLibre GL JS v4.7.1 assets and injects them into the document head
      • maplibre.New() creates a map bound to a Via context with viewport signal sync (center, zoom, bearing, pitch)
      • Pre-render accumulation for sources, layers, markers, and popups; post-render mutations via ExecScript
      • Viewport setters: FlyTo, SetCenter, SetZoom, SetBearing, SetPitch, SetStyle
      • Source management: AddSource, RemoveSource, UpdateGeoJSONSource (GeoJSON, Vector, Raster)
      • Layer management: AddLayer, RemoveLayer, SetPaintProperty, SetLayoutProperty
      • Marker and popup management: AddMarker, RemoveMarker, ShowPopup, ClosePopup
      • Exec() escape hatch for arbitrary JS with the map instance available as m
      • Idempotent init script with SPA cleanup via MutationObserver and auto-resize via ResizeObserver
      • Example app at internal/examples/maplibre/ demonstrating markers, GeoJSON layers, and FlyTo actions
    Downloads