Skip to content

Comments

fix: respect geo-location settings when creating notes from templates#131

Open
sh1vam31 wants to merge 1 commit intojoplin:masterfrom
sh1vam31:fix/geo-location-settings-notes_#118
Open

fix: respect geo-location settings when creating notes from templates#131
sh1vam31 wants to merge 1 commit intojoplin:masterfrom
sh1vam31:fix/geo-location-settings-notes_#118

Conversation

@sh1vam31
Copy link

Fixes #118

Notes created using templates did not include geo-location information (latitude, longitude, altitude), even when the "Save geo-location with notes" setting was enabled in Joplin preferences.

Fix

Added a new utility src/utils/geolocation.ts that:

  1. Reads Joplin's note.saveGeolocation global setting
  2. Fetches current GPS coordinates via navigator.geolocation
  3. Returns null gracefully if the setting is disabled or permission is denied

Updated src/actions.ts to attach latitude, longitude, and altitude
to the note payload when geo-location is enabled.

Testing

  • Enabled "Save geo-location with notes" in Joplin Preferences → Note
  • Created a note from template via Tools → Templates → Create note from template
  • Verified via Joplin REST API that the note has real GPS coordinates:

After Fix :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] respect geo-location settings when creating notes using templates

1 participant