rastapasta /mapscii

🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows

★ 9,281⑂ 298👁 109⑃ 84● 82▤ 8
JavaScriptMITCreated 2016-09-18
下载:Upstream fix for escape key handlingUpstream-0.3.1 ↓0.3.12020-02-18
+1
日增长
9,281
stars
298
forks
109
watchers
84
prs
82
issues
8
releases

README

MapSCII - The Whole World In Your Console. 

A node.js based Vector Tile to Braille and ASCII renderer for xterm-compatible terminals.

!asciicast

 Try it out!

sh
$ telnet mapscii.me


If you're on Windows, use the open source telnet client PuTTY to connect.

 Features

 Use your mouse to drag and zoom in and out!
 Discover Point-of-Interests around any given location
 Highly customizable layer styling with Mapbox Styles support
 Connect to any public or private vector tile server
 Or just use the supplied and optimized OSM2VectorTiles based one
 Work offline and discover local VectorTile/MBTiles
 Compatible with most Linux and OSX terminals
 Highly optimized algorithms for a smooth experience
 100% pure JavaScript! :sunglasses:

 How to run it locally

With a modern node installation available, just start it with


npx mapscii


 How to install it locally

 With npm

If you haven't already got Node.js = version 10, then go get it.


npm install -g mapscii


If you're on OSX, or get an error about file permissions, you may need to do sudo npm install -g mapscii

 With snap

In any of the supported Linux distros:

    sudo snap install mapscii
    
(This snap is maintained by @nathanhaines)

 Running

This is pretty simple too.


mapscii


 Keyboard shortcuts

 Arrows up, down, left, right to scroll around
 Press a or z to zoom in and out
 Press c to switch to block character mode
 Press q to quit

 Mouse control

If your terminal supports mouse events you can drag the map and use your scroll wheel to zoom in and out.

 Behind the scenes
 Libraries
 Mastering the console
   x256 for converting RGB values to closest xterm-256 color code
   term-mouse for mouse handling
   keypress for input handling
   string-width to determine visual string lengths

 Discovering the map data
 vector-tile for VectorTile parsing
 pbf for Protobuf decoding
 mbtiles for MBTiles parsing

 Juggling the vectors and numbers
 earcut for polygon triangulation
 rbush for 2D spatial indexing of geo and label data
 bresenham for line point calculations
 simplify-js for polyline simplifications

 Handling the flow
 node-fetch for HTTP requests
 env-paths to determine where to persist downloaded tiles

 TODOs
 MapSCII
   [ ] GeoJSON support via geojson-vt
   [ ] CLI support
     [-] startup parameters
       [X] TileSource
       [X] Style
       [X] center position
       [X] zoom
       [ ] demo mode?

   [ ] mouse control
     [ ] hover POIs/labels
     [ ] hover maybe even polygons/-lines?

 Styler
   [ ] respect zoom based style ranges

 Renderer
   [ ] download and process tiles in a different thread (3)
   [ ] optimize renderer for large areas (6)
   [ ] label drawing
     [ ] multi line label?

 TileSource
   [ ] implement single vector-tile handling

 Special thanks

 lukasmartinelli & manuelroth for all their work on OSM2VectorTiles (global vector tiles from OSM Planet)
 mourner for all his work on mindblowing GIS algorithms (like the used earcut, rbush, simplify-js,

Top issues

Latest release

Upstream fix for escape key handling v0.3.1 2020-02-18
Kudos to @dogabudak for fixing the upstream term-mouse to let MapSCII correctly handle escape key presses

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON