公共最终类 BitmapDescriptor 扩展了对象
定义位图图像。对于标记,此类可用于设置标记图标的图片。对于地面叠加层,它可用于设置要放置在地球表面的图像。如需获取 BitmapDescriptor
,请使用工厂类 BitmapDescriptorFactory
。
设置标记 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));