Open rafaelmacedox opened 6 years ago
Do you have specific questions? I can try to help you.
Maybe I will find some time to implement a MarkerCluster Plugin next months.
I'm using directives to create layers
<yaga-marker *ngFor="let alarm of allVehicles" [(lat)]="alarm.latitude" [(lng)]="alarm.longitude" [display]="alarm.display">
<yaga-icon
[iconUrl]="'assets/true_truckk.png'"
[iconSize]="[40,45]"
[iconAnchor]="[23,44]"
[popupAnchor]="[-5,-42]">
</yaga-icon>
</yaga-marker>
To use the Marker Cluster I must do
var markers = new L.MarkerClusterGroup();
markers.addLayer(L.marker([175.3107, -37.7784]));
map.addLayer(markers);
So in yagajs/leaflet I should do:
@ViewChild(MapComponent) private mapComponent: MapComponent;
let markers = (L as any).MarkerClusterGroup();
markers.addLayer( ??????????? );
mapComponent.addLayer(markers);
In this part I do not know how to proceed, how should I recover all my makers and after that where I add them.
Hi @rafaelmacedox,
Could you figure out a easy/ proper way of doing clustering? Thank you!
Hello everyone, I have a angular project using yaga leaflet, I need to implement the markercluster plugin, I am using the
yaga-feature-group
andyaga-marker
directives. I saw that there is an issue already open, but I still could not implement what I need, could anyone help me?