1
我在@角度4使用@ agm/core,我想要在兩點之間獲取方向以在地圖上繪製它們,但我不知道如何去做吧。 沒有在官方網站上的小文件時,@ AGM /核心我得到的版本是1.0.0-beta.1獲取兩點之間的方向,並在地圖上繪製它們
HTML代碼:
<agm-map>
<agm-polyline>
<agm-polyline-point *ngFor="let coordinate of coordinates"
[latitude]="coordinate.latitude"
[longitude]="coordinate.longitude">
</agm-polyline-point>
</agm-polyline>
</agm-map>
組件代碼:
public coordinates: [
{
latitude: number,
longitude: number,
}
];
謝謝,它的工作! –