From 1943755488af8722bc73a52a9416e651b53e849f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E6=BE=B3?= Date: Tue, 31 Mar 2026 15:06:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=95=E5=9B=BE=E9=A2=9C?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/App.vue | 5 ++--- frontend/vite.config.js | 5 +++-- tiles/mapproxy/mapproxy.yaml | 16 ++++++++-------- tiles/mapproxy/seed.yaml | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/App.vue b/frontend/App.vue index 3df7a7d..6b8767e 100644 --- a/frontend/App.vue +++ b/frontend/App.vue @@ -268,9 +268,8 @@ function initMap() { attributionControl: false }) - L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', { - maxZoom: 18, - subdomains: 'abcd' + L.tileLayer('/tiles/tiles/1.0.0/carto_light/EPSG3857/{z}/{x}/{y}.png', { + maxZoom: 18 }).addTo(map) L.control.attribution({ prefix: false, position: 'bottomright' }) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 4d086e3..ac40221 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -31,8 +31,9 @@ export default defineConfig({ port: 5173, proxy: { '/tiles': { - target: 'http://localhost:8080', - changeOrigin: true + target: 'http://192.168.190.41:8080', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/tiles/, '') } } }, diff --git a/tiles/mapproxy/mapproxy.yaml b/tiles/mapproxy/mapproxy.yaml index a8951f5..1189546 100644 --- a/tiles/mapproxy/mapproxy.yaml +++ b/tiles/mapproxy/mapproxy.yaml @@ -5,22 +5,22 @@ services: restful: true layers: - - name: stamen_watercolor - title: Stamen Watercolor (Cached) - sources: [stamen_watercolor_cache] + - name: carto_light + title: CartoDB Positron (Cached) + sources: [carto_light_cache] caches: - stamen_watercolor_cache: + carto_light_cache: grids: [GLOBAL_WEBMERCATOR] - sources: [stamen_watercolor_source] + sources: [carto_light_source] cache: type: file - directory: /srv/mapproxy/cache_data/stamen_watercolor + directory: /srv/mapproxy/cache_data/carto_light sources: - stamen_watercolor_source: + carto_light_source: type: tile - url: https://tiles.stadiamaps.com/tiles/stamen_watercolor/%(z)s/%(x)s/%(y)s.jpg + url: https://a.basemaps.cartocdn.com/light_all/%(z)s/%(x)s/%(y)s.png grid: GLOBAL_WEBMERCATOR grids: diff --git a/tiles/mapproxy/seed.yaml b/tiles/mapproxy/seed.yaml index 29ad3a7..d0e7f25 100644 --- a/tiles/mapproxy/seed.yaml +++ b/tiles/mapproxy/seed.yaml @@ -1,6 +1,6 @@ seeds: - stamen_watercolor_seed: - caches: [stamen_watercolor_cache] + carto_light_seed: + caches: [carto_light_cache] grids: [GLOBAL_WEBMERCATOR] coverages: [china_coverage] levels: