You are here

private function GoogleGeocode::getPolygon in geoPHP 8

Same name and namespace in other branches
  1. 7 geoPHP/lib/adapters/GoogleGeocode.class.php \GoogleGeocode::getPolygon()
1 call to GoogleGeocode::getPolygon()
GoogleGeocode::read in geoPHP/lib/adapters/GoogleGeocode.class.php
Read an address string or array geometry objects

File

geoPHP/lib/adapters/GoogleGeocode.class.php, line 123

Class

GoogleGeocode
PHP Google Geocoder Adapter

Code

private function getPolygon($delta = 0) {
  $points = array(
    $this
      ->getTopLeft($delta),
    $this
      ->getTopRight($delta),
    $this
      ->getBottomRight($delta),
    $this
      ->getBottomLeft($delta),
    $this
      ->getTopLeft($delta),
  );
  $outer_ring = new LineString($points);
  return new Polygon(array(
    $outer_ring,
  ));
}