MyLoc

pending

by mkobu

Insert GPS location, address, and weather into notes.

2 starsUpdated 1mo agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

MyLoc

Insert your current location into Obsidian notes. GPS coordinates, addresses, weather, and more.

Features

  • One-tap location insertion via ribbon icon or command palette
  • Reverse geocoding via OpenStreetMap Nominatim — get human-readable addresses
  • Weather integration via Open-Meteo — current temperature and conditions
  • Frontmatter support — compatible with Map View plugin for plotting notes on a map
  • Saved places — define places (home, work, gym) with GPS radius; nearby matches use the place name as address
  • Multiple output formats — full, compact, coordinates only, or custom template
  • Timezone support — auto-detects system timezone or manual selection
  • Works on mobile — designed primarily for Android with GPS
  • Desktop fallback — uses IP-based geolocation when GPS unavailable

Installation

Manual Installation

  1. Download main.js and manifest.json from the latest release
  2. Create folder <vault>/.obsidian/plugins/myloc/
  3. Copy the files into the folder
  4. Enable the plugin in Settings → Community Plugins

Usage

Commands

  • Insert location — inserts formatted location at cursor (also available via ribbon icon)
  • Insert location as frontmatter — adds location to note's YAML frontmatter
  • Update note location — updates existing frontmatter location
  • Save current location as place — saves your current GPS position as a named place

Output Formats

Full (default):

123 Main Street, City, Country
52.229700, 21.012200
[Open in Map](https://openstreetmap.org/...)

Compact:

123 Main Street, City, Country (52.229700, 21.012200)

Coordinates only:

52.229700, 21.012200

Custom template — use placeholders:

  • {lat}, {lon}, {coords} — coordinates
  • {address}, {place}, {city}, {country} — address parts
  • {mapUrl}, {mapLink} — map links
  • {date}, {time}, {datetime} — timestamp
  • {weather}, {temp} — weather info

Saved Places

Define named places with GPS coordinates and a detection radius. When any command detects you're near a saved place, a picker appears letting you choose the place or use the raw detected location.

  • Place name is used as the address in both inline output and frontmatter (skips reverse geocoding)
  • Each place has its own template using the same placeholder system as custom templates
  • Add places via the "Save current location as place" command (captures GPS automatically) or manually in settings
  • {place} placeholder resolves to the place name when a saved place is active, empty string otherwise

Frontmatter

Writes location in Map View-compatible format:

---
location: [52.229700, 21.012200]
address: "123 Main Street, City, Country"
datetime: 2026-02-06T14:30:00
weather: "12°C, Partly cloudy"
---

Settings

SettingDescription
FormatOutput format (full/compact/coords/custom)
Custom templatesTemplates with placeholders
Saved placesNamed locations with radius detection and per-place templates
Include timestampAdd date/time to output
Include weatherAdd weather from Open-Meteo
Temperature unitCelsius or Fahrenheit
TimezoneAuto-detect or manual selection
Map providerOpenStreetMap or Google Maps
Address languageLanguage code for addresses (en, pl, de, etc.)
Frontmatter fieldsChoose what to include in frontmatter

Development

Setup

git clone https://github.com/mrcnkobu/myloc.git
cd myloc
npm install

Configuration

Copy the environment template and set your test vault path:

cp .env.example .env

Edit .env:

OBSIDIAN_PLUGIN_PATH=/path/to/your/vault/.obsidian/plugins/myloc/
OBSIDIAN_TEST_PLUGIN_PATH=/path/to/test/vault/.obsidian/plugins/myloc/  # optional

Commands

CommandDescription
npm run devDevelopment build with sourcemaps
npm run buildProduction build (minified)
npm run deployBuild and copy to vault(s)

Testing

  1. Run npm run deploy
  2. Open Obsidian and enable the plugin in Settings → Community Plugins
  3. Reload the plugin after changes: Ctrl+P → "Reload app without saving"

For mobile testing via Syncthing or similar, npm run deploy copies actual files (symlinks don't sync).

Project Structure

myloc/
├── main.ts           # Plugin source
├── manifest.json     # Plugin metadata
├── package.json      # Dependencies & scripts
├── esbuild.config.mjs # Build configuration
├── .env.example      # Environment template
└── .env              # Local config (gitignored)

Privacy

  • Location data is only sent to OpenStreetMap (for addresses) and Open-Meteo (for weather)
  • No data is stored externally — everything stays in your vault
  • IP-based geolocation (desktop fallback) uses ip-api.com

Credits

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.