{"id":15431249,"url":"https://github.com/mrusme/mercator","last_synced_at":"2025-09-09T05:40:43.573Z","repository":{"id":65287246,"uuid":"589117296","full_name":"mrusme/mercator","owner":"mrusme","description":"OpenStreetMap but as terminal user interface (TUI) program","archived":false,"fork":false,"pushed_at":"2024-03-30T18:24:59.000Z","size":11573,"stargazers_count":79,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T11:53:54.917Z","etag":null,"topics":["bubble","bubbletea","cli","command-line","command-line-tool","map","maps","openstreetmap","osm","terminal","terminal-app","terminal-based","tui"],"latest_commit_sha":null,"homepage":"https://xn--gckvb8fzb.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrusme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"custom":["https://github.com/mrusme#support"]}},"created_at":"2023-01-15T05:21:57.000Z","updated_at":"2025-04-05T10:35:45.000Z","dependencies_parsed_at":"2023-10-15T01:30:24.219Z","dependency_job_id":"37e6e89a-3a76-4b02-ba3a-512048070cd1","html_url":"https://github.com/mrusme/mercator","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.10526315789473684","last_synced_commit":"2f06a0adbadc42abf6fc2402af1c8df5dd03babd"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mrusme/mercator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrusme%2Fmercator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrusme%2Fmercator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrusme%2Fmercator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrusme%2Fmercator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrusme","download_url":"https://codeload.github.com/mrusme/mercator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrusme%2Fmercator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274250186,"owners_count":25249394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bubble","bubbletea","cli","command-line","command-line-tool","map","maps","openstreetmap","osm","terminal","terminal-app","terminal-based","tui"],"created_at":"2024-10-01T18:21:18.946Z","updated_at":"2025-09-09T05:40:43.547Z","avatar_url":"https://github.com/mrusme.png","language":"Go","readme":"Mercator\n--------\n\n![mercator](mercator.gif)\n\nOpenStreetMap but as terminal user interface (TUI) program and [Bubble \nTea](https://github.com/charmbracelet/bubbletea) Bubble.\n\n## Build\n\n```sh\n$ go get\n$ go build .\n```\n\nThe binary is called `mercator`\n\n\n## Usage\n\n`mercator` accepts latitude and longitude as arguments, e.g.:\n\n```sh\n$ mercator 25.0782266 -77.3383438\n```\n\nIt also accepts a location name or address, e.g.:\n\n```sh\n$ mercator miami\n```\n\n### Style\n\n`mercator` accepts the `-style` flag with an integer value representing one of \nthe options [listed as \n`Style`](https://github.com/mrusme/mercator/blob/master/mapview/mapview.go#L24), \ne.g.:\n\n```sh\n$ mercator -style 4 new york\n```\n\n\n### Navigation\n\n- `arrow up`/`k`: Move north\n- `arrow right`/`l`: Move east\n- `arrow down`/`j`: Move south\n- `arrow left`/`h`: Move west\n- `-`/`_`: Zoom out\n- `+`/`=`: Zoom in\n\n\n## Bubble\n\nYou can embed the `mapview` into your Bubble Tea application:\n\n```go\npackage main\n\nimport (\n  tea \"github.com/charmbracelet/bubbletea\"\n  \"github.com/mrusme/mercator/mapview\"\n)\n\ntype model struct {\n  mv mapview.Model\n}\n\nfunc main() {\n  m := NewModel()\n  m.mv.SetLocation(\"jamaica\", 15)\n\n  p := tea.NewProgram(m, tea.WithAltScreen())\n  if _, err := p.Run(); err != nil {\n    panic(err)\n  }\n}\n\nfunc NewModel() model {\n  m := model{}\n  m.mv = mapview.New(80, 24)\n  return m\n}\n\nfunc (m model) Init() tea.Cmd {\n  return tea.Batch(tea.EnterAltScreen)\n}\n\nfunc (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {\n  switch mt := msg.(type) {\n  case tea.KeyMsg:\n    switch mt.String() {\n    case \"q\", \"esc\", \"ctrl+c\":\n      return m, tea.Quit\n    }\n\n  case tea.WindowSizeMsg:\n    m.mv.Width = mt.Width\n    m.mv.Height = mt.Height\n    return m, nil\n\n  }\n\n  var cmd tea.Cmd\n  m.mv, cmd = m.mv.Update(msg)\n  return m, cmd\n}\n\nfunc (m model) View() string {\n  return m.mv.View()\n}\n```\n","funding_links":["https://github.com/mrusme#support"],"categories":["\u003ca name=\"graphics\"\u003e\u003c/a\u003eGraphics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrusme%2Fmercator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrusme%2Fmercator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrusme%2Fmercator/lists"}