Mercator
OpenStreetMap but as terminal user interface (TUI) program (https://codeberg.org/mrus/mercator)
Install / Use
/learn @mrusme/MercatorREADME
Mercator

OpenStreetMap but as terminal user interface (TUI) program and Bubble Tea Bubble.
Build
$ go get
$ go build .
The binary is called mercator
Usage
mercator accepts latitude and longitude as arguments, e.g.:
$ mercator 25.0782266 -77.3383438
It also accepts a location name or address, e.g.:
$ mercator miami
Style
mercator accepts the -style flag with an integer value representing one of
the options listed as
Style,
e.g.:
$ mercator -style 4 new york
Navigation
arrow up/k: Move northarrow right/l: Move eastarrow down/j: Move southarrow left/h: Move west-/_: Zoom out+/=: Zoom in
Bubble
You can embed the mapview into your Bubble Tea application:
package main
import (
tea "github.com/charmbracelet/bubbletea"
"github.com/mrusme/mercator/mapview"
)
type model struct {
mv mapview.Model
}
func main() {
m := NewModel()
m.mv.SetLocation("jamaica", 15)
p := tea.NewProgram(m, tea.WithAltScreen())
if _, err := p.Run(); err != nil {
panic(err)
}
}
func NewModel() model {
m := model{}
m.mv = mapview.New(80, 24)
return m
}
func (m model) Init() tea.Cmd {
return tea.Batch(tea.EnterAltScreen)
}
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch mt := msg.(type) {
case tea.KeyMsg:
switch mt.String() {
case "q", "esc", "ctrl+c":
return m, tea.Quit
}
case tea.WindowSizeMsg:
m.mv.Width = mt.Width
m.mv.Height = mt.Height
return m, nil
}
var cmd tea.Cmd
m.mv, cmd = m.mv.Update(msg)
return m, cmd
}
func (m model) View() string {
return m.mv.View()
}
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
