Google Maps Platform 即将推出全新地图样式。此次地图样式更新包括全新默认调色板,以及地图体验和易用性方面的改进。所有地图样式将于 2025 年 3 月自动更新。如需详细了解适用范围以及如何提前选择启用,请参阅
全新 Google Maps Platform 地图样式。
LatLng
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
表示一对纬度和经度坐标(以度数形式存储)的不可变类。
继承的常量摘要
继承自 android.os.Parcelable 接口
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
公共构造函数摘要
|
LatLng(双纬度、双经度) 使用给定的纬度和经度(以度为单位)构造 LatLng。
|
继承的方法摘要
继承自 java.lang.Object 类
布尔值
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
整型
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
字符串
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
继承自 android.os.Parcelable 接口
abstract
int
|
describeContents()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
字段
public final double
纬度
纬度(以度为单位)。此值在 [-90, 90] 范围内。
public final 双
longitude
经度,以度为单位。此值的范围为 [-180, 180)。
公共构造函数
public
LatLng
(双纬度、双经度)
使用给定的纬度和经度(以度为单位)构造 LatLng。
参数
latitude |
点的纬度。此值的取值范围将介于 -90 度(含)到 +90 度(含)之间。 |
longitude |
点的经度。这会将该值标准化为介于 -180 度(含 +180 度)(不含 +180 度)内。
|
公共方法
public boolean
等于
(对象 o)
用于测试此 LatLng
是否等于另一个。
当且仅当两点的纬度相等且经度按位相等时,这两个点会被视为相等。这意味着,就几何距离而言,两个非常接近的 LatLng
可能不会被视为 .equal()
。
public
String
toString
()
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-07-13。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]