Osm.el – OpenStreetMap Viewer for Emacs
source link: https://github.com/minad/osm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
osm.el - OpenStreetMap viewer for Emacs
The map data is © OpenStreetMap contributors, licensed under the ODbL The map rendering is © OpenTopoMap, licensed under the CC-BY-SA.
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
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)) :custom ;; Take a look at the customization group `osm' for more options. (osm-server 'default) ;; Configure the tile server (osm-copyright t) ;; Display the copyright information :init ;; Load Org link support (with-eval-after-load 'org (require 'osm-ol)))
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
.
Examples:
- Italia, 41.87° 12.46° OpenTopoMap
- London, England, 51.49° -0.14°
- København, Danmark, 55.69° 12.57° CyclOSM
- New York, United States, 40.73° -73.98° Stamen Watercolor
- Mount Everest, 27.96° 86.89° OpenTopoMap
Commands and Key Bindings
Top-level commands:
osm-home
: Open new map at home coordinatesosm-search
: Search and jump to locationosm-goto
: Go to coordinatesosm-server
: Select serverosm-bookmark-jump
: Jump to bookmarkosm-gpx-show
: Show GPX file in map viewer
Key bindings in osm-mode
buffer:
<arrow>
: Small step scrollingC-<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 moused
,DEL
:osm-bookmark-delete
- Delete selected bookmarkn
:osm-bookmark-rename
- Rename selected bookmarkt
:osm-goto
- Go to locationh
:osm-home
- Go to home locations
:osm-search
- Search for locationv
:osm-server
- Select tile serverx
:osm-gpx-show
- Show tracks and POIs from GPX fileX
:osm-gpx-hide
- Hide overlays from GPX filel
:org-store-link
- Store org linkb
:osm-bookmark-set
- Set bookmarkj
:osm-bookmark-jump
- Jump to bookmarkq
:quit-window
- Close buffer and windowc
:clone-buffer
- Clone buffer
Related projects
There have been other attempts at map viewers in Emacs before.
Contributions
Since this package is part of GNU ELPA contributions require a copyright assignment to the FSF.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK