OsmAnd link helper (generic, pin links)

Convert address/coords in focused fields into osmand.net/map pin links (split pill + hotkey). No site-specific code.

作者
Jasper Aorangi
日安装量
0
总安装量
0
评分
0 0 0
版本
1.5.3
创建于
2025-08-22
更新于
2025-08-22
大小
18.2 KB
许可证
GPL-3.0-or-later
适用于

OsmAnd Link Helper (userscript)

Convert an address or coordinates in any focused text field into an OsmAnd pin link.
Works with plain <input>/<textarea> and rich editors (contenteditable).
Includes a floating split pill (left/right actions) and a configurable hotkey.

  • Split pill: left half can insert just the link, right half can insert “address + link” (both configurable).
  • Hotkey: default Alt + O (customizable).
  • Geocoding: OpenStreetMap Nominatim (no API key).
  • Coordinates passthrough: lat, lon in the field converts directly to an OsmAnd link.
  • Clipboard safety: optionally copies the previous field value before writing.

Tested with Violentmonkey on Firefox. Should also work with Tampermonkey/Greasemonkey.

Usage

  1. Focus any editable field (Location, Notes, etc.).
  2. Click the pill near the field:
    • Left half → uses appendModeLeft (e.g. just the link)
    • Right half → uses appendModeRight (e.g. address + link)
  3. Or press the hotkey (default Alt + O); this uses the single appendMode.

If the field already contains coordinates like 39.7392, -104.9903, the script skips geocoding and creates the OsmAnd link immediately.
If it contains an address, it runs a Nominatim search and shows a small picker (Cancel closes cleanly).


Link formats

  • map (pin)