Refine map marker offsets and remove duplicate airport sources

This commit is contained in:
2569718930@qq.com
2026-04-06 11:32:03 +08:00
parent 2e44b40b86
commit 0f5c658ba8
2 changed files with 11 additions and 35 deletions
+11 -5
View File
@@ -145,10 +145,11 @@ function getNearbyMarkerDisplayOffset(
}
const presets = [
{ x: 54, y: -26 },
{ x: -54, y: -26 },
{ x: 54, y: 24 },
{ x: -54, y: 24 },
{ x: 0, y: -58 },
{ x: 76, y: -34 },
{ x: -76, y: -34 },
{ x: 72, y: 34 },
{ x: -72, y: 34 },
];
return presets[index % presets.length];
@@ -409,7 +410,12 @@ export function useLeafletMap({
iconAnchor: [16, 19],
iconSize: [240, 38],
});
L.marker([sLat, sLon], { icon }).addTo(layer);
L.marker([sLat, sLon], {
icon,
interactive: false,
keyboard: false,
bubblingMouseEvents: false,
}).addTo(layer);
latLngs.push([sLat, sLon]);
});
@@ -311,11 +311,6 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
},
],
shanghai: [
{
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 浦东天气",
href: "https://m.nmc.cn/publish/forecast/ASH/pudong.html",
@@ -513,11 +508,6 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
},
],
chengdu: [
{
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 双流天气",
href: "https://m.nmc.cn/publish/forecast/ASC/shuangliu.html",
@@ -535,11 +525,6 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
},
],
chongqing: [
{
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 渝北天气",
href: "https://m.nmc.cn/publish/forecast/ACQ/yubei.html",
@@ -557,11 +542,6 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
},
],
shenzhen: [
{
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 深圳天气",
href: "https://m.nmc.cn/publish/forecast/AGD/shenzuo.html",
@@ -664,11 +644,6 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
},
],
beijing: [
{
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 顺义天气",
href: "https://m.nmc.cn/publish/forecast/ABJ/shunyi.html",
@@ -686,11 +661,6 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
},
],
wuhan: [
{
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 武汉天气",
href: "https://m.nmc.cn/publish/forecast/AHB/wuhan.html",