Skip to content

Commit 1df173e

Browse files
smnandreKocal
andauthored
Update src/Map/src/Cluster/Cluster.php
Co-authored-by: Hugo Alliaume <hugo@alliau.me>
1 parent 7226943 commit 1df173e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Map/src/Cluster/Cluster.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ final class Cluster implements \Countable, \IteratorAggregate
3636
*/
3737
public function __construct(Point $initialPoint)
3838
{
39-
$this->points[] = $initialPoint;
40-
$this->sumLat = $initialPoint->getLatitude();
41-
$this->sumLng = $initialPoint->getLongitude();
42-
$this->count = 1;
39+
$this->addPoint($initialPoint);
4340
}
4441

4542
public function addPoint(Point $point): void

0 commit comments

Comments
 (0)