Skip to content

Commit 8e59ce8

Browse files
committed
hotfix: 모바일에서 지도 옮겼을때 이전 info계속 남아있는 버그
1 parent 59b58fa commit 8e59ce8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/utils/handleMapMarkers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { OTHER_MARKER_IMAGE } from '@/utils/constant';
55
import { detectDevice } from '@/utils/detectDevice';
66

77
const device = detectDevice();
8+
let openedInfoWindow: any = null;
89

910
export const openInfoWindow = (map: any, marker: any) => {
1011
const infowindow = new window.kakao.maps.InfoWindow({
@@ -19,8 +20,6 @@ export const addZoomControler = (map: any) => {
1920
};
2021

2122
export const makeMarkers = (map: any, places: PlaceType[]): MarkerType[] => {
22-
let openedInfoWindow: any = null;
23-
2423
const markers = places
2524
.map(({ title, mapy, mapx, firstimage, contentid }) => ({
2625
hoverBox: mapInfoWindowGenerator(title, firstimage || '/images/no-image.png'),

0 commit comments

Comments
 (0)