[英]How to change color or icon ( marker) using agm?
I need to change icon of pin ( marker ) but without changing iconUrl just to change color of icon...我需要更改图钉(标记)的图标,但不更改 iconUrl 只是为了更改图标的颜色...
<agm-marker
*ngFor="let m of markers; let i = index"
[latitude]="m.latitude"
[longitude]="m.longitude"
[label]="m.label" >
</agm-marker>
This is quite simple you just need to add the property color to the agm-marker
这很简单,您只需将属性颜色添加到
agm-marker
<agm-marker
*ngFor="let m of markers; let i = index"
[latitude]="m.latitude"
[longitude]="m.longitude"
[label]="m.label"
[color]="blue">
</agm-marker>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.