首页 > 解决方案 > AGM(角度谷歌地图)的箭头符号(折线)

问题描述

在 Angular 6 中,我使用流动代码进行 agm-polyline。我想在 agm-polyline中添加箭头符号(折线)( https://developers.google.com/maps/documentation/javascript/examples/overlay-symbol-arrow )。但编译器显示错误,例如无法绑定到“图标”,因为它不是“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>

对于 agm-polyline 箭头符号(折线)我应该怎么做?

标签: angular6angular-google-mapsgoogle-polyline

解决方案


<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>

推荐阅读