In my Angular 2 application using agm map for vehicle tracking, I am looking for a way to customize the map marker. Specifically, I want to display the vehicle status by changing the color of the marker (green for running, red for stopped, yellow for idle) and also show the direction in which the vehicle is traveling.
After searching extensively, I was only able to find icons that could be added to the marker using iconUrl
like this:
<agm-map>
<agm-marker class="mapMarker" *ngFor="let device of devices;" [latitude]="device.latitude" [longitude]="device.longitude" [iconUrl]="'/src/assets/arrow2.png'" [label]="device.name">
</agm-marker>
</agm-map>
This resulted in an output that looked awkward as seen in this image: https://i.sstatic.net/HQZCa.png
I am seeking help to display HTML content on the marker instead of just an icon, similar to the desired output shown in this image: https://i.sstatic.net/RQKVA.png