From 803b78d1e5ca2549b15bace0b8db99874b06e524 Mon Sep 17 00:00:00 2001 From: JANGHYUNn Date: Mon, 4 Sep 2023 17:59:47 +0900 Subject: [PATCH] =?UTF-8?q?mapbox=20popup=20css=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=ED=95=84=EC=9A=94=EC=97=86=EB=8A=94=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=20=EC=A3=BC=EC=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/custom.css | 4 +- src/components/map/MapControl.js | 4 +- src/components/map/mapbox/MapBoxMap.js | 60 +++++++++++++------------- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css index 5c43fa9..630b945 100644 --- a/src/assets/css/custom.css +++ b/src/assets/css/custom.css @@ -843,4 +843,6 @@ background-size: 75% auto; .layer-weather-address{display:flex;align-items:center;justify-content:space-between;} .box_4n{display:flex;flex-wrap: wrap;} -.box_4n div{width:50%;height:50vh;} \ No newline at end of file +.box_4n div{width:50%;height:50vh;} +.mapboxgl-popup-content {padding: 0 !important;border-radius:6px !important;} +.mapboxgl-popup-tip {display: none!important;} \ No newline at end of file diff --git a/src/components/map/MapControl.js b/src/components/map/MapControl.js index e550c41..993c713 100644 --- a/src/components/map/MapControl.js +++ b/src/components/map/MapControl.js @@ -5,8 +5,8 @@ import MapBoxMap from './mapbox/MapBoxMap'; export const MapControl = props => { return ( - <>{props.mapType === 'google' ? : } + // <>{props.mapType === 'google' ? : } // - // + ); }; diff --git a/src/components/map/mapbox/MapBoxMap.js b/src/components/map/mapbox/MapBoxMap.js index 07e8158..aa01ca2 100644 --- a/src/components/map/mapbox/MapBoxMap.js +++ b/src/components/map/mapbox/MapBoxMap.js @@ -314,38 +314,38 @@ export default function MapBoxMap() { type: 'raster-dem', url: 'mapbox://mapbox.mapbox-terrain-dem-v1', tileSize: 512, - maxZoom: 16 + maxZoom: 14 }); map.setTerrain({ source: 'mapbox-dem', exaggeration: 1.5 }); - map.addLayer({ - id: 'contour-labels', - type: 'symbol', - source: { - type: 'vector', - url: 'mapbox://mapbox.mapbox-terrain-v2' - }, - 'source-layer': 'contour', - layout: { - visibility: 'visible', - 'symbol-placement': 'line', - 'text-field': ['concat', ['to-string', ['get', 'ele']], 'm'] - }, - paint: { - 'icon-color': '#877b59', - 'icon-halo-width': 1, - 'text-color': '#877b59', - 'text-halo-width': 1 - } - }); - map.addLayer({ - id: 'sky', - type: 'sky', - paint: { - 'sky-type': 'atmosphere', - 'sky-atmosphere-sun': [0.0, 90.0], - 'sky-atmosphere-sun-intensity': 15 - } - }); + // map.addLayer({ + // id: 'contour-labels', + // type: 'symbol', + // source: { + // type: 'vector', + // url: 'mapbox://mapbox.mapbox-terrain-v2' + // }, + // 'source-layer': 'contour', + // layout: { + // visibility: 'visible', + // 'symbol-placement': 'line', + // 'text-field': ['concat', ['to-string', ['get', 'ele']], 'm'] + // }, + // paint: { + // 'icon-color': '#877b59', + // 'icon-halo-width': 1, + // 'text-color': '#877b59', + // 'text-halo-width': 1 + // } + // }); + // map.addLayer({ + // id: 'sky', + // type: 'sky', + // paint: { + // 'sky-type': 'atmosphere', + // 'sky-atmosphere-sun': [0.0, 90.0], + // 'sky-atmosphere-sun-intensity': 15 + // } + // }); // 지형 3d end // 등고선 start map.addLayer({