From 7dbcf1e82c9fbc9c2f871dce76c7ed0f67d327d7 Mon Sep 17 00:00:00 2001 From: vjrj Date: Thu, 5 Mar 2026 19:37:26 +0100 Subject: [PATCH] Fix: Replace tiles.wmflabs.org with tile.openstreetmap.org for reliable tile loading tiles.wmflabs.org was causing DNS resolution failures on the device/emulator (No address associated with hostname, errno = 7). Replaced with the official OpenStreetMap tile server (tile.openstreetmap.org) which is more stable and reliable. Removed subdomains configuration as it's not needed for the official OSM server. - Updated FireMapLayer.osmcGrey in genericMap.dart - Updated TileLayer in monitoredAreas.dart - Fixes: Map tiles not loading due to network/DNS issues --- lib/genericMap.dart | 3 +-- lib/monitoredAreas.dart | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/genericMap.dart b/lib/genericMap.dart index 1810691..39b3545 100644 --- a/lib/genericMap.dart +++ b/lib/genericMap.dart @@ -192,8 +192,7 @@ class _genericMapState extends State { 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'; break; case FireMapLayer.osmcGrey: - subdomains = ['a', 'b', 'c']; - baseLayer = 'https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png'; + baseLayer = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'; break; case FireMapLayer.esri: baseLayer = diff --git a/lib/monitoredAreas.dart b/lib/monitoredAreas.dart index 334101d..8a74261 100644 --- a/lib/monitoredAreas.dart +++ b/lib/monitoredAreas.dart @@ -80,8 +80,7 @@ class MonitoredAreasPage extends StatelessWidget { children: [ new TileLayer( urlTemplate: - "https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png", - subdomains: ['a', 'b', 'c'], + "https://tile.openstreetmap.org/{z}/{x}/{y}.png", userAgentPackageName: 'com.example.fires_flutter'), new PolylineLayer(