getLngs() public method

Return all polygon point's longitudes.
public getLngs ( ) : float[]
return float[]
Beispiel #1
0
 public function testIfGetLngsWorksAsExpected()
 {
     $polygon = new Polygon();
     $polygon->addPoint(new Coordinate(10, 20));
     $polygon->addPoint(new Coordinate(10, 40));
     $polygon->addPoint(new Coordinate(30, 40));
     $polygon->addPoint(new Coordinate(30, 20));
     $expected = array(20, 40, 40, 20);
     $this->assertEquals($expected, $polygon->getLngs());
 }