我正在研究Ionic应用程序并使用谷歌提供的离子谷歌 Map 原生和方向服务我通过使用以下代码绘制了多条路线:

calculateAndDisplayRoute() {
var points = [];
this.directionsService.route({
  origin: this.start,
  destination: this.end,
  travelMode: 'DRIVING',
  provideRouteAlternatives: true


}, (response, status) => {
  if (status === 'OK') {
    var step = 1;

    for(var j=0;j<response.routes.length;j++){

      points=[]
      for (var i = 0; i < response.routes[j].overview_path.length; i++) {
        points.push(response.routes[j].overview_path[i].toJSON())
      }
      let position=points[20]
      this.drawRoutePolyLine(points,j,position)
      step=step+1
    }


  } else {
    window.alert('Directions request failed due to ' + status);
  }
});

帮助我添加infowindow