안녕하세요.
-
map api를 사용하다가 몇 몇 api의 인자가 latitude랑 longitude의 위치가 바뀌어서 혼란스러운데요… 이렇게 만드신 의도가 궁금합니다. e.g. const center = new kakao.maps.LatLng(latitude, longitude); 인데 반해, new Geocoder().coord2Address(longitude, latitude, (result, status) => { ~~~ });
이런 식으로 위 api는 위도, 경도 순이 아닌, 경도, 위도 순으로 받아오는데 이렇게 설계하신 이유가 있으신가요? -
const center = new kakao.maps.LatLng(latitude, longitude); 를 console.log(center)로 찍어보면
{La: 126.711157, Ma: 37.612675} 이런 식으로 나오는데요, 저는 여기서 LA가 latitude인지 알았는데, 또 console로 console.log(center.getLat()); 위도 값인 37.612675가 출력됩니다. 여기서 LA: 126.711157 (경도값이 위도 프로퍼티로 잘못 들어간 줄 알았는데, getLat()하면 정상적으로 위도가 출력됩니다)
La랑 Ma가 뭐의 약자인가요?