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
This commit is contained in:
vjrj 2026-03-05 19:37:26 +01:00
parent 2486465e44
commit 7dbcf1e82c
2 changed files with 2 additions and 4 deletions

View file

@ -192,8 +192,7 @@ class _genericMapState extends State<genericMap> {
'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 =

View file

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