SoulLyoko / vue-tianditu

天地图vue组件库
MIT License
88 stars 23 forks source link

vue2中使用车辆轨迹 value 为 undefined #64

Closed trdmm closed 1 year ago

trdmm commented 2 years ago

vue-tianditu Version: 2.7.6

const carTrack = ref();

打了个日志, carTrack有个属性value,但是值是undefined, 不知道怎么使用新版本的*车辆轨迹功能.

SoulLyoko commented 1 year ago

不好意思,文档没有写清楚,车辆轨迹是额外的开源库,需要初始化时导入,只是用车辆轨迹的话只要在plugins里传["CarTrack"]就可以了

app.use(VueTianditu, {
  v: "4.0", //目前只支持4.0版本
  tk: "your map token",
  plugins: ["D3", "CarTrack", "HeatmapOverlay", "BufferTool", "ImageOverLayer"]
});