Documentation

Viewport extends Message
in package

A latitude-longitude viewport, represented as two diagonally opposite `low` and `high` points. A viewport is considered a closed region, i.e. it includes its boundary. The latitude bounds must range between -90 to 90 degrees inclusive, and the longitude bounds must range between -180 to 180 degrees inclusive. Various cases include: - If `low` = `high`, the viewport consists of that single point.

  • If low.longitude > high.longitude, the longitude range is inverted (the viewport crosses the 180 degree longitude line).
  • If low.longitude = -180 degrees and high.longitude = 180 degrees, the viewport includes all longitudes.
  • If low.longitude = 180 degrees and high.longitude = -180 degrees, the longitude range is empty.
  • If low.latitude > high.latitude, the latitude range is empty. Both low and high must be populated, and the represented box cannot be empty (as specified by the definitions above). An empty viewport will result in an error. For example, this viewport fully encloses New York City: { "low": { "latitude": 40.477398, "longitude": -74.259087 }, "high": { "latitude": 40.91618, "longitude": -73.70018 } }

Generated from protobuf message google.geo.type.Viewport

Table of Contents

Properties

$high  : mixed
Required. The high point of the viewport.
$low  : mixed
Required. The low point of the viewport.

Methods

__construct()  : mixed
Constructor.
clearHigh()  : mixed
clearLow()  : mixed
getHigh()  : LatLng|null
Required. The high point of the viewport.
getLow()  : LatLng|null
Required. The low point of the viewport.
hasHigh()  : mixed
hasLow()  : mixed
setHigh()  : $this
Required. The high point of the viewport.
setLow()  : $this
Required. The low point of the viewport.

Properties

$high

Required. The high point of the viewport.

protected mixed $high = null

Generated from protobuf field .google.type.LatLng high = 2 [json_name = "high"];

$low

Required. The low point of the viewport.

protected mixed $low = null

Generated from protobuf field .google.type.LatLng low = 1 [json_name = "low"];

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
$data : array<string|int, mixed> = NULL

{ Optional. Data for populating the Message object.

@type \Google\Type\LatLng $low
      Required. The low point of the viewport.
@type \Google\Type\LatLng $high
      Required. The high point of the viewport.

}

getHigh()

Required. The high point of the viewport.

public getHigh() : LatLng|null

Generated from protobuf field .google.type.LatLng high = 2 [json_name = "high"];

Return values
LatLng|null

getLow()

Required. The low point of the viewport.

public getLow() : LatLng|null

Generated from protobuf field .google.type.LatLng low = 1 [json_name = "low"];

Return values
LatLng|null

setHigh()

Required. The high point of the viewport.

public setHigh(LatLng $var) : $this

Generated from protobuf field .google.type.LatLng high = 2 [json_name = "high"];

Parameters
$var : LatLng
Return values
$this

setLow()

Required. The low point of the viewport.

public setLow(LatLng $var) : $this

Generated from protobuf field .google.type.LatLng low = 1 [json_name = "low"];

Parameters
$var : LatLng
Return values
$this

        
On this page

Search results