구글 맵에서 기존에 있던 장소 마커를 지우고 싶을 경우
//커스텀 맵 스타일 선언
const mapStyle = [
{
featureType: 'poi', //(물가, 교량..등 장소)
elementType: 'labels.icon',
stylers: [{ visibility: 'off' }],
},
...
return(
<Map
...
styles={mapStyle}
/>
)
위에 처럼 해주면 된다
참고
https://developers.google.com/maps/documentation/javascript/examples/maptype-styled-simple
Styled Map Types | Maps JavaScript API | Google Developers
This example creates a new map type, which the user can select from the map type control. The map type includes custom styles. TypeScript function initMap(): void { // Create a new StyledMapType object, passing it an array of styles, // and the name to be
developers.google.com
https://developers.google.com/maps/documentation/javascript/style-reference
Style Reference for Maps JavaScript API | Google Developers
Select platform: Android iOS JavaScript With style options you can customize the presentation of the standard Google map styles, changing the visual display of features like roads, parks, businesses, and other points of interest. As well as changing the st
developers.google.com
'REACT' 카테고리의 다른 글
[React.js] 흑백 이미지 막대 슬라이드 변환 (0) | 2022.08.02 |
---|---|
lodash의 throttle과 debounce (0) | 2022.04.08 |
[React.js] html2canvas cors 에러 (0) | 2022.03.24 |
Error#2 RTK-updateQueryData 삭제 안됨 (0) | 2022.03.24 |
Error#1 transform 속성과 position fixed (0) | 2022.03.24 |