Esempio n. 1
0
 /**
  * @return Coordinate\Degree
  */
 private function getBuenosAiresCoordinate()
 {
     //Buenos Aires: 34°35′S 58°55′W
     $buenosAires = new Coordinate\Degree();
     $buenosAires->setLatitude(34, 35, 00, 'S');
     $buenosAires->setLongitude(58, 55, 00, 'W');
     return $buenosAires;
 }
Esempio n. 2
0
 public function testConversion()
 {
     $coordinate = new Coordinate();
     $coordinate->setLatitude(53, 10, 25);
     $coordinate->setLongitude(18, 10, 16);
     $this->assertEquals(53.1736, $coordinate->getLatitude(), '', 0.0001);
     $this->assertEquals(18.1711, $coordinate->getLongitude(), '', 0.0001);
 }