북인천ic입구사거리 로 검색 시 오류 증상

북인천ic 로 주소 검색 시 주소가 나오지 않고 주유소 한개만 검색이 되며

북인천ic입구사거리 로 주소 검색 시 없다고 나옵니다.

북인천ic 로 장소 검색 후 북인천ic입구사거리 클릭 시 로컬에서 베이스로 선택되었던 곳(GPS가 켜져 있으면 현재 위치)으로 기입이 됩니다.

확인 부탁드립니다.

주소 검색은 도로명 주소, 지번 주소를 입력해주셔야 합니다.
북인천ic 키워드로 검색하려면 키워드 검색을 사용해주세요.

키워드 검색으로 북인천ic, 북인천ic입구사거리로 키워드를 검색하면
아래와 같은 검색 결과를 응답 받을 수 있습니다.

북인천ic

{
  "documents": [
    {
      "address_name": "인천 서구 경서동 712",
      "category_group_code": "",
      "category_group_name": "",
      "category_name": "교통,수송 > 도로시설 > IC > 고속도로IC",
      "distance": "",
      "id": "7912835",
      "phone": "",
      "place_name": "북인천IC",
      "place_url": "http://place.map.kakao.com/7912835",
      "road_address_name": "",
      "x": "126.61131184854",
      "y": "37.5540535409461"
    },
    {
      "address_name": "인천 서구 경서동",
      "category_group_code": "",
      "category_group_name": "",
      "category_name": "교통,수송 > 도로시설 > 교차로",
      "distance": "",
      "id": "15135329",
      "phone": "",
      "place_name": "북인천IC입구사거리",
      "place_url": "http://place.map.kakao.com/15135329",
      "road_address_name": "인천 서구 경서로 27",
      "x": "126.637497977813",
      "y": "37.5581120211072"
    },
    {
      "address_name": "인천 서구 경서동 350-64",
      "category_group_code": "OL7",
      "category_group_name": "주유소,충전소",
      "category_name": "교통,수송 > 자동차 > 주유,가스 > 주유소 > S-oil주유소",
      "distance": "",
      "id": "12460421",
      "phone": "032-568-0151",
      "place_name": "진현에너지주유소",
      "place_url": "http://place.map.kakao.com/12460421",
      "road_address_name": "인천 서구 중봉대로 799",
      "x": "126.649718137524",
      "y": "37.5510022283065"
    }
  ],
  "meta": {
    "is_end": true,
    "pageable_count": 3,
    "same_name": {
      "keyword": "북인천ic",
      "region": [],
      "selected_region": ""
    },
    "total_count": 3
  }
}

북인천ic입구사거리

{
  "documents": [
    {
      "address_name": "인천 서구 경서동",
      "category_group_code": "",
      "category_group_name": "",
      "category_name": "교통,수송 > 도로시설 > 교차로",
      "distance": "",
      "id": "15135329",
      "phone": "",
      "place_name": "북인천IC입구사거리",
      "place_url": "http://place.map.kakao.com/15135329",
      "road_address_name": "인천 서구 경서로 27",
      "x": "126.637497977813",
      "y": "37.5581120211072"
    }
  ],
  "meta": {
    "is_end": true,
    "pageable_count": 1,
    "same_name": {
      "keyword": "북인천ic입구사거리",
      "region": [],
      "selected_region": ""
    },
    "total_count": 1
  }
}

키워드 검색으로 진행 하면 북인천ic 선택 시 위치 선택이 안되고 베이스로 선택한곳 혹은 GPS에서 현재위치를 불러 옵니다.

추가적으로 위치 핀을 직접 사거리로 지정 하면 위치 선택이 되질 않습니다.

결과 값은 정상적으로 위치를 지정하는 것 같은데 값을 가져와서 출력 하면 다른 값을 보여줍니다.

아래 코드를 참고해서 확인해보면
북인천ic 키워드 검색 결과로 받은 정보로 지도에 마커를 표시해줍니다.
표시된 마커를 클릭 시 해당 위치 좌표가 정상적으로 출력되는것을 확인할 수 있습니다.

먼저 키워드 검색으로 받아온 위치를 선택했음에도 다른 위치를 불러온다면 구현 코드를 확인해주세요.
그래도 안된다면 현상을 확인할 수 있는 코드와 콘솔 오류가 출력됐다면 오류 내용도 첨부해주세요.

var mapContainer = document.getElementById('map'), // 지도를 표시할 div
mapOption = {
    center: new kakao.maps.LatLng(37.554904925179166, 126.63066208419178), // 지도의 중심좌표
    level: 6 // 지도의 확대 레벨
};

var map = new kakao.maps.Map(mapContainer, mapOption); // 지도를 생성합니다

$.ajax({
    url: 'http://dapi.kakao.com/v2/local/search/keyword.json?query='+encodeURIComponent('북인천ic'),
    type: 'GET',
    headers: {'Authorization': 'KakaoAK REST_API_KEY'}, // 발급된 REST API를 넣어주세요.
    success : function(data){
        if(data.meta.total_count > 0) {
            data.documents.forEach(address => {
                const {x, y, place_name} = address;

                var marker = new kakao.maps.Marker({
                    position: new kakao.maps.LatLng(y, x),
                    title: place_name,
                    map
                });

                // 마커에 표시할 인포윈도우를 생성합니다
                var infowindow = new kakao.maps.InfoWindow({
                    content: '<div>'+place_name+'</div>' // 인포윈도우에 표시할 내용
                });

                // 마커에 mouseover 이벤트와 mouseout 이벤트를 등록합니다
                // 이벤트 리스너로는 클로저를 만들어 등록합니다
                // for문에서 클로저를 만들어 주지 않으면 마지막 마커에만 이벤트가 등록됩니다
                kakao.maps.event.addListener(marker, 'mouseover', makeOverListener(map, marker, infowindow));
                kakao.maps.event.addListener(marker, 'mouseout', makeOutListener(infowindow));

                //클릭 이벤트를 등록합니다.
                //마커의 타이틀과 위치를 출력합니다.
                kakao.maps.event.addListener(marker, 'click', function () {
                    console.log('click: ', marker.getTitle(), marker.getPosition());
                })
            })
        }
    }
})

// 인포윈도우를 표시하는 클로저를 만드는 함수입니다
function makeOverListener(map, marker, infowindow) {
    return function() {
        infowindow.open(map, marker);
    };
}

// 인포윈도우를 닫는 클로저를 만드는 함수입니다 
function makeOutListener(infowindow) {
    return function() {
        infowindow.close();
    };
}