Display photo location if available#148
Open
shaiay wants to merge 5 commits intomarijnkampf:masterfrom
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Display photo location if available in EXIF data
use OpenStreetMap for reverse geocoding