Skip to content

Display photo location if available#148

Open
shaiay wants to merge 5 commits intomarijnkampf:masterfrom
shaiay:feature/display-photo-location
Open

Display photo location if available#148
shaiay wants to merge 5 commits intomarijnkampf:masterfrom
shaiay:feature/display-photo-location

Conversation

@shaiay
Copy link

@shaiay shaiay commented Sep 20, 2025

Display photo location if available in EXIF data
use OpenStreetMap for reverse geocoding

google-labs-jules bot and others added 5 commits September 13, 2025 15:00
This commit introduces a new feature to the screensaver that allows the user to display the geographical location of a photo.

The key changes include:
- A new utility method in `Utils.cs` to perform reverse geocoding using the Nominatim OpenStreetMap API. This method converts GPS coordinates (latitude and longitude) from the photo's EXIF data into a human-readable location name. It includes parsing for the DMS format.
- The `Monitor.cs` file is updated to call this new utility. When a photo with GPS data is displayed, its location is fetched and passed to the frontend.
- A new checkbox is added to the configuration screen (`config.html`) allowing users to enable or disable this feature for each monitor.
- The screensaver display (`monitor.html` and `monitor.js`) is updated to include a new element that shows the location information when it's available and the setting is enabled.
This commit addresses a bug that caused a "Input string was not in a correct format" error when parsing GPS coordinates from EXIF data. The `ConvertDmsToDd` method in `Utils.cs` has been updated to use regular expressions, making the parsing more robust against various formats.

This commit also includes the initial implementation of the feature to display the geographical location of a photo:
- A new utility method in `Utils.cs` performs reverse geocoding using the Nominatim OpenStreetMap API.
- `Monitor.cs` is updated to call this utility and pass the location to the frontend.
- A new checkbox in `config.html` allows users to enable or disable this feature.
- The screensaver display (`monitor.html` and `monitor.js`) is updated to show the location information.
fixed reference to batch file
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.

1 participant