구글 맵에서 기존에 있던 장소 마커를 지우고 싶을 경우
//커스텀 맵 스타일 선언
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' 카테고리의 다른 글
JSX에서 줄바꿈이 안되는 이유와 해결법 (0) | 2022.08.04 |
---|---|
이미지 비교 슬라이더 구현 (Before / After) (0) | 2022.08.02 |
html2canvas와 CORS 문제 정리 (0) | 2022.03.24 |
RTK updateQueryData로 삭제 시 주의할 점 (0) | 2022.03.24 |
transform과 position: fixed 관계 설명 (0) | 2022.03.24 |