Files
maptool/views/importmap.erb
T
randy f73badd107
CI / check (push) Successful in 23s
CI / deploy (push) Successful in 17s
Drive as the Design canvas' Grid: the page as 16 × 10 cells from a screen profile (public/drive/road.json, {area, widget, …} per cell, to be edited in the app later), the map 13 × 8 with nothing over it; the manoeuvre, speed, limit, altitude, time, sun, status (online, rec), next stop with km / ETA to it and to the end, the route's elevation of the next 10 km, a compass; keys Trip, Points, Layers, Search, Menu, − + 3D Follow, Terrain, day/dusk/night. A menu opens in the right 7 × 8 as cells of its own and the map narrows to 9 × 8 (drive_menus.js): Trip and Search as GridTrip / GridSearch (a stop a row, ✓ ↑ ↓ ✕ a cell each; results with their pins on the map); Points as GridPoints (the library nearest the car — /api/search with no words and a center lists every saved feature nearest first — along the route ahead, shown, or one folder at a time; an eye per row, + a point as a stop); Layers as GridLayers (the On the map panel's own switches and Online | Offline, presets Road / Off-road / Overnight, + Keep); Terrain as GridTerrain (roll / pitch dials with the max held, climb and side slope ahead from the DEM, the next 2 km, Level here = can.json's levelling action in two taps), on by itself on an unpaved surface (/api/road now gives Valhalla's surface) or past 10° for 10 s, back after 2 km of paved road, automatic / by hand in the Menu. The dashboard polls for the grid without its overlay; the old drive bar and floating buttons gone
2026-12-03 10:47:40 +01:00

55 lines
3.5 KiB
ERB

<%# Every app module and every vendored module they import is versioned
(ASSET_VERSION, a fresh value per deploy): map.js and the rest import
each other — and /vendor modules — by plain path, and an import map
remaps those paths to a versioned URL, so a deploy busts all of them
without touching any import statement. A vendored module that changes
with the app (mdi.mjs gaining an icon) can't be left cached while the
module importing it is fresh. Static files are also revalidated
(static_cache_control in app.rb) as a backstop for anything loaded
some other way. Must come before the module script below: the
importmap has to be parsed first. %>
<script type="importmap">
{
"imports": {
"/js/auth.js": "/js/auth.js?v=<%= ASSET_VERSION %>",
"/js/contour.js": "/js/contour.js?v=<%= ASSET_VERSION %>",
"/js/dem.js": "/js/dem.js?v=<%= ASSET_VERSION %>",
"/js/gnss.js": "/js/gnss.js?v=<%= ASSET_VERSION %>",
"/js/gpx.js": "/js/gpx.js?v=<%= ASSET_VERSION %>",
"/js/hiking_trails.js": "/js/hiking_trails.js?v=<%= ASSET_VERSION %>",
"/js/live.js": "/js/live.js?v=<%= ASSET_VERSION %>",
"/js/dashboard.js": "/js/dashboard.js?v=<%= ASSET_VERSION %>",
"/js/driving.js": "/js/driving.js?v=<%= ASSET_VERSION %>",
"/js/drive_menus.js": "/js/drive_menus.js?v=<%= ASSET_VERSION %>",
"/js/update.js": "/js/update.js?v=<%= ASSET_VERSION %>",
"/js/icons.js": "/js/icons.js?v=<%= ASSET_VERSION %>",
"/js/livetrack.js": "/js/livetrack.js?v=<%= ASSET_VERSION %>",
"/js/locate.js": "/js/locate.js?v=<%= ASSET_VERSION %>",
"/js/map_themes.js": "/js/map_themes.js?v=<%= ASSET_VERSION %>",
"/js/measure.js": "/js/measure.js?v=<%= ASSET_VERSION %>",
"/js/notes.js": "/js/notes.js?v=<%= ASSET_VERSION %>",
"/js/nps.js": "/js/nps.js?v=<%= ASSET_VERSION %>",
"/js/debug.js": "/js/debug.js?v=<%= ASSET_VERSION %>",
"/js/offline_data.js": "/js/offline_data.js?v=<%= ASSET_VERSION %>",
"/js/overlays.js": "/js/overlays.js?v=<%= ASSET_VERSION %>",
"/js/panels.js": "/js/panels.js?v=<%= ASSET_VERSION %>",
"/js/plugins.js": "/js/plugins.js?v=<%= ASSET_VERSION %>",
"/js/preview.js": "/js/preview.js?v=<%= ASSET_VERSION %>",
"/js/radar.js": "/js/radar.js?v=<%= ASSET_VERSION %>",
"/js/route.js": "/js/route.js?v=<%= ASSET_VERSION %>",
"/js/share_import.js": "/js/share_import.js?v=<%= ASSET_VERSION %>",
"/js/search.js": "/js/search.js?v=<%= ASSET_VERSION %>",
"/js/shadow.js": "/js/shadow.js?v=<%= ASSET_VERSION %>",
"/js/sun.js": "/js/sun.js?v=<%= ASSET_VERSION %>",
"/js/track_profile.js": "/js/track_profile.js?v=<%= ASSET_VERSION %>",
"/vendor/maplibre-gl/maplibre-gl.mjs": "/vendor/maplibre-gl/maplibre-gl.mjs?v=<%= ASSET_VERSION %>",
"/vendor/maplibre-gl-lanes/maplibre-gl-lanes.mjs": "/vendor/maplibre-gl-lanes/maplibre-gl-lanes.mjs?v=<%= ASSET_VERSION %>",
"/vendor/mdi/mdi.mjs": "/vendor/mdi/mdi.mjs?v=<%= ASSET_VERSION %>",
"/vendor/nps-symbols/nps-symbols.mjs": "/vendor/nps-symbols/nps-symbols.mjs?v=<%= ASSET_VERSION %>",
"/vendor/npmap-home-button/home-button.esm.js": "/vendor/npmap-home-button/home-button.esm.js?v=<%= ASSET_VERSION %>",
"/vendor/npmap-overview/overview.esm.js": "/vendor/npmap-overview/overview.esm.js?v=<%= ASSET_VERSION %>",
"/vendor/suncalc/suncalc.js": "/vendor/suncalc/suncalc.js?v=<%= ASSET_VERSION %>"
}
}
</script>