Skip to content

Commit cf0102f

Browse files
authored
fix cdn issue #45
1 parent 9217305 commit cf0102f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/components/common/LeafletMap.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ export default function LeafletMap({
7676
// 使用多个CDN源,优先国内可访问的CDN
7777
const iconSources = [
7878
{
79-
iconRetinaUrl: 'https://cdn.bootcdn.net/ajax/libs/leaflet/1.9.4/images/marker-icon-2x.png',
80-
iconUrl: 'https://cdn.bootcdn.net/ajax/libs/leaflet/1.9.4/images/marker-icon.png',
81-
shadowUrl: 'https://cdn.bootcdn.net/ajax/libs/leaflet/1.9.4/images/marker-shadow.png',
79+
iconRetinaUrl: 'https://s4.zstatic.net/ajax/libs/leaflet/1.9.4/images/marker-icon-2x.png',
80+
iconUrl: 'https://s4.zstatic.net/ajax/libs/leaflet/1.9.4/images/marker-icon.png',
81+
shadowUrl: 'https://s4.zstatic.net/ajax/libs/leaflet/1.9.4/images/marker-shadow.png',
8282
},
8383
{
8484
iconRetinaUrl: 'https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png',

src/pages/_document.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ export default function Document() {
2727
{/* Leaflet CSS - 优先使用国内CDN */}
2828
<link
2929
rel="stylesheet"
30-
href="https://cdn.bootcdn.net/ajax/libs/leaflet/1.9.4/leaflet.css"
31-
integrity="sha384-BBQL4gKfA4GLjCgJ8c3VJ0B7+9Z8JkJPnTxDg4g6jKwD+UzFVmgE+pGvqQ+X5Qz2"
32-
crossOrigin="anonymous"
30+
href="https://s4.zstatic.net/ajax/libs/leaflet/1.9.4/leaflet.css"
31+
integrity="sha512-Zcn6bjR/8RZbLEpLIeOwNtzREBAJnUKESxces60Mpoj+2okopSAcSUIUOseddDm0cxnGQzxIR7vJgsLZbdLE3w=="
32+
crossOrigin="anonymous"
33+
referrerPolicy="no-referrer"
3334
/>
3435
{/* 备用CDN */}
3536
<link

0 commit comments

Comments
 (0)