MapTruth v2.2.3 (Android App now included)
Console-based navigation and mapping system
By Page Telegram Volunteer Services, 2026
---
Overview
MapTruth is a terminal-based navigation program written in FreeBASIC. It downloads
road and point-of-interest data from OpenStreetMap, plots an interactive ASCII map,
and provides turn-by-turn directions — all from a simple numbered menu. It works
fully offline once map data has been downloaded.
Highlights:
- Local through statewide downloads with detail levels (streets vs highways)
- Interactive ASCII map — zoom, POI browser, help overlay
- Destination matching that accepts street names in any order and abbreviation style
- POI search with relevance scoring, synonyms, and paging
- Least-turns, shortest-distance, and walking routes
---
Requirements
- Linux (amd64)
libtinfo6, libc6
curl or wget (for map downloads and geocoding)
- Internet connection (for initial map download and address geocoding only)
magick (ImageMagick 7), convert (ImageMagick 6), or gm (GraphicsMagick) — optional, for PNG map export
- About 1 GB RAM available for large (region/state) maps
---
Installation
From .deb package
bash
sudo dpkg -i maptruth2.2.3-1amd64.deb
From source
bash
fbc -lang qb maptruth.bas
optional: package
./build-deb.sh 2.2.3-1
Requires
FreeBASIC compiler.
---
Quick Start
bash
maptruth
Press 1 — enter a city, state, or address (e.g. Michigan, Bridgman MI)
Choose a detail level: Local / Metro / Region / State (highways only)
Select the correct geocoded place; for states prefer the bounding box
Press 2 / 3 — set Start and End
Press 4, 5, or 14 — calculate a route
Press 6 for the ASCII map, 7 for turn-by-turn directions
Entire states: use detail level
4 (State) so only major roads are
imported (motorway through tertiary). Full street grids for a whole state
are not practical; re-download metro areas at Local/Metro detail when you
need neighborhood streets and dense POIs.
---
Main Menu
| Option | Description |
|---|
| 1 | Download / Update Map from OpenStreetMap |
| 2 | Set START Destination |
| 3 | Set END Destination |
| 4 | Route: Least Turns |
| 5 | Route: Shortest Distance |
| 6 | Show ASCII Map |
| 7 | Turn-by-Turn Directions |
| 8 | Search Points of Interest |
| 9 | Load Map from File |
| 10 | Load Demo Sample Map |
| 11 | Trip History |
| 12 | Bookmarks |
| 13 | Settings (Metric / Imperial) |
| 14 | Route: Walking |
| 0 | Exit |
---
Downloading a Map
Place selection
When you enter a city, state, or address, MapTruth queries Nominatim and displays
up to 10 matching locations. Select the correct entry by number before the
download begins.
Multiple locations found - select one:
1. Chicago, Cook County, Illinois, United States
2. Chicago, Sangamon County, Illinois, United States
...
0. Cancel
Choice [1-10]:
Coverage detail levels
| Level | Name | Roads | POIs | Default coverage |
|---|
| 1 | Local | All streets (incl. service/livingstreet) + motorway/trunk/links | Full set | Radius 7.5 km |
| 2 | Metro | Same as Local | Full set | Radius 25 km |
| 3 | Region | Omits service / livingstreet | Full set | Radius 75 km; optional place bbox |
| 4 | State | Motorway…tertiary + link ramps only | Sparse (attractions, beach, park) | Prefers place bounding box |
State/region downloads can use the Nominatim bounding box instead of a circle so
an entire state or county fits without inventing a huge radius.
Capacity is
2,000,000 nodes / 5,000,000 edges / 250,000 POIs. If a download
hits the cap, MapTruth warns and suggests a smaller area or coarser detail level.
---
ASCII Map
MapTruth [DemoCity] S=Start E=End *=Route @=POI O=sel zoom 1.0x [I]=help
(NORTH)_
| * E |
| * O |
| * |
| S** @ @ |
|(SOUTH)_
S: Main & 1st E: 4th & 5th
----------------------------------------------------------------------------
POI 1/8: [Hospital] City Medical Center 420 m from Start
----------------------------------------------------------------------------
[I]=help [+/-]=zoom [0]=reset [<-][->]=POIs [ENTER]=back [S][E][R][P][X][T]
Symbols
| Glyph | Meaning |
|---|
S | Start (bright red) |
E | End (cyan/green) |
* | Route (bright red/pink) |
@ | Point of Interest (yellow) |
O | Selected POI (magenta) |
+ | Road intersection |
- \ | . | Road segments |
| North | Always at the top |
Chicago-area maps also show block-number grid labels (e.g.
8N,
4W) and a
State & Madison (0/0) reference note.
Map actions
| Key | Action |
|---|
I / i | Toggle full keybinding legend overlay |
← / → or , / . or H / L | Cycle on-screen POIs nearest → farthest |
+ / = | Zoom in |
- / _ | Zoom out |
0 | Reset zoom to default auto extent |
| ENTER or Q | Return to menu |
| S | Set Start destination |
| E | Set End destination |
| R | Recalculate route (last mode used) |
| P | List POIs on current route |
| X | Export map as PNG image |
| T | Export map as TXT file (optionally with turn-by-turn) |
Selected POI type, name, index (
n/total), and distance appear in a text field
under the map. Only POIs inside the
current zoomed view are listed.
POI cycle order: distance from
Start when Start is set; otherwise
distance from the
map-view centre. Right arrow advances nearest → farthest;
left reverses. The detail line shows
from Start or
from centre accordingly.
Press
I for the on-screen legend (press
I again to return to the map).
---
Routing Modes
| Option | Mode | Description |
|---|
| 4 | Least Turns | Minimises road changes (fewest segments) |
| 5 | Shortest Distance | Minimises total distance (Dijkstra by edge length) |
| 14 | Walking | Shortest path on foot; includes estimated walking time at 5 km/h |
The last-used routing mode is remembered and reused when pressing
[R] from the
ASCII map screen.
---
Destinations
Destinations can be set by:
Street address — geocoded via Nominatim (requires internet)
Road or node name — searched in loaded map data
POI name or type — e.g. hospital, coffee, grocery, beach
POI number — enter the number shown in the POI search list
When offline (or geocoding fails), MapTruth searches edge names with:
Street-type agnostic matching — Milwaukee finds North Milwaukee Avenue;
Milwaukee Ave and
Milwaukee Avenue are treated identically
Any-order token matching — Ave Milwaukee N finds North Milwaukee Avenue
Abbreviation expansion — N, S, E, W expand to full directionals;
Ave/
Blvd/
Rd/
Dr/
Ln/
Ct/
Hwy/
Pkwy expand to full type names
Scored road list — up to 10 unique road matches ranked by similarity;
up to 6 POI matches ranked by relevance; direct node number entry also accepted
MapTruth warns if a geocoded address snaps to a node far outside the
loaded map area and suggests downloading a map centred on that address.
---
Turn-by-Turn Directions
Directions merge consecutive segments on the same road, showing:
Turn instruction (Head North, Turn Left, Bear Right, etc.)
Street name and distance
Number of intersections passed
Nearby points of interest
Walking mode additionally shows estimated walking time at the end of the
directions (distance ÷ 83 m/min ≈ 5 km/h).
At the end of directions:
| Key | Action |
|---|
| T | Export to a dated .txt file |
| C | Export to a dated .csv file |
| B | Bookmark the route |
Exported files are saved to
~/MAP/ with the filename format:
YYYYMMDD-HHMMSS<start>to_<end>.txt
---
PNG Map Export
Press
[X] from the ASCII map screen to export the current map view as a PNG
image. Saved to
~/MAP/YYYYMMDD-HHMMSS_<city>.png.
Tries converters in order:
magick (ImageMagick 7),
convert (ImageMagick 6),
gm convert (GraphicsMagick). If none are found, a
.ppm file is written
instead — viewable with GIMP, feh, or eog.
bash
sudo apt install imagemagick # for PNG export
---
TXT Map Export
Press
[T] from the ASCII map screen to export the current ASCII map as a plain
text file. Saved to
~/MAP/YYYYMMDD-HHMMSS<city>map.txt.
If a route is loaded, MapTruth asks whether to include turn-by-turn directions
in the same file. Answering
Y appends the full step list, total distance, and
(for walking mode) estimated walking time beneath the map.
---
Trip History
Trip history is saved automatically after every route calculation (up to 100
trips, newest first). Press
11 from the main menu to browse.
Selecting a trip number automatically loads the associated map if it is
saved in
~/MAP/ and not already current.
[B#] bookmarks the selected trip.
[N] / [P] page through history.
---
Bookmarks
Bookmarks store Start/End address pairs. Press
12 from the main menu.
Selecting a bookmark number automatically loads the associated map if
saved in
~/MAP/ and not already current.
[A] adds a new bookmark manually.
[D#] deletes a bookmark.
---
Map Data
Maps are stored as
.dat files in
~/MAP/. The last loaded map is
remembered and reloaded automatically on next startup.
Loading a new map clears any previous Start, End, and route so stale
node references from the old map cannot cause routing errors.
| Limit | Value |
|---|
| Nodes | 2,000,000 |
| Edges | 5,000,000 |
| POIs | 250,000 |
If a download or load hits the cap, MapTruth warns and suggests a smaller area
or detail level
3 (Region) /
4 (State). Maps saved under older limits
(e.g. truncated at 500,000 nodes) should be
re-downloaded under v2.2+.
---
Points of Interest
POI types include:
amenity,
shop,
tourism,
leisure (park/garden/beach/…),
and
natural (beach). Named beaches and parks mapped as OSM
ways (not only
nodes) are imported using their map center point — e.g. Weko Beach, MI.
Search uses tiered relevance scoring (0–100%):
Exact name match → 100%
Name contains query → 90%
Exact type match → 85%
Type contains query → 80%
All query tokens found in name/type → 75%
Synonym prefix match (e.g. pharm → pharmacy) → 70%
Fuzzy match → up to 50%
Results are sorted by relevance score first, then by distance from Start.
Up to 200 results are collected; displayed 16 per page with
[N]/
[B] navigation.
Blank search lists all POIs sorted by distance from Start.
Common synonyms are recognised:
grocery,
food,
gas/
petrol/
fuel,
hospital,
pharmacy,
restaurant,
cafe/
coffee,
bar/
pub,
hotel,
bank/
ATM,
park,
school/
college/
university,
church/
worship,
museum,
shop,
parking,
toilet,
library,
post,
police,
gym,
cinema/
theatre,
tourist,
castle,
beach, and more.
From the results you can set the POI directly as Start or End. On the ASCII map,
left/right arrows cycle on-screen POIs with a live detail field.
---
Settings
| Setting | Description |
|---|
| Distance units | Toggle between Metric (km / m) and Imperial (mi / ft) |
Preferences are saved to
~/MAP/prefs.cfg and loaded on startup.
---
Files
| Path | Description |
|---|
~/MAP/.dat | Saved map data |
~/MAP/prefs.cfg | User preferences |
~/MAP/trips.dat | Trip history (newest first, max 100) |
~/MAP/bookmarks.dat | Saved bookmarks |
~/MAP/lastmap.cfg | Last loaded map path |
~/MAP/YYYYMMDD-HHMMSS.txt | Exported directions or map (text) |
~/MAP/YYYYMMDD-HHMMSS.csv | Exported directions (CSV) |
~/MAP/YYYYMMDD-HHMMSS.png | Exported map images (PNG) |
~/MAP/YYYYMMDD-HHMMSS*_map.txt | Exported ASCII map with optional directions |
---
Technical Notes
Written in FreeBASIC -lang qb mode
OSM node IDs stored as DOUBLE (exact integers up to 2^53)
Node indices use LONG (32-bit) — up to 2,000,000 nodes
Download detail levels: Local / Metro / Region / State (highway skeleton + bbox)
Road graph includes motorway, trunk, primary…tertiary, and *_link ramps
Routing: Dijkstra with bidirectional adjacency lists and an active-set frontier
(least-turns cost=1 per segment; shortest/walking use edge distance)
Walking time estimate: distance ÷ 83 m/min (≈ 5 km/h)
Overpass import uses an OSM-id hash table for O(1) node lookups when building edges
Geocoding: Nominatim API (nominatim.openstreetmap.org)
Map data: Overpass API (overpass-api.de); larger timeouts for Region/State
PNG export: tries magick, convert, gm convert in order; PPM fallback if none found
PNG map orientation: north at top, matching screen display
Offline destination search: NormalizeStreet$ + StripStreetType$ + TokenMatchScore%
POI scoring: tiered 0–100% via POIScore%; top 200; sorted score↓ distance↑
No external libraries required beyond standard libc and libtinfo
---
License
GPL-2+
Copyright 2026 Page Telegram Volunteer Services