Point Class

class BeastBytes\Yii\Leaflet\Types\Point

Represents a point on a map with x and y coordinates in pixels

__construct(array|int $x, ?int $y = null)

Create a new Point instance

Parameters:
  • $x (array{int, int}|array{x: int, y: int}|int) –

    • int - x coordinate

    • array{0: int, 1: int}|array{x: int, y: int} - x and y coordinates

  • $y (?int) – y coordinate (ignored if $x is an array)

Returns:

A new Point instance

Return type:

Point

Throws:

InvalidArgumentException If $x is an integer and $y is null