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:
- northLatitude: North boundary of the view box. Must be greater than southLatitude and less than or equal to 90.
- southLatitude: South boundary of the view box. Must be less than northLatitude and greater than or equal to -90.
- eastLongitude: East boundary of the view box. Must be greater than westLongitude and less than or equal to 180.
- westLongitude: West boundary of the view box. Must be less than eastLongitude and greater than or equal to -180.
Constructor:
Constructors
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