ViewBox class

A model class representing a geographical view box for searching within a specific area.

This class is used to define the geographical boundaries for a search request, allowing the search to be constrained within a specified rectangular area.

The ViewBox class ensures that the provided latitude and longitude values are within valid ranges and that the north boundary is greater than the south boundary, and the east boundary is greater than the west boundary.

Example usage:

ViewBox viewBox = ViewBox(
  northLatitude: 37.7749,
  southLatitude: 37.7049,
  eastLongitude: -122.4194,
  westLongitude: -122.5194,
);

Properties:

Constructor:

  • ViewBox: Creates a new instance of the ViewBox class with the specified boundaries.

Constructors

ViewBox(double northLatitude, double southLatitude, double eastLongitude, double westLongitude)

Properties

eastLongitude double
East boundary of the view box
final
hashCode int
The hash code for this object.
no setterinherited
northLatitude double
North boundary of the view box
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
southLatitude double
South boundary of the view box
final
westLongitude double
West boundary of the view box
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited