Get box.

@param array $coordinates

@return Box
519131
private function getBox(array $coordinates)
    {
        $height = abs($coordinates['y1'] - $coordinates['y2']);
        $width = abs($coordinates['x1'] - $coordinates['x2']);

        return new Box($width, $height);
    }
231141
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getType();
                break;
            case 2:
                return $this->getName();
                break;
            case 3:
                return $this->getDomain();
                break;
            case 4:
                return $this->getApiUrl();
                break;
            case 5:
                return $this->getApiAuthHttpUser();
                break;
            case 6:
                return $this->getApiAuthHttpPassword();
                break;
            case 7:
                return $this->getApiAuthType();
                break;
            case 8:
                return $this->getApiAuthUser();
                break;
            case 9:
                return $this->getApiAuthPassword();
                break;
            case 10:
                return $this->getApiAuthToken();
                break;
            case 11:
                return $this->getApiAuthUrlUserKey();
                break;
            case 12:
                return $this->getApiAuthUrlPwKey();
                break;
            case 13:
                return $this->getCron();
                break;
            case 14:
                return $this->getCustomerId();
                break;
            case 15:
                return $this->getActivated();
                break;
            case 16:
                return $this->getNotes();
                break;
            case 17:
                return $this->getLastRun();
                break;
            case 18:
                return $this->getIncludelog();
                break;
            case 19:
                return $this->getPublicKey();
                break;
            case 20:
                return $this->getWebsiteHash();
                break;
            case 21:
                return $this->getNotificationRecipient();
                break;
            case 22:
                return $this->getNotificationSender();
                break;
            case 23:
                return $this->getNotificationChange();
                break;
            case 24:
                return $this->getNotificationError();
                break;
            default:
                return null;
                break;
        } // switch()
    }
916838
public function get($columns = ['*'])
    {
        if (! is_null($this->minutes)) {
            return $this->getCached($columns);
        }

        return parent::get($columns);
    }
1285833
public function render(Coordinate $coordinate)
    {
        $formatter = $this->getFormatter();

        return $formatter->renderObjectAssignment($coordinate, $formatter->renderObject('LatLng', [
            $coordinate->getLatitude(),
            $coordinate->getLongitude(),
            $formatter->renderEscape($coordinate->isNoWrap()),
        ]));
    }
174981
public function getChildAt($position, array $columns = ['*'])
    {
        if ($this->hasChildrenRelation()) {
            $result = $this->getRelation($this->getChildrenRelationIndex())->get($position);
        } else {
            $result = $this->children($position)->first($columns);
        }

        return $result;
    }
1258137
public function polyline(array $coordinates = [], array $options = [])
	{
		$items = $this->getItems();

		if (empty($items)) {
			throw new MapperInstanceException('No map found to add a polyline to.');
		}

		$defaults = [
			'coordinates' => $coordinates,
			'geodesic' => false,
			'strokeColor' => '#FF0000',
			'strokeOpacity' => 0.8,
			'strokeWeight' => 2,
			'editable' => false
		];

		$item = end($items);
		$options = array_replace_recursive(
			$defaults,
			$options
		);

		$item->shape('polyline', $coordinates, $options);

		return $this;
	}
1209359
public function getBox($boxId)
    {
        $response = $this->doRequest(
            self::RESOURCE_GET_BOX,
            [
                'boxId' => $boxId
            ]
        );

        return Box::fromStream($response);
    }
7362
public function getBoundingBox()
    {
        return array(
            new Coordinate(array(
                $this->latitudeInterval[0],
                $this->longitudeInterval[0]
            )),
            new Coordinate(array(
                $this->latitudeInterval[1],
                $this->longitudeInterval[1]
            ))
        );
    }
54155
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getMapuid();
                break;
            case 2:
                return $this->getName();
                break;
            case 3:
                return $this->getFilename();
                break;
            case 4:
                return $this->getAuthor();
                break;
            case 5:
                return $this->getEnvironment();
                break;
            case 6:
                return $this->getMood();
                break;
            case 7:
                return $this->getBronzetime();
                break;
            case 8:
                return $this->getSilvertime();
                break;
            case 9:
                return $this->getGoldtime();
                break;
            case 10:
                return $this->getAuthortime();
                break;
            case 11:
                return $this->getCopperprice();
                break;
            case 12:
                return $this->getLaprace();
                break;
            case 13:
                return $this->getNblaps();
                break;
            case 14:
                return $this->getNpcheckpoints();
                break;
            case 15:
                return $this->getMaptype();
                break;
            case 16:
                return $this->getMapstyle();
                break;
            case 17:
                return $this->getCreatedAt();
                break;
            case 18:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
1161572
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getVisible();
                break;
            case 2:
                return $this->getAddress1();
                break;
            case 3:
                return $this->getAddress2();
                break;
            case 4:
                return $this->getAddress3();
                break;
            case 5:
                return $this->getZipcode();
                break;
            case 6:
                return $this->getCity();
                break;
            case 7:
                return $this->getCountryId();
                break;
            case 8:
                return $this->getLatitude();
                break;
            case 9:
                return $this->getLongitude();
                break;
            case 10:
                return $this->getCreatedAt();
                break;
            case 11:
                return $this->getUpdatedAt();
                break;
            case 12:
                return $this->getVersion();
                break;
            case 13:
                return $this->getVersionCreatedAt();
                break;
            case 14:
                return $this->getVersionCreatedBy();
                break;
            default:
                return null;
                break;
        } // switch()
    }
674771
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getPersonId();
                break;
            case 2:
                return $this->getTeamId();
                break;
            case 3:
                return $this->getCreatedAt();
                break;
            case 4:
                return $this->getUpdatedAt();
                break;
            case 5:
                return $this->getVersion();
                break;
            case 6:
                return $this->getVersionCreatedAt();
                break;
            case 7:
                return $this->getVersionCreatedBy();
                break;
            case 8:
                return $this->getPersonIdVersion();
                break;
            case 9:
                return $this->getTeamIdVersion();
                break;
            default:
                return null;
                break;
        } // switch()
    }
1342895
public function getClosest(array $points)
    {
        foreach ($points as $point) {
            $distance = $this->getDistanceWith($point, false);

            if (!isset($minDistance)) {
                $minDistance = $distance;
                $minPoint = $point;
                continue;
            }

            if ($distance < $minDistance) {
                $minDistance = $distance;
                $minPoint = $point;
            }
        }

        return $minPoint;
    }
233958
public static function create($elements) {
    /** @var ArrayNode $node */
    $node = Parser::parseExpression('[]');
    /** @var \Pharborist\Node $element */
    foreach ($elements as $element) {
      $node->getElementList()->appendItem($element);
    }
    return $node;
  }
1091319
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getTitle();
                break;
            case 2:
                return $this->getSlug();
                break;
            case 3:
                return $this->getAthleteLabel();
                break;
            case 4:
                return $this->getObjectSlug();
                break;
            case 5:
                return $this->getObjectLabel();
                break;
            case 6:
                return $this->getObjectPluralLabel();
                break;
            case 7:
                return $this->getSkillSlug();
                break;
            case 8:
                return $this->getSkillLabel();
                break;
            case 9:
                return $this->getSkillPluralLabel();
                break;
            case 10:
                return $this->getSkillPictureUrl();
                break;
            case 11:
                return $this->getGroupSlug();
                break;
            case 12:
                return $this->getGroupLabel();
                break;
            case 13:
                return $this->getGroupPluralLabel();
                break;
            case 14:
                return $this->getTransitionLabel();
                break;
            case 15:
                return $this->getTransitionPluralLabel();
                break;
            case 16:
                return $this->getTransitionsSlug();
                break;
            case 17:
                return $this->getPositionSlug();
                break;
            case 18:
                return $this->getPositionLabel();
                break;
            case 19:
                return $this->getFeatureComposition();
                break;
            case 20:
                return $this->getFeatureTester();
                break;
            case 21:
                return $this->getIsDefault();
                break;
            default:
                return null;
                break;
        } // switch()
    }
541169
public function createCoordinatesFromGeometry() : Coordinates
    {
        // create new coordinates object
        $coordinates = new Coordinates($this->googleData->geometry->location->lat, $this->googleData->geometry->location->lng);

        return $coordinates;
    }
1299528
public function offsetGet($position)
    {
        return isset($this->storage[$position]) ? $this->storage[$position] : null;
    }
1317115
public function offsetGet( $offset ) {

		if ( is_array( $this->__container ) ) {
			if ( isset( $this->__container[ $offset ] ) ) {
				return $this->__container[ $offset ];
			}
		} elseif ( isset( $this->__container->$offset ) ) {
			return $this->__container->$offset;
		}

		return null;
	}