I want to implement the Marker Cluster plugin in my project which uses yagajs / Leaflet .
In the Marker Cluster documentation, they say that I simply need to use the following code:
var markers = new L.MarkerClusterGroup();
markers.addLayer(L.marker([175.3107, -37.7784]));
// add more markers here...
map.addLayer(markers);
However, in yagajs / leaflet we do not use the L namespace, let alone the addLayer method, everything is done by directives, as in the code below:
<yaga-marker *ngFor="let alarm of allVehicles" [(lat)]="alarm.latitude" [(lng)]="alarm.longitude" [display]="alarm.display">
<yaga-icon *ngIf="alarm.speed>5"
[iconUrl]="'assets/truckk.png'"
[iconSize]="[40,45]"
[iconAnchor]="[23,44]"
[popupAnchor]="[-5,-42]">
</yaga-icon>
<yaga-popup>{{ alarm.customer_child_name }} - {{ alarm.speed }} - {{ alarm.vehicle_plates }}</yaga-popup>
</yaga-marker>
</yaga-feature-group>
How do I perform this implementation? Seeing that in the yagajs / leaflet documentation they offer the providers feature to do this. But I could not understand them.