https://wiki.openstreetmap.org/wiki/Blocked_tiles
Some checks failed
Dotnet build and test / build (pull_request) Has been cancelled
Forgejo Release / release (push) Successful in 10m3s

This commit is contained in:
Paul Schneider 2026-09-25 22:47:20 +01:00
commit 1d12166611
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12

View file

@ -15,6 +15,9 @@ using PostIt.Services;
using PostIt.ViewModels.Commands; using PostIt.ViewModels.Commands;
namespace PostIt.Views.Commands; namespace PostIt.Views.Commands;
using Mapsui.Tiling; // Ensure you have this namespace
public partial class RdvPage : ContentPage public partial class RdvPage : ContentPage
{ {
@ -44,6 +47,16 @@ public partial class RdvPage : ContentPage
_reverseGeocodingService = reverseGeocodingService ?? new NominatimReverseGeocodingService(); _reverseGeocodingService = reverseGeocodingService ?? new NominatimReverseGeocodingService();
InitializeComponent(); InitializeComponent();
InitializeMap(); InitializeMap();
// ... inside your Map setup logic ...
string version = GetType().Assembly.GetName().Version?.ToString() ?? "1.1";
// 1. Create a unique user-agent string for your app (e.g., "AppName/Version (ContactEmail)")
string myCustomUserAgent = $"PostIt/{version} (paul@pschneider.fr)";
// 2. Pass your custom user agent into the OpenStreetMap helper
var osmLayer = OpenStreetMap.CreateTileLayer(myCustomUserAgent);
// 3. add your newly identified layer
_locationMap.Map.Layers.Add(osmLayer);
} }
private void InitializeComponent() private void InitializeComponent()