How to display polyline with Google Maps and pearl-lullaby?

brown and green plants on rocky mountain under blue and white sunny cloudy sky during daytime

I am currently using this library to display a Google Map in my Angular application. I managed to draw points on my map when the user clicks on it:

click(event: google.maps.MouseEvent) {
   this.addMarker(event);
}

addMarker(event: google.maps.MouseEvent) {
   this.markers.push({
      position: event.latLng,
      label: {
        color: 'yellow',
        text: 'Position ' + (this.markers.length + 1),
      },
      title: 'Position ' + (this.markers.length + 1),
      options: { animation: google.maps.Animation.BOUNCE },
   });
}

but I would like to also display a polyline between my markers. The developers here claim to have support for polyline but no example is provided whatsoever.

How can I draw lines between markers?

asked 2 hours ago
RexamRexam

4951 gold badge9 silver badges27 bronze badges

Latest posts