SMS처리 도우미
제목
  [RE] [RE] 네이버지도만들기#1에서 api인증이 실패했습니다.라고 뜨고 지도가 표시가 안됩니다 도와주세요ㅠ (From. 가을하늘)

우와 진짜 감사합니다~!! 코드를 복사 붙여 넣기한 거라 틀렸을거라 생각을 못했는데... 보니까 C, I 가 둘 다 소문자로 되어 있네요..

답장도 너무 빨리 해주셔서 정말 감사합니다!! 혼자 공부하고 개발하고 있는데 에러뜨면 영어로 검색하고 혼자 해결하는 것에 지쳐있었는데

이렇게 친절하게 해결해주시는게 가뭄의 단비같네요~~ 감사합니다~!

 

[[RE] 네이버지도만들기#1에서 api인증이 실패했습니다.라고 뜨고 지도가 표시가 안됩니다 도와주세요ㅠ의 답글] ----------------------------------------------------------------

소스에서 다음 부분을 수정해 주세요

https://openapi.map.naver.com/openapi/v3/maps.js?ncpclientid=

-->

https://openapi.map.naver.com/openapi/v3/maps.js?ncpClientId=

자세히 보시면 대소문자가 틀렸습니다.

ncpClientId여야 하는데... ncpclientid로 했습니다.

코딩 시, 대소문자에 주의해야 합니다.

특이한 문제로 고생할 때가 많죠.

힘 내시고 성공하시기 바랍니다~!

 

[네이버지도만들기#1에서 api인증이 실패했습니다.라고 뜨고 지도가 표시가 안됩니다 도와주세요ㅠ의 답글] ----------------------------------------------------------------

<html>
<head>
<script
type="
text/javascript"
src="
https://openapi.map.naver.com/openapi/v3/maps.js?ncpclientid=[제아이디]&submodules=geocoder"></script>
<script
src="https://code.jquery.com/jquery-3.6.3.min.js"
integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU="
crossorigin="anonymous"></script>
 
</head>
<body>
<div style="margin-top: 20px; margin-bottom: 10px; font-weight: bold;">
약국 지도
</div>
<div id="map" style="width:100%; height:80%"></div>
 
</body>
 
<script>
$(document).ready(function () {
//지도를 삽입할 HTML 요소 또는 HTML 요소의 id를 지정합니다.
var mapDiv = document.getElementById('map'); // 'map'으로 선언해도 동일
 
//옵션 없이 지도 객체를 생성하면 서울 시청을 중심으로 하는 16 레벨의 지도가 생성됩니다.
var map = new naver
.maps
.Map(mapDiv);
 
});
</script>
</html>
 
위에는 코드, 아래는 f12를 눌렀을 ㄸㅐ 나오는 문구입니다.
 
maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15 A parser-blocking, cross site (i.e. different eTLD+1) script, https://openapi.map.naver.com/openapi/v3/maps-geocoder.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
(anonymous) @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15
forEach @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:6
_sync @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15
load @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15
e @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15
(anonymous) @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15
(anonymous) @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15
(anonymous) @ maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15
maps.js?ncpclientid=r4ri3xlxxd&submodules=geocoder:15 A parser-blocking, cross site (i.e. different eTLD+1) script, https://openapi.map.naver.com/openapi/v3/maps-geocoder.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.

----------------------------------------------------------------

----------------------------------------------------------------

트위터, 페이스북 공유 부탁드립니다~!
트위터   페이스북


  • 패스워드
X