GPS Location on Desktop and Mobile Apps (iOS/Android)

Use case or problem

Many other major notes apps allow the user to include the GPS location (pulled from the desktop or mobile OS) as metadata (and furthermore, in a template) when a note is created or modified. This functionality has been around for years in other notes apps. Location is a very useful way to view and sort notes, as when travelling and going around, notes are often created in relation to where one physically is when taking them. Some community plugins (like Obsidian Map View allow you to view a map of locations from notes in your vault and even visually view how links are geographically related. However, there is no native option or even a way to access the location APIs of the operating systems in Obsidian desktop or mobile. Scripts can be used to get location via IP geolocation via web services, but true location services access is not possible either on desktop (HTML5 navigator.geolocation.getCurrentPosition is not even accessible from JavaScript) as this is not exposed in Obsidan desktop nor are location services exposed on mobile which means no access to the native location API on Apple iOS or Android. IP geolocation also doesn’t work when the network is not available (e.g., while taking notes when offline or in an area with no network service) and because the location provided by such services comes from an IP geolocation database, it is often wrong by hundreds or thousands of miles if it is available.

From my research and the notes included in the linked community plugin it seems that this is not presently possible in a community plugin either because the Obsidian app on desktop and mobile does not request permission for the OS location APIs See further discussion about these limitations of the official Obsidian app here: GPS Location Support

Proposed solution

Please include as a core plugin or built-in functionality access to location APIs or provide functionality where Templates can just use something like {{location}}, exactly as it presently does with {{date}}. This is not particularly difficult to implement… I have written several apps that use location on both iOS and Android and it’s trivial to access this information that is virtually ubiquitous in modern apps both on desktop and on mobile.

Current workaround (optional)

There are no current workarounds that exist entirely within the Obsidian app. The only way to include a location in Obsidian is to get your location via another app or a handheld GPS or other location source (a helper app in the aforementioned Map View community plugin) or service and copy/paste it into Obsidian. This is clunky and a time waster, to say the least, and many notes never get a location as I would desire since this process must be done manually as described above.

Related feature requests (optional)