diff --git a/src/PersistentData/Model/Map.php b/src/PersistentData/Model/Map.php new file mode 100644 index 0000000..919c156 --- /dev/null +++ b/src/PersistentData/Model/Map.php @@ -0,0 +1,103 @@ +bounds = Bounds::createDirectly(-90.0, -180.0, 90.0, 180.0); + } + + public function setName(string $name): void + { + $this->name = $name; + } + + public function setDescription(string $description): void + { + $this->description = $description; + } + + public function setBounds(Bounds $bounds): void + { + $this->bounds = $bounds; + } + + public function setBoundSouthLat(float $bound_south_lat): void + { + $this->bounds->setSouthLat($bound_south_lat); + } + + public function setBoundWestLng(float $bound_west_lng): void + { + $this->bounds->setWestLng($bound_west_lng); + } + + public function setBoundNorthLat(float $bound_north_lat): void + { + $this->bounds->setNorthLat($bound_north_lat); + } + + public function setBoundEastLng(float $bound_east_lng): void + { + $this->bounds->setEastLng($bound_east_lng); + } + + public function setArea(float $area): void + { + $this->area = $area; + } + + public function getName(): string + { + return $this->name; + } + + public function getDescription(): string + { + return $this->description; + } + + public function getBounds(): Bounds + { + return $this->bounds; + } + + public function getBoundSouthLat(): float + { + return $this->bounds->getSouthLat(); + } + + public function getBoundWestLng(): float + { + return $this->bounds->getWestLng(); + } + + public function getBoundNorthLat(): float + { + return $this->bounds->getNorthLat(); + } + + public function getBoundEastLng(): float + { + return $this->bounds->getEastLng(); + } + + public function getArea(): float + { + return $this->area; + } +} diff --git a/src/Util/Geo/Bounds.php b/src/Util/Geo/Bounds.php index 72501c1..99f1edb 100644 --- a/src/Util/Geo/Bounds.php +++ b/src/Util/Geo/Bounds.php @@ -59,6 +59,26 @@ class Bounds } } + public function setSouthLat(float $southLat): void + { + $this->southLat = $southLat; + } + + public function setWestLng(float $westLng): void + { + $this->westLng = $westLng; + } + + public function setNorthLat(float $northLat): void + { + $this->northLat = $northLat; + } + + public function setEastLng(float $eastLng): void + { + $this->eastLng = $eastLng; + } + public function getSouthLat(): float { return $this->southLat;