|
|
Subscribe / Log in / New account

An OpenStreetMap viewer for Emacs

[OSM in Emacs] For those who do everything in the Emacs editor: the ELPA repository has just gained an OpenStreetMap viewer. A quick test (example shown on the right) suggests that it works reasonably well; click below for the details.


From:  Sacha Chua <sacha-AT-sachachua.com>
To:  info-gnu-emacs-AT-gnu.org
Subject:  New GNU ELPA package: osm - OpenStreetMap viewer
Date:  Mon, 14 Mar 2022 23:13:56 -0400
Message-ID:  <[email protected]>
Archive-link:  Article

   Requires: emacs-27.1
    Website: https://github.com/minad/osm
 Maintainer: Daniel Mendler <[email protected]>
     Author: Daniel Mendler <[email protected]>

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
		OSM.EL - OPENSTREETMAP VIEWER FOR EMACS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


Table of Contents
─────────────────

1. Features
2. Configuration
3. Bookmarks and Org links
4. Commands and Key Bindings
5. Related projects
6. Contributions


<https://github.com/minad/osm/blob/screenshots/osm.png?raw...> (Map
tiles © <https://opentopomap.org>, <https://openstreetmap.org>)


1 Features
══════════

  • Zoomable and moveable map display
  • Display of tracks and POIs from GPX file
  • Parallel fetching of tiles with curl
  • Moving in large and small steps
  • Mouse support (dragging, clicking)
  • Map scale indicator
  • Go to coordinate
  • Search for location by name
  • Org link support
  • Bookmarked positions with pins
  • Multiple preconfigured tile servers


2 Configuration
═══════════════

  The package is available on GNU ELPA and can be installed with
  `package-install'.  The following is an example configuration which
  relies on `use-package'. Please take a look at the [wiki] for
  additional configuration.

  ┌────
  │ (use-package osm
  │   :bind (("C-c m h" . osm-home)
  │ 	 ("C-c m s" . osm-search)
  │ 	 ("C-c m v" . osm-server)
  │ 	 ("C-c m t" . osm-goto)
  │ 	 ("C-c m x" . osm-gpx-show)
  │ 	 ("C-c m j" . osm-bookmark-jump))
  │   :init
  │   ;; Load Org link support
  │   (with-eval-after-load 'org
  │     (require 'osm-ol)))
  └────


[wiki] <https://github.com/minad/osm/wiki>


3 Bookmarks and Org links
═════════════════════════

  To store a bookmark press the key `b', to store Org links press the
  key `l'. You can also use a custom binding, e.g., `C-c l'. Then the
  link can be inserted into an Org buffer with `C-c C-l'. Bookmarks and
  Org links can be created at point with the mouse, see
  `osm-bookmark-set-click' and `osm-org-link-click'.

4 Commands and Key Bindings
═══════════════════════════

  Top-level commands:
  • `osm-home': Open new map at home coordinates
  • `osm-search': Search and jump to location
  • `osm-goto': Go to coordinates
  • `osm-server': Select server
  • `osm-bookmark-jump': Jump to bookmark
  • `osm-gpx-show': Show GPX file in map viewer

  Key bindings in `osm-mode' buffer:
  • `<arrow>': Small step scrolling
  • `C-<arrow>', `M-<arrow>': Large step scrolling
  • `+', `SPC': `osm-zoom-in' - Zoom in
  • `-', `S-SPC': `osm-zoom-out' - Zoom out
  • `<mouse-1>': `osm-center-click' - Center to point
  • `<mouse-2>': `osm-org-link-click' - Store point as Org link
  • `<mouse-3>': `osm-bookmark-set-click' - Store point as bookmark
  • `<osm-bookmark mouse-*>': `osm-bookmark-delete-click' - Click on
    bookmark at point to delete
  • `<down-mouse-*>': `osm-mouse-drag' - Drag the map with the mouse
  • `d', `DEL': `osm-bookmark-delete' - Delete selected bookmark
  • `n': `osm-bookmark-rename' - Rename selected bookmark
  • `t': `osm-goto' - Go to location
  • `h': `osm-home' - Go to home location
  • `s': `osm-search' - Search for location
  • `v': `osm-server' - Select tile server
  • `x': `osm-gpx-show' - Show tracks and POIs from GPX file
  • `X': `osm-gpx-hide' - Hide overlays from GPX file
  • `l': `org-store-link' - Store org link
  • `b': `osm-bookmark-set' - Set bookmark
  • `j': `osm-bookmark-jump' - Jump to bookmark
  • `q': `quit-window' - Close buffer and window
  • `c': `clone-buffer' - Clone buffer


5 Related projects
══════════════════

  There have been other attempts at map viewers in Emacs before.

  • <https://github.com/ruediger/osm-mode>
  • <https://github.com/svenssonjoel/Emacs-OSM>
  • <https://github.com/jd/google-maps.el>
  • <https://github.com/emacsattic/org-osm-link>


6 Contributions
═══════════════

  Since this package is part of [GNU ELPA] contributions require a
  copyright assignment to the FSF.

[GNU ELPA] <http://elpa.gnu.org/packages/osm.html>


(Log in to post comments)

An OpenStreetMap viewer for Emacs

Posted Mar 15, 2022 16:09 UTC (Tue) by Polynka (subscriber, #129183) [Link]

Finally, people living in the 80s will have access to a detailed world map.

Now it’s time to extend our humanitarian assistance to people living in the 70s and create the same, but for Vim.

An OpenStreetMap viewer for Emacs

Posted Mar 15, 2022 16:34 UTC (Tue) by tnoo (subscriber, #20427) [Link]

Yeah, the 80s, when the use of computers improved productivity. Emacs still increases productivity.

An OpenStreetMap viewer for Emacs

Posted Mar 15, 2022 17:14 UTC (Tue) by ldearquer (subscriber, #137451) [Link]

I wasn't even born when GNU Emacs first came out, but can only be grateful to all those "80s" people for their great work.

Don't know if some map plugin of the sort is available for Atom, for the people who lives in the 2010s, my guess is you'd probably need to plug a full hard drive on your RAM slots to use it :P

An OpenStreetMap viewer for Emacs

Posted Mar 15, 2022 17:42 UTC (Tue) by NYKevin (subscriber, #129325) [Link]

Speaking as a Vim user, I don't use or want maps in my editor. It's an editor, not an operating system.

An OpenStreetMap viewer for Emacs

Posted Mar 15, 2022 18:29 UTC (Tue) by JoeBuck (subscriber, #2330) [Link]

Most Emacs users won't want that either, but it looks like a fun hack.

An OpenStreetMap viewer for Emacs

Posted Mar 16, 2022 5:09 UTC (Wed) by atai (subscriber, #10977) [Link]

Emacs is an operating system, but vi is just an editor

These programs should know their place!

Posted Mar 16, 2022 9:52 UTC (Wed) by sdalley (subscriber, #18550) [Link]

And Linux is just a boot loader for emacs...

An OpenStreetMap viewer for Emacs

Posted Mar 16, 2022 14:32 UTC (Wed) by epa (subscriber, #39769) [Link]

How could you not want to navigate the streets using hjkl?

Google Maps on NES

Posted Mar 16, 2022 16:47 UTC (Wed) by matthias (subscriber, #94967) [Link]

For those people in the 80s, Google Maps was already available:

https://www.youtube.com/watch?v=rznYifPHxDg

P.S.: Unfortunately, the 8-bit overlay is no longer available. Was fun while it lasted.

curious airplane icon location

Posted Mar 15, 2022 17:09 UTC (Tue) by klindsay (subscriber, #7459) [Link]

The airplane icon at Boulder Municipal Airport makes sense.
Why is there another one south of that, between a residential area and an open field?

curious airplane icon location

Posted Mar 15, 2022 17:31 UTC (Tue) by zdzichu (subscriber, #17118) [Link]

The map says "Lemons strip" and links to https://www.airnav.com/airport/CO10 .

curious airplane icon location

Posted Mar 15, 2022 17:50 UTC (Tue) by klindsay (subscriber, #7459) [Link]

Thanks zdzichu!

An OpenStreetMap viewer for Emacs

Posted Mar 16, 2022 2:39 UTC (Wed) by ianmcc (subscriber, #88379) [Link]

As they say, Emacs has everything; the only thing it lacks is a decent text editor.

An OpenStreetMap viewer for Emacs

Posted Mar 17, 2022 23:44 UTC (Thu) by neiljerram (subscriber, #12005) [Link]

I must have missed the memo about that one, as it has been working beautifully for me as a text editor, for the last 37 years. :-)

An OpenStreetMap viewer for Emacs

Posted Mar 18, 2022 17:28 UTC (Fri) by ianmcc (subscriber, #88379) [Link]

Well, the joke is at least 37 years old. Google "Emacs is a great operating system, lacking only a decent editor."

An OpenStreetMap viewer for Emacs

Posted Mar 20, 2022 2:34 UTC (Sun) by atai (subscriber, #10977) [Link]

Do you want to port Nano to Emacs?

An OpenStreetMap viewer for Emacs

Posted Mar 16, 2022 3:14 UTC (Wed) by felixfix (subscriber, #242) [Link]

But will it work on my VT-100?

An OpenStreetMap viewer for Emacs

Posted Mar 16, 2022 3:38 UTC (Wed) by sfeam (subscriber, #2841) [Link]

will it work on my VT-100?

Sorry, no. You would have to upgrade to a VT-240 (monochrome only), and if you want color you'll need a VT-330. See for example this Wesnoth map drawn in VT-340 sixel mode.

An OpenStreetMap viewer for Emacs

Posted Mar 16, 2022 4:34 UTC (Wed) by felixfix (subscriber, #242) [Link]

That's impressive. I never used either of those; don't even remember hearing of them.

An OpenStreetMap viewer for Emacs

Posted Mar 17, 2022 7:27 UTC (Thu) by fman (subscriber, #121579) [Link]

> don't even remember hearing of them.
Maybe because they (just about) predates the PC era ;-)
Introduced in 1987 and connected to your (mini) computer via a serial cable :-0

An OpenStreetMap viewer for Emacs

Posted Mar 17, 2022 17:01 UTC (Thu) by bkw1a (subscriber, #4101) [Link]

The vt-240 was color, and did Regis graphics and tektronix graphics. The first terminal that was "mine" (not shared) was a vt-240. It was connected to a vax/11 780.

The vt-220 terminal was the monochrome one.


Copyright © 2022, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds