Set OSM tile User-Agent

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-11-15 01:06:34 +00:00
commit 7c626efccf
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
2 changed files with 8 additions and 1 deletions

View file

@ -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;