게시판에 카카오맵을 넣어보았습니다. 압축을 풀면 kakao_map_pc, kakao_map_mobile 두개의 폴더가 나옵니다. 그누보드 순정기준으로 kakao_map_pc은 s...
게시판에 카카오 맵 넣기
게시판에 카카오맵을 넣어보았습니다.
압축을 풀면 kakao_map_pc, kakao_map_mobile 두개의 폴더가 나옵니다.
그누보드 순정기준으로
kakao_map_pc은 skin/board/kakao_map_pc 경로로 업로드합니다.
kakao_map_mobile은 mobile/skin/board/kakao_map_mobile 경로로 업로드합니다.
카카오맵에서 HTML 태그 복사 -> 소스생성하기 -> 소스를 복사합니다.
아래소스는 SIR 카카오맵 주소입니다.
<!-- * 카카오맵 - 지도퍼가기 -->
<!-- 1. 지도 노드 -->
<div id="daumRoughmapContainer1669401992147" class="root_daum_roughmap root_daum_roughmap_landing"></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" : "1669401992147",
"key" : "2cqyv",
"mapWidth" : "640",
"mapHeight" : "360"
}).render();
</script>
위의 소스에서 빨간색 숫자부분을 여분 필드 wr_1을 사용해서 받아옵니다.
보라색 키값을 여분필드 wr_2를 사용해서 받아옵니다.
지도의 크기는 mapWidth, mapHeight 값으로 정하시면 됩니다.
write.skin.php(pc)
[code]<!-- kakao map start -->
<div class="bo_w_info write_div">
<label for="wr_1" class="sound_only">카카오맵타임스탬프<strong>필수</strong></label>
<input type="text" name="wr_1" value="<?php echo $write['wr_1'] ?>" id="wr_1" required class="frm_input half_input required" placeholder="카카오맵타임스탬프:예--1669399050974">
<label for="wr_2" class="sound_only">카카오키값<strong>필수</strong></label>
<input style="margin-left: 8px" type="text" name="wr_2" value="<?php echo $write['wr_2'] ?>" id="wr_2" required class="frm_input half_input required" placeholder="카카오맵키값:예--2cqyu">
</div>
<!-- kakao map end -->[/code]
write.skin.php(mobile)
[code]<!-- kakao map start -->
<div class="bo_w_tit write_div">
<label for="wr_1" class="sound_only">카카오맵타임스탬프<strong>필수</strong></label>
<input type="text" name="wr_1" value="<?php echo $write['wr_1'] ?>" id="wr_1" required class="frm_input full_input required" placeholder="카카오맵타임스탬프:예--1669399050974">
</div>
<div class="bo_w_tit write_div">
<label for="wr_2" class="sound_only">카카오키값<strong>필수</strong></label>
<input type="text" name="wr_2" value="<?php echo $write['wr_2'] ?>" id="wr_2" required class="frm_input full_input required" placeholder="카카오맵키값:예--2cqyu">
</div>
<!-- kakao map end --> [/code]
view.skin.php(pc)
[code]
<!-- kakao mat start -->
<style>
#tablek { border-spacing: 0; width: 100%; }
#tablek, .thk, .tdk{ border: 1px solid #ddd;border-collapse: collapse;}
.thk { background-color: #f2f2f2; text-align: center; padding: 16px; }
.tdk { text-align: left; padding: 16px;}
</style>
<table id="tablek">
<tr>
<th class="thk">찾아오는길</th>
<td colspan="3" class="tdk"><!-- * 카카오맵 - 지도퍼가기 -->
<!-- 1. 지도 노드 -->
<div id="daumRoughmapContainer<?php echo $view['wr_1'];?>" class="root_daum_roughmap root_daum_roughmap_landing"></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" : "<?php echo $view['wr_1']; // 지도 타임스탬프값 ?>",
"key" : "<?php echo $view['wr_2']; // 지도 키값 ?>",
"mapWidth" : "640",
"mapHeight" : "360"
}).render();
</script></td>
</tr>
</table>
<!-- kakao map end -->
[/code]
view.skin.php(mobile)
[code]
<!-- kakao map start -->
<style>
#tablek { border-spacing: 0; width: 100%; }
.thk, .tdk{ border: 1px solid #ddd;border-collapse: collapse;}
.thk { background-color: #f2f2f2; text-align: center; padding: 6px; font-size:15px;}
.tdk { padding:1px;}
</style>
<table id="tablek">
<tr> <th class="thk">찾아오는길</th> </tr>
<tr> <td class="tdk"><!-- * 카카오맵 - 지도퍼가기 -->
<!-- 1. 지도 노드 -->
<div id="daumRoughmapContainer<?php echo $view['wr_1'];?>" class="root_daum_roughmap root_daum_roughmap_landing"></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" : "<?php echo $view['wr_1'];?>",
"key" : "<?php echo $view['wr_2'];?>",
"mapWidth" : "270",
"mapHeight" : "200"
}).render();
</script>
</td>
</tr>
</table>
<!-- kakao man end -->
[/code]
감사합니다.
버전 정보
첨부파일
그누보드5 스킨
2,751건좋은 댓글과 좋아요는 제작자에게 큰힘이 됩니다.
사용방법 [code] <div class="latest_wr"> <!-- 사진 최신글2 { --> <?php // 이 함수가 바로 최신글을 추출하는 역할을 합...
게시판을 활용하여 디데이(D-day) 정보를 보여주는 최신글 스킨입니다. 디데이는 금일부터 설정한 향후 일자까지 몇 일이 남았는지를 보여주는 정보인데요. 내일을 설정했다면 디데이는...
본 스킨은 Ckeditor5 CDN을 사용하며, 기본적인 플러그인만 추가되어 있습니다. 플러그인을 추가하려면 온라인빌더를 이용하거나 직접 빌드후에 사용하시면 됩니다. - 온라인...
사진을 클릭하면 조회수를 올리면서 링크한 페이지로 이동한다 https://sir.kr/qa/479673 ...
1 리스트에 게시물 6개 외쪽에 배치 오른쪽큰사진 에는 최근 게시물의 1번째 이미지 2 마우스 오버시 오른쪽 큰사진이 게시물의 1번째 이미지로 바뀜 3 오른쪽 큰사진을 클릭시 그 ...
상품페이지에서 네이버페이를 사용하고 싶은 분들을 위해 수정한 소스를 남겨봅니다^^ 이미 아시는 분들도 많겠지만 모르시는 분들을 위해 남깁니다. 고수분들은 패스 해 주세요^^ ...
# 2022-11-23 16:40 수정 내용 "Fullcalendar 설정 > 일정보기 "자신이 등록한 자료만 보기" 선택시 적용 안되는 오류. - 수정파일 : setting.ph...
댓글 6개