aec665179f996b6998e41d3477396712ae8c296e
LocateControl (public/js/locate.js) replaces MapLibre's own GeolocateControl -- same button, reusing its exact CSS/icon so it's a visual drop-in, but sourced differently. Checks GET /api/gnss/position once on click: if a fix is available (gpsd, possibly bin/gnss_simulator.rb's simulated one), tracks that instead of the browser's separate (and often less accurate) location service, which is now only a fallback. Only the first fix recenters the map; later updates just move the marker, unlike GeolocateControl's own default of recentering on every update, which would fight a pan/zoom made in the meantime. Verified end to end with the GNSS simulator running: clicking the button centered on the simulated position and dropped a marker, clicking again cleared both, no console errors.
MapTool
Table of Contents
A mapping application written in Ruby with Sinatra.
The project’s shape is still open — this is the initial scaffold.
Status
Early scaffold. The web application serves a vector map (MapLibre GL JS), with an online style and an optional offline style backed by a local PMTiles file, an animated RainViewer radar overlay, GPX upload/display (points and tracks, organized in folders), and a live position marker from a local GNSS receiver via gpsd.
Requirements
-
Ruby (see
.ruby-version) and Bundler
Getting started
bundle install
bundle exec puma -C config/puma.rb
Then open http://127.0.0.1:4567 in a browser.
Languages
JavaScript
48.7%
Ruby
43.6%
CSS
6%
HTML
1.2%
Dockerfile
0.5%