카카오맵 지도퍼가기 상호 명칭 바꾸는 방법 > 테크게시판

본문 바로가기
사이드메뉴 열기

테크게시판 HOME



카카오맵 지도퍼가기 상호 명칭 바꾸는 방법

페이지 정보

작성자 인바이트미 댓글 0건 조회 68회 작성일 24-03-27 11:42

본문

<!-- * 카카오맵 - 지도퍼가기 -->

<!-- 1. 지도 노드 -->

<div id="daumRoughmapContainer1711496278199" class="root_daum_roughmap root_daum_roughmap_landing" style="width:100%; margin:5% 0"></div>

<!--

2. 설치 스크립트

 지도 퍼가기 서비스를 2개 이상 넣을 경우, 설치 스크립트는 하나만 삽입합니다.

-->

<script charset="UTF-8" class="daum_roughmap_loader_script" src="https://ssl.daumcdn.net/dmaps/map_js_init/roughmapLoader.js"></script>

<!-- 3. 실행 스크립트 -->

<script charset="UTF-8">

new daum.roughmap.Lander({

"timestamp" : "1711496278199",

"key" : "2ip6y",

"mapHeight" : "300"

}).render();

</script>


위와 같이 소스를 이용했다면 0.5초 후에 해당 클래스에 이름을 덮게 하면 된다.



<script>

setTimeout(function() {

// 클래스 이름으로 요소를 선택하고 내용 변경

const element = document.querySelector('.roughmap_lebel_text');

if (element) {

element.textContent = '수서역 5-1번 출구';

} else {

console.log('원하는 요소를 찾을 수 없습니다.');

}

}, 500); // 0.5초 후에 실행

  </script>


댓글목록

등록된 댓글이 없습니다.

Total 24 / 1 page

테크게시판 목록

게시물 검색