문서 보기역링크PDF로 내보내기맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. L.icon 으로 아이콘을 생성한다. ```javascript var oldCameraIcon = L.icon({ iconUrl: '/img/camera-0.png', iconSize: [30, 30], // size of the icon iconAnchor: [15, 15], // point of the icon which will correspond to marker's location popupAnchor: [0, -10] // point from which the popup should open relative to the iconAnchor }); var newCameraIcon = L.icon({ iconUrl: '/img/camera-1.png', iconSize: [30, 30], // size of the icon iconAnchor: [15, 15], // point of the icon which will correspond to marker's location popupAnchor: [0, -10] // point from which the popup should open relative to the iconAnchor }); ``` 베이스가 되는 코드를 만들고, 아이콘의 경로만 변경한다. ```javascript var baseIcon = L.icon({ iconSize: [30, 30], // size of the icon iconAnchor: [15, 15], // point of the icon which will correspond to marker's location popupAnchor: [0, -10] // point from which the popup should open relative to the iconAnchor }); var oldCameraIcon = baseIcon.options.iconUrl = '/img/camera-0.png'; ``` open/leaflet-marker.txt 마지막으로 수정됨: 2020/06/02 09:25저자 127.0.0.1