From 7c626efccf2ea8096d93fb8138fdcd5fed2e4859 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 15 Nov 2026 01:06:34 +0000 Subject: [PATCH] Set OSM tile User-Agent Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 6 ++++++ src/PostIt/PostIt/Views/Commands/AddressEditorPage.axaml.cs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c13a856..f25201cc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ # Changelog +## [1.0.8-rc38] - unstable + +### Fixed + +* [PostIt] Set a custom OpenStreetMap User-Agent for the address editor map tiles to satisfy the OSM tile usage policy. + ## [1.0.8-rc37] - unstable ### Added diff --git a/src/PostIt/PostIt/Views/Commands/AddressEditorPage.axaml.cs b/src/PostIt/PostIt/Views/Commands/AddressEditorPage.axaml.cs index 133d19e8f..9e4403d73 100644 --- a/src/PostIt/PostIt/Views/Commands/AddressEditorPage.axaml.cs +++ b/src/PostIt/PostIt/Views/Commands/AddressEditorPage.axaml.cs @@ -22,6 +22,7 @@ public partial class AddressEditorPage : ContentPage private const double DefaultLongitude = 2.3522; private const int DefaultZoomLevel = 4; private const int SelectedZoomLevel = 13; + private const string OpenStreetMapUserAgent = "PostIt/1.1 (+https://github.com/pazof/yavsc)"; private MapControl? _locationMap; private MemoryLayer? _selectionLayer; @@ -45,7 +46,7 @@ public partial class AddressEditorPage : ContentPage return; var map = new Map(); - map.Layers.Add(OpenStreetMap.CreateTileLayer()); + map.Layers.Add(OpenStreetMap.CreateTileLayer(OpenStreetMapUserAgent)); _selectionLayer = CreateSelectionLayer(); map.Layers.Add(_selectionLayer); _locationMap.Map = map;