'Arrow Symbols (Polyline) for AGM(Angular Google Map)

In angular 6. I am using flowing code for agm-polyline. I want to add Arrow Symbols (Polyline) (https://developers.google.com/maps/documentation/javascript/examples/overlay-symbol-arrow) in agm-polyline. But compiler shows error like Can't bind to 'icon' since it isn't a known property of 'agm-polyline'....

<agm-polyline [strokeColor]="color" [icon]="icon"  >
          <agm-polyline-point  *ngFor="let marker of markers ; let i=index"  [latitude]="marker.lat" [longitude]="marker.lng">
          </agm-polyline-point>
    
        </agm-polyline>

For agm-polyline Arrow Symbols (Polyline) what should I do?



Solution 1:[1]

<agm-polyline [strokeColor]="'red'" [strokeWeight]="'1.5'">
                                        <agm-icon-sequence [fixedRotation]="false"
                                            [repeat]= "'50px'"
                                            [offset]="100" 
                                            [path]="'FORWARD_OPEN_ARROW'">
                                        </agm-icon-sequence>
                                        <agm-polyline-point *ngFor="let line of circles_path" 
                                        [latitude]="line.lat"
                                        [longitude]="line.long" >
                                        </agm-polyline-point>
                                    </agm-polyline>

Solution 2:[2]

agm uses [iconUrl] instead of [icon].Try that and set the Url in the .ts file like this:


  public icon = {
    url: 'http://earth.google.com/images/kml-icons/track-directional/track-4.png',
    scaledSize: {
      width: 30,
      height: 30
    }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rambabu Padimi
Solution 2 Ujjwal Sharma