BitmapDescriptor
Stay organized with collections
Save and categorize content based on your preferences.
Defines a Bitmap image. For a marker, this class can be used to set the image of the
marker icon. For a ground overlay, it can be used to set the image to place on the surface of
the earth. To obtain a BitmapDescriptor
use the factory class BitmapDescriptorFactory
.
Example of setting the icon of a marker 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));
Inherited Method Summary
From class java.lang.Object
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."],[[["\u003cp\u003e\u003ccode\u003eBitmapDescriptor\u003c/code\u003e defines bitmap images for marker icons and ground overlays in Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eUse \u003ccode\u003eBitmapDescriptorFactory\u003c/code\u003e to create \u003ccode\u003eBitmapDescriptor\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThe provided code snippet demonstrates setting a marker icon using \u003ccode\u003eBitmapDescriptorFactory\u003c/code\u003e and \u003ccode\u003eHUE_AZURE\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBitmapDescriptor\u003c/code\u003e inherits standard methods from \u003ccode\u003ejava.lang.Object\u003c/code\u003e like \u003ccode\u003eequals\u003c/code\u003e, \u003ccode\u003ehashCode\u003c/code\u003e, and \u003ccode\u003etoString\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# BitmapDescriptor\n\npublic final class **BitmapDescriptor** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nDefines a Bitmap image. For a marker, this class can be used to set the image of the\nmarker icon. For a ground overlay, it can be used to set the image to place on the surface of\nthe earth. To obtain a [BitmapDescriptor](/android/reference/com/google/android/gms/maps/model/BitmapDescriptor)\nuse the factory class [BitmapDescriptorFactory](/android/reference/com/google/android/gms/maps/model/BitmapDescriptorFactory).\n\nExample of setting the icon of a marker [BitmapDescriptor](/android/reference/com/google/android/gms/maps/model/BitmapDescriptor). \n\n GoogleMap map = ... // get a map.\n // Add a marker at San Francisco with an azure colored marker.\n Marker marker = map.add(new MarkerOptions()\n .position(new LatLng(37.7750, 122.4183))\n .title(\"San Francisco\")\n .snippet(\"Population: 776733\"))\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n \n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |"]]