Vue calls Baidu Map api, to report an error Cannot read property 'Yb'.

use vue to call Baidu Map demo to report an error TypeError: Cannot read property "Yb" of undefined

clipboard.png
the code is as follows

      this.map = new window.BMap.Map("containerMap")
      let point = new window.BMap.Point(116.404, 39.915)
      this.map.centerAndZoom(point, 15)
The

code is almost done according to the demo of Baidu map document, and it is very amazing that the same code can display the map on other pages, but it is wrong to call in the page to be displayed, have you ever encountered it? Thank you!


it is recommended that you use this library, which encapsulates Baidu maps. https://dafrok.github.io/vue-.

Menu