How to place the leaflet maps dynamically with order

My requirement is to place the leaflet maps with order coming from the backend(based on the condition first map has to come with entire width).

.component.ts

for (var i = 0; i < this.sensors.length; i++) {
  if (
    this.getDistanceFromLatLonInKm(
      this.sensors[i].latitude,
      this.sensors[i].longitude,
      this.location_latitude,
      this.location_longitude
    ) < 50.0
  ) {
    var v = "map" + i + "";
    var latlng = L.latLng(this.sensors[i].latitude, this.sensors[i].longitude);

    this.sensorsarray.push(this.sensors[i]);
    map[i] = L.map(v).setView(
      [this.sensors[i].latitude, this.sensors[i].longitude],
      11
    );
    L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
      attribution:
        ' <span style="font-size:17px">' + this.sensors[i].name + " </span>",
    }).addTo(map[i]);
    var latlng = L.latLng(this.sensors[i].latitude, this.sensors[i].longitude);
    marker = L.marker(latlng, { icon: sensoricon }).addTo(map[i]);
    circlemark[i] = L.circle(latlng, { radius: 5000, weight: 0 }).addTo(map[i]);
  }
}

if this.getDistanceFromLatLonInKm is <50 (as written above) the default map has to show with entire width,if 2 means come with same row if three means come with two for first row and one for second row,four means with rows and so on…
( but for me the default map is coming but coming with quadrant space) .

.component.html

<div
  *ngFor="let map of sensors; let i = index"
  [ngClass]="{
    'col-12': sensorsarray.length % 2 == 0 && i == sensors.length - 1,
    'col-6': i < sensors.length
  }"
>
  <div id="map{{ i }}" style="height: 320px; border: 1px solid gray"></div>
</div>

<br />

<div
  *ngFor="let sensor of sensors; let i = index"
  (ngModelChange)="dataChanged(selectsensor)"
>
  <div class="checkbox">
    <label>
      <input
        type="checkbox"
        data-toggle="toggle"
        (click)="dataChanged(sensor, i)"
      />
      {{ sensor.name }}
    </label>
  </div>
</div>

I am new to this leaflet map ,can anyone please help me for the above.

Source: AngularJS Questions