Skip to main content

One post tagged with "widgets"

View All Tags

Interactive Maps with MapView

· 6 min read
Andrea Mancuso
Software Engineer, creator of XFrames

Data-heavy desktop applications often need maps — GPS tracking dashboards, IoT fleet monitors, logistics tools, geospatial analysis. In web apps, you'd reach for Leaflet or Mapbox GL. But XFrames doesn't run in a browser DOM, so those libraries aren't an option.

MapView solves this by rendering OpenStreetMap raster tiles directly through ImGui's draw list. Each visible 256x256 tile is fetched, decoded, uploaded to the GPU, and drawn with ImDrawList::AddImage(). The same React component works on desktop (OpenGL) and in the browser (WebGPU), with smooth panning, scroll-wheel zoom, and overlay support for markers, polylines, and accuracy circles.