ceaaa0bb92f25875d4394de426afe0b7066a97b5
ONLINE_STYLE_PATCH mirrors OFFLINE_THEME's color choices onto OpenFreeMap Liberty's OpenMapTiles layer ids (a separate hand-built table -- the two schemas share no layer names). loadOnlineStyle fetches Liberty's style.json once, patches it in place, and the result replaces the plain URL everywhere ONLINE_STYLE is used -- MapLibre accepts a style object anywhere it accepts a style URL, so applyStyle needed no change. Runs before the map (and the rest of the page) is constructed, so there's no flash of Liberty's own colors first -- but with a 3s timeout and a catch-all fallback to the plain URL, since this app is meant to keep working offline in the field and blocking startup on a remote style server would undermine that. Verified in a real browser: online map now visually matches the offline theme (cream ground, brown/khaki land cover, green parks, muted roads), no console errors, Online/Offline toggle still works.
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%