Idea: Auto-centering maps, based on location data in a note #83
Moonbase59
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
So basically, finding an initial lat/long from a note instead of specifying it in the code block. I like it, easy enough to implement. I think it would be a new parameter tag in the code block - I'll think of a tag. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I came across a new use case today: Auto-centering maps, ideal if one is on the road a lot.
Some friends and I myself sometimes travel a lot. Now that we are getting Obsidian mobile, or work on a GPS-enabled laptop like myself, it is relatively easy to write a script that automatically updates a note’s YAML with the current (real-world) location. Or just manually enter my current location in my own "Myself" note.
Since Obsidian Leaflet is so amazing getting location and overlay data from notes and auto-updating the maps, I find myself using a two-map note most of the time: One of the maps shows the whole country, the other one the place I currently stay, with a radius of approx. 10–25 km.
To make things even more comfortable, it would be just great to have this second "where-I-am" map
location:
), and maybe evennearby:
YAML of my "Myself" note.This would mean getting the
lat:
andlong:
code block entries from another note’slocation:
YAML data, by somehow specifying the note, i.e.[[Matthias C. Hormann]]
or"People/Friends & Family/Matthias C. Hormann"
.Regarding the radius (or zoom factor), it would also mean reading the specified
overlayTag
(if any) from that note’s YAML, and possibly translating that to a zoom factor (?), defaulting to thedefaultZoom
in the code block.I already experimented with using inline Dataview (like
=[[Matthias C. Hormann]].location[0]
) and Templater but that of course doesn’t work easily in a code block.I have no idea if this appeals to you, or you’d like to think about it, since it is more of a "comfort function", but I think it might be a great addition. Let us know!
Beta Was this translation helpful? Give feedback.
All reactions