0

我正在设置trackPath.setMapth(null);清除地图上的折线覆盖,它在我在这里添加的函数的末尾执行。这里首先打印 cosole.log(参见函数),然后清除 trackPath.setMap(null)。

function play(id, value) {
  clearTimeout(timerForTrack);
  trackPath.setMap(null);
  trackPath = null; // removing this line too makes the same thing
console.log("this is coming first than clearing the track");
  // some commented code
}

我已经为这项工作工作了 4 个小时。问题是我需要在清除后添加一条新的折线。任何我出错的想法。

4

0 回答 0