Stay organized with collections Save and categorize content based on your preferences.
An immutable class representing a latitude/longitude aligned rectangle.
Nested Class Summary class LatLngBounds.Builder This is a builder that is able to create a minimum bound based on a set of LatLng points. Inherited Constant Summary From interface android.os.Parcelable int CONTENTS_FILE_DESCRIPTOR int PARCELABLE_WRITE_RETURN_VALUE Field Summary Public Constructor Summary Public Method Summary Inherited Method Summary From class java.lang.Object Objectclone()
boolean voidfinalize()
final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
From interface android.os.Parcelable abstract intdescribeContents()
abstract void writeToParcel(
Parcelarg0, int arg1)
Fields public final LatLng northeastNortheast corner of the bound.
public final LatLng southwestSouthwest corner of the bound.
Public Constructors public LatLngBounds (LatLng southwest, LatLng northeast)Creates a new bounds based on a southwest and a northeast corner.
The bounds conceptually includes all points where:
Returns whether this contains the given LatLng
.
LatLng
to test. Must not be null
. Returns
true
if this contains the given point; false
if not.Returns the center of this LatLngBounds. The center is simply the average of the coordinates (taking into account if it crosses the antimeridian). This is approximately the geographical center (it would be exact if the Earth were a perfect sphere). It will not necessarily be the center of the rectangle as drawn on the map due to the Mercator projection.
ReturnsLatLng
that is the center of the LatLngBounds.Returns a new LatLngBounds
that extends this LatLngBounds to include the given LatLng
. This will return the smallest LatLngBounds that contains both this and the extra point.
In particular, it will consider extending the bounds both in the eastward and westward directions (one of which may cross the antimeridian) and choose the smaller of the two. In the case that both directions result in a LatLngBounds of the same size, this will extend it in the eastward direction.
Parameters point aLatLng
to be included in the new bounds. Must not be null
. Returns
LatLngBounds
that contains this and the extra point.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`LatLngBounds` represents a rectangular area on a map defined by its southwest and northeast corners."],["It's used to specify a region of interest, such as the area to display on a map."],["You can create a `LatLngBounds` using a builder or directly from southwest and northeast coordinates."],["`LatLngBounds` offers methods to check if a point is within its boundaries, get its center, and expand to include other points."],["It's immutable, meaning once created, its properties cannot be changed."]]],["`LatLngBounds` represents an immutable latitude/longitude rectangle, defined by `northeast` and `southwest` corner points. You can create it directly with these points or use a `Builder` to define a minimum bound from multiple `LatLng` points. Key actions include checking if the bounds `contains` a given `LatLng`, getting the `center`, and creating a new `LatLngBounds` `including` an additional point. There's also a method to create a new `builder` and check `equals` or `hashCode` of the bounds.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4