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:
parent
2486465e44
commit
7dbcf1e82c
2 changed files with 2 additions and 4 deletions
|
|
@ -192,8 +192,7 @@ class _genericMapState extends State<genericMap> {
|
||||||
'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png';
|
'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png';
|
||||||
break;
|
break;
|
||||||
case FireMapLayer.osmcGrey:
|
case FireMapLayer.osmcGrey:
|
||||||
subdomains = ['a', 'b', 'c'];
|
baseLayer = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||||
baseLayer = 'https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png';
|
|
||||||
break;
|
break;
|
||||||
case FireMapLayer.esri:
|
case FireMapLayer.esri:
|
||||||
baseLayer =
|
baseLayer =
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,7 @@ class MonitoredAreasPage extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
new TileLayer(
|
new TileLayer(
|
||||||
urlTemplate:
|
urlTemplate:
|
||||||
"https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png",
|
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||||
subdomains: ['a', 'b', 'c'],
|
|
||||||
userAgentPackageName:
|
userAgentPackageName:
|
||||||
'com.example.fires_flutter'),
|
'com.example.fires_flutter'),
|
||||||
new PolylineLayer(
|
new PolylineLayer(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue