blamouche37 downloadsAdd geographic coordinates, icon and color to your notes via geolocation or address lookup.
An Obsidian plugin that adds geographic metadata to your notes — coordinates, marker icon, and color — stored in the YAML frontmatter.
Designed to work seamlessly with map plugins like Obsidian Map View.
```geocode-map block anywhere in a note and it renders as an interactive map centered on the frontmatter coordinates, with the same marker icon and color. Add height: 320 inside the block to override the default size. Use the "Insert map block" command to drop the snippet at the cursoraddress fieldGeolocateControl, optionally inject a geolocation button of our own. Recent Bases versions already include a native control, in which case our injection is automatically skippedThe plugin writes the following fields to your note's YAML frontmatter:
---
coordinates:
- "48.85837"
- "2.294481"
icon: "landmark"
color: "red"
address: "Tour Eiffel, 5, Avenue Anatole France, Paris, France"
---
| Field | Description |
|---|---|
coordinates |
Array of two strings: latitude and longitude |
icon |
Lucide icon name for the map marker |
color |
Color name for the map marker |
address |
Human-readable address resolved from the geocoder (omitted when coordinates come from manual entry or pure geolocation) |
Option 1: Click the map pin icon in the left ribbon.
Option 2: Open the command palette (Ctrl/Cmd + P) and search for "Geocode current note".
address frontmatter field.bright or dark style depending on your Obsidian theme. Drag the marker to adjust the position; the address field is refreshed automatically via reverse geocoding.Select an icon from the visual grid. Icons are grouped into categories:
| Category | Examples |
|---|---|
| Places | Pin, Home, Building, Landmark, Church, Castle, Hotel, Hospital... |
| Nature | Tree, Pine, Forest, Mountain, Flower, Camping, Sea... |
| Transport | Car, Bus, Train, Plane, Ship, Bike, Gas station... |
| Activities | Coffee, Restaurant, Bar, Shopping, Gym, Music, Photo... |
Click one of the 10 color circles: red, blue, green, orange, purple, yellow, pink, teal, gray, or black.
Click "Save" to write the coordinates, icon, color and address to the note's frontmatter.
If the active note already contains geocoding data, opening the modal switches to update mode: the existing coordinates, icon, color and address are preloaded, the map is centered on the current position, and saving overwrites the frontmatter fields in place.
Insert a fenced code block with the geocode-map language tag anywhere in a geocoded note:
```geocode-map
```
In reading mode the block is replaced by an interactive MapLibre map centered on the note's coordinates, with the marker icon and color from the frontmatter. Notes without coordinates show a placeholder inviting you to run "Geocode current note".
You can override the default height per block:
```geocode-map
height: 320
```
The "Insert map block" command (palette Ctrl/Cmd + P) drops the snippet at the cursor.
Open Settings → Community plugins → Geocode Note to access two sections:
| Option | Values | Description |
|---|---|---|
| Prefill search field | Nothing (default), Note title, Frontmatter "address" field |
When the modal opens, the address search input is prefilled with the selected source. In update mode the existing address is preferred; this fallback is used when it is missing. |
| Option | Values | Description |
|---|---|---|
| Default map height | 120–480 pixels (default 240) |
Height used by geocode-map blocks that don't set their own height:. |
| Option | Description |
|---|---|
| Add locate button to Obsidian Maps | Safety net for older Bases versions that don't ship MapLibre's native GeolocateControl. When enabled, injects our own geolocation button into each Bases map view — clicking it centers the map on your position (device GPS, with IP-based fallback) and drops a blue location marker. If a native control is already present on the view, our injection is automatically skipped so you don't end up with two stacked buttons. Disabling the option cleanly removes our button and marker from all open maps. |
This option hooks into internals of the Bases map view that are not part of its public API and may break with future updates. If the button does not appear, try closing and reopening the base tab after toggling the option.
Scans every note in the vault that has a coordinates frontmatter field and generates a download in the chosen format. The settings panel shows how many geocoded notes are currently available.
| Format | Extension | Use case |
|---|---|---|
| GeoJSON (RFC 7946) | .geojson |
Leaflet, Mapbox, QGIS, ArcGIS, and most modern web mapping libraries |
| KML 2.2 | .kml |
Google Earth, Google My Maps |
| GPX 1.1 | .gpx |
GPS devices and outdoor apps (each note is exported as a waypoint) |
| CSV | .csv |
Excel, Numbers, Google Sheets, data analysis pipelines |
Each exported entry carries the note's title, coordinates and resolved address; GeoJSON and CSV additionally include the icon, color and vault path. Files are named geocoded-notes-YYYY-MM-DD.<ext>.
main.js, manifest.json, and styles.css from the latest release<your-vault>/.obsidian/plugins/geocode-note/If you use the BRAT plugin, add this repository (blamouche/obsidian-geocode-note) as a beta plugin to get automatic updates on every release.
# Clone the repo
git clone https://github.com/blamouche/obsidian-geocode-note.git
cd obsidian-geocode-note
# Install dependencies
npm install
# Build (one-time)
npm run build
# Development mode (watch & rebuild on changes)
npm run dev
For hot-reload during development, install the Hot Reload plugin and create an empty .hotreload file in the plugin folder.
All icons come from Lucide and are built into Obsidian.
Places: map-pin, home, building-2, landmark, church, castle, hotel, school, library, store, warehouse, factory, hospital
Nature: tree-deciduous, tree-pine, trees, mountain, mountain-snow, flower-2, leaf, tent, waves
Transport: car, bus, train-front, plane, ship, bike, fuel, anchor
Activities: coffee, utensils, beer, wine, shopping-cart, dumbbell, music, camera, star, heart, flag, globe
red, blue, green, orange, purple, yellow, pink, teal, gray, black