okchangwon / vue-daum-map

Vue Daum Map Component
ISC License
30 stars 9 forks source link

Marker를 표시 하고 싶습니다. #3

Closed hanjool closed 4 years ago

hanjool commented 5 years ago

방법을 모르겠네요 ..

답변에 미리 감사 드립니다.

ijy5154 commented 5 years ago

해당 내용으로 확인중에 해결하여 이와같은 문제 있으신 분들이 있을거 같아 링크 남깁니다.

https://devtalk.kakao.com/t/vue-js/53927/2

okchangwon commented 4 years ago

답변이 너무 늦어서 죄송합니다. 컴포넌트로 부터 map 객체를 전달받고(참고) 마커 생성 가이드대로 작업하시면 될 것 같습니다.

GauthierPLM commented 4 years ago

@okchangwon could you give a short code example of how we are supposed to add a marker to the map?

I succeeded to access Kakao' API but I have the error Vue warn]: Error in callback for watcher "map": "TypeError: this.P is not a function" with the following code:

  data: () => ({
    map: null
  }),
  methods: {
    mapLoaded(map) {
      this.map = map;

      window.kakao.maps.Marker({
        map: this.map,
        position: window.kakao.maps.LatLng(37.486979, 127.104046)
      });
    }
  }

I am not really fluent in Korean (but have to work with Kakao Map) so I might have missed something.