Kiểu bản đồ mới sắp xuất hiện trên Nền tảng Google Maps. Bản cập nhật này để tạo kiểu bản đồ bao gồm một bảng màu mặc định mới và các cải tiến về trải nghiệm bản đồ cũng như khả năng hữu dụng. Tất cả kiểu bản đồ sẽ được cập nhật tự động vào tháng 3 năm 2025. Để biết thêm thông tin về phạm vi cung cấp và cách chọn tham gia sớm hơn, hãy xem bài viết Kiểu bản đồ mới cho Nền tảng Google Maps.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
lớp cuối cùng công khai
BitmapDescriptor
mở rộng Đối tượng
Xác định hình ảnh Bitmap. Đối với một điểm đánh dấu, bạn có thể dùng lớp này để đặt hình ảnh của biểu tượng điểm đánh dấu.
Đối với lớp phủ mặt đất, bạn có thể dùng tính năng này để đặt hình ảnh thành lớp phủ trên bề mặt trái đất. Người nhận
lấy BitmapDescriptor bằng cách sử dụng lớp factory BitmapDescriptorFactory.
Ví dụ về cách đặt biểu tượng của điểm đánh dấu 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));
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-03-13 UTC."],[[["`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"]]