Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin-Rexter committed Jan 6, 2025
1 parent 44d5d14 commit b46932f
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/components/Main/traffic/map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 金鑰
Expand Down Expand Up @@ -606,19 +606,21 @@ const LocationAggregatorMap = ({ off, useExistToken }) => {
touchAction='unset'
>
{/* 以MapBox地圖為基底 */}
<Map
className=""
controller={true}
mapboxAccessToken={mapbox_api_key}
mapStyle={mapbox_style}
onRender={(event) => event.target.resize()}
>
<Marker
longitude={location ? location.longitude : initialViewState.longitude}
latitude={location ? location.latitude : initialViewState.latitude}
color="red"
/>
</Map>
{
mapbox_api_key && (<Map
className=""
controller={true}
mapboxAccessToken={mapbox_api_key}
mapStyle={mapbox_style}
onRender={(event) => event.target.resize()}
>
<Marker
longitude={location ? location.longitude : initialViewState.longitude}
latitude={location ? location.latitude : initialViewState.latitude}
color="red"
/>
</Map>)
}
</DeckGL>
{/* 搜尋輸入框 */}
<div className='fixed right-2 mt-2 flex flex-col md:flex-row flex-wrap md:flex-nowrap flex-auto justify-end items-end md:items-center w-auto sm:max-w-lg md:max-w-md lg:max-w-md'>
Expand Down

0 comments on commit b46932f

Please sign in to comment.