BitmapDescriptor
定义位图图像。对于标记,此类可用于设置标记图标的图片。
对于地面叠加层,它可用于设置要放置在地球表面上的图像。接收者
使用工厂类 BitmapDescriptorFactory
获取 BitmapDescriptor
。
示例:设置标记 BitmapDescriptor
的图标。
GoogleMap map = ... // get a map.
// Add a marker at San Francisco with an azure colored marker.
Marker marker = map.add(new MarkerOptions()
.position(new LatLng(37.7750, 122.4183))
.title("San Francisco")
.snippet("Population: 776733"))
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));
继承的方法摘要
继承自 java.lang.Object 类
boolean
|
equals(对象参数 0)
|
最后一站
类<?>
|
getClass()
|
int
|
hashCode()
|
final void
|
notify()
|
final void
|
notifyAll()
|
字符串
|
toString()
|
final void
|
wait(long arg0, int arg1)
|
final void
|
wait(long arg0)
|
final void
|
wait()
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-13。
[null,null,["最后更新时间 (UTC):2025-07-13。"],[[["`BitmapDescriptor` defines bitmap images for marker icons and ground overlays in Google Maps."],["Use `BitmapDescriptorFactory` to create instances of `BitmapDescriptor`."],["Marker icons can be customized using `BitmapDescriptor` obtained from `BitmapDescriptorFactory`."],["`BitmapDescriptor` inherits standard methods from `java.lang.Object` like `equals`, `hashCode`, and `toString`."]]],["`BitmapDescriptor` defines a bitmap image for markers or ground overlays. To use it, utilize the `BitmapDescriptorFactory` class. For instance, to set a marker's icon, you can use `BitmapDescriptorFactory.defaultMarker()` to define a color. The example provided demonstrates adding a marker to a map at specific coordinates and customizing it with an azure-colored icon, along with title and snippet. Additionally, this class inherits methods from the `java.lang.Object` class.\n"]]