From e565cce907521ef64eb4ee479da56e2e22b6becc Mon Sep 17 00:00:00 2001 From: hym Date: Wed, 1 Apr 2026 20:48:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=20mapbox.accessToken=20?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 4 +++- src/views/dataSearch.vue | 7 +++---- src/views/home.vue | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.js b/src/main.js index f0a23ef..8540a07 100644 --- a/src/main.js +++ b/src/main.js @@ -48,4 +48,6 @@ if (Vue.config.firstRender) { .then(async (xmlContent) => { Vue.config.boundsInfoList = await extractWMTSBoundsInfo(xmlContent); }); -} \ No newline at end of file +} + +window.mapboxgl.accessToken = 'pk.eyJ1IjoicWRod2kiLCJhIjoiY2xiaXppcjEyMGNhMjNwbzVrcHl4d20zOSJ9.0ETMJM3-zllFh2GRrRVUZg' \ No newline at end of file diff --git a/src/views/dataSearch.vue b/src/views/dataSearch.vue index df7a13d..0419f6a 100644 --- a/src/views/dataSearch.vue +++ b/src/views/dataSearch.vue @@ -692,7 +692,6 @@ export default { // 初始化 mapbox initMapbox() { - window.mapboxgl.accessToken = 'pk.eyJ1IjoicWRod2kiLCJhIjoiY2xiaXppcjEyMGNhMjNwbzVrcHl4d20zOSJ9.0ETMJM3-zllFh2GRrRVUZg' const map = new window.mapboxgl.Map({ container: 'cesiumContainerData', // style: 'mapbox://styles/mapbox/standard', @@ -774,7 +773,7 @@ export default { map.on('load', () => { // 加载海岸线 - loadVectorLayer("GSHHS_f_L1", ["line"], ["#5c71c3"], "visible", "dataSearch", 'ougp'); + // loadVectorLayer("GSHHS_f_L1", ["line"], ["#5c71c3"], "visible", "dataSearch", 'ougp'); // 加载等深线 // loadVectorLayer("contour-4500m", ["line"], ["#FEFEFE"], "visible", "dataSearch", 'ougp'); // loadVectorLayer("contour-6000m", ["line"], ["#FEFEFE"], "visible", "dataSearch", 'ougp'); @@ -930,8 +929,8 @@ export default { if (job_type == "测线作业") { // lon = Number(sample.start_lon); // lat = Number(sample.start_lat); - lon=(Number(sample.start_lon) + Number(sample.end_lon))/2; - lat=(Number(sample.start_lat) + Number(sample.end_lat))/2; + lon = (Number(sample.start_lon) + Number(sample.end_lon)) / 2; + lat = (Number(sample.start_lat) + Number(sample.end_lat)) / 2; } if (job_type == "站位作业") { lon = Number(sample.sampling_lon); diff --git a/src/views/home.vue b/src/views/home.vue index 0242ccb..1337da2 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -352,7 +352,6 @@ export default { // 初始化 mapbox initMapbox() { - window.mapboxgl.accessToken = 'pk.eyJ1IjoicWRod2kiLCJhIjoiY2xiaXppcjEyMGNhMjNwbzVrcHl4d20zOSJ9.0ETMJM3-zllFh2GRrRVUZg' const map = new window.mapboxgl.Map({ container: 'cesiumContainer', // style: 'mapbox://styles/mapbox/standard',