From 24e1079bb333cfe6218d15ec3dc125589404fc69 Mon Sep 17 00:00:00 2001 From: BG7JAF Date: Mon, 2 Dec 2024 18:53:28 +0800 Subject: [PATCH] Change Chinese user's map source to AutoNavi's public service --- res/map/onlinemap.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/res/map/onlinemap.html b/res/map/onlinemap.html index 0b69e5af..5d98edd3 100644 --- a/res/map/onlinemap.html +++ b/res/map/onlinemap.html @@ -134,13 +134,21 @@ mapUrl = 'https://tile.openstreetmap.de/{z}/{x}/{y}.png'; } else if (language === 'fr') { mapUrl = 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'; + } else if (language === 'zh') { + mapUrl = 'https://webrd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}'; // 高德地图 } else { mapUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; } - L.tileLayer(mapUrl, { - attribution: 'Map data © OpenStreetMap' - }).addTo(map); + if (language === 'zh') { + L.tileLayer(mapUrl, { + attribution: '地图数据 © 高德地图' + }).addTo(map); + } else { + L.tileLayer(mapUrl, { + attribution: 'Map data © OpenStreetMap' + }).addTo(map); + } var maidenheadConfWorked = L.maidenheadConfWorked({color : 'rgba(255, 0, 0, 0.5)'}).addTo(map); var grayline = L.terminator({fillOpacity: 0.2})