Skip to content

Commit

Permalink
Merge branch 'feature/filterOutGateways' into feature/FeedbackChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
August Andersen committed Apr 25, 2024
2 parents 828bf7c + 2b0d306 commit eaccd74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h3>{{ "APPLICATION.DETAILS" | translate }}</h3>
<div class="col d-flex markerDescriptionDiv">
<div class="col d-flex">
<img class="marker" src="{{ greyMarker }}" />
<p>: IoT-Device</p>
<p>: IoT-Enhed</p>
</div>
<div class="col d-flex">
<img class="marker" src="{{ redMarker }}" />
Expand Down
14 changes: 11 additions & 3 deletions src/app/shared/components/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,19 @@ export class MapComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy
const clusterGroup = L.markerClusterGroup({
maxClusterRadius: 80,
});
const gatewayLayerGroup = [];

this.coordinateList.forEach(coord => {
clusterGroup.addLayer(
this.addMarker(coord.latitude, coord.longitude, coord.draggable, coord.markerInfo)
);
if (!coord.markerInfo.isDevice) {
gatewayLayerGroup.push(
this.addMarker(coord.latitude, coord.longitude, coord.draggable, coord.markerInfo)
);
this.markers = L.layerGroup(gatewayLayerGroup).addTo(this.map);
} else {
clusterGroup.addLayer(
this.addMarker(coord.latitude, coord.longitude, coord.draggable, coord.markerInfo)
);
}
});

this.markers = clusterGroup.addTo(this.map);
Expand Down

0 comments on commit eaccd74

Please sign in to comment.