BitmapDescriptor
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
public final class
BitmapDescriptor
erweitert Objekt
Definiert ein Bitmapbild. Für eine Markierung kann diese Klasse verwendet werden, um das Bild des Markierungssymbols festzulegen.
Für ein Boden-Overlay kann damit festgelegt werden, dass das Bild auf der Erdoberfläche platziert werden soll. Bis
erhalten Sie eine BitmapDescriptor, verwenden Sie die Factory-Klasse BitmapDescriptorFactory.
Beispiel für das Festlegen des Symbols für eine Markierung 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));
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-10-23 (UTC)."],[],["`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"]]