From b46932ffb37dd0449cbc04bae4f47b8a96b08a31 Mon Sep 17 00:00:00 2001 From: Lin-Rexter Date: Mon, 6 Jan 2025 14:02:24 +0800 Subject: [PATCH] Debug --- src/components/Main/traffic/map.jsx | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/components/Main/traffic/map.jsx b/src/components/Main/traffic/map.jsx index 7b8c6c9..61793a2 100644 --- a/src/components/Main/traffic/map.jsx +++ b/src/components/Main/traffic/map.jsx @@ -67,7 +67,7 @@ const LocationAggregatorMap = ({ off, useExistToken }) => { if (ENVConfig) { // 取得MapBox金鑰 - var mapbox_api_key = ENVConfig.mapbox.token; + var mapbox_api_key = ENVConfig.mapbox.token var mapbox_style = ENVConfig.mapbox.style; // 取得 Polstar北宸科技地圖服務 API 金鑰 @@ -606,19 +606,21 @@ const LocationAggregatorMap = ({ off, useExistToken }) => { touchAction='unset' > {/* 以MapBox地圖為基底 */} - event.target.resize()} - > - - + { + mapbox_api_key && ( event.target.resize()} + > + + ) + } {/* 搜尋輸入框 */}