Viewport

com.google.geo.`type`.viewport.Viewport
See theViewport companion object
final case class Viewport(low: Option[LatLng], high: Option[LatLng], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Viewport]

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 } }

Value parameters

high

Required. The high point of the viewport.

low

Required. The low point of the viewport.

Attributes

Companion
object
Source
Viewport.scala
Graph
Supertypes
trait Updatable[Viewport]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Attributes

Source
Viewport.scala

Attributes

Source
Viewport.scala
def companion: Viewport.type

Attributes

Source
Viewport.scala
def getField(`__field`: FieldDescriptor): PValue

Attributes

Source
Viewport.scala
def getFieldByNumber(`__fieldNumber`: Int): Any

Attributes

Source
Viewport.scala

Attributes

Source
Viewport.scala
def getLow: LatLng

Attributes

Source
Viewport.scala
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
Source
Viewport.scala
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

Source
Viewport.scala
def withHigh(`__v`: LatLng): Viewport

Attributes

Source
Viewport.scala
def withLow(`__v`: LatLng): Viewport

Attributes

Source
Viewport.scala
def withUnknownFields(`__v`: UnknownFieldSet): Viewport

Attributes

Source
Viewport.scala
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Source
Viewport.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
def update(ms: Lens[Viewport, Viewport] => () => Viewport*): A

Attributes

Inherited from:
Updatable
Source
Lenses.scala
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala