Hãy làm theo các bước sau để thiết lập điểm đánh dấu nâng cao.
Bật trình kết xuất bản đồ mới
Trình kết xuất bản đồ được nâng cấp có trong Maps SDK for Android phiên bản 18.0.0. Trình kết xuất này mang đến nhiều điểm cải tiến, bao gồm cả việc hỗ trợ tính năng Định kiểu bản đồ dựa trên đám mây cho Maps SDK dành cho Android.
Khi phát hành phiên bản 18.2.0 của Maps SDK cho Android, Google đã chuyển trình kết xuất mặc định từ trình kết xuất cũ sang trình kết xuất bản đồ được nâng cấp. Thay đổi này có nghĩa là trình kết xuất bản đồ được nâng cấp hiện được dùng theo mặc định trong ứng dụng của bạn khi bạn tạo một ứng dụng mới hoặc tạo lại một ứng dụng hiện có.
Tạo mã bản đồ
Để tạo mã bản đồ mới, hãy làm theo các bước trong phần Tạo mã bản đồ. Đảm bảo bạn đặt Loại bản đồ thành Android.
Cập nhật mã khởi chạy bản đồ
Bước này yêu cầu bạn phải có mã bản đồ mà bạn vừa tạo. Bạn có thể tìm thấy thông tin này trên trang Quản lý Maps.
Điểm đánh dấu nâng cao cần có mã bản đồ. Nếu thiếu mã bản đồ hoặc bạn truyền mã bản đồ không hợp lệ, thì điểm đánh dấu nâng cao sẽ không tải được. Sử dụng phương thức MapCapabilities.isAdvancedMarkersAvailable() để kiểm tra xem các điểm đánh dấu nâng cao có được hỗ trợ hay không.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eAdvanced markers necessitate the utilization of the upgraded map renderer, available in Maps SDK for Android version 18.0.0 and later, and are enabled by default in version 18.2.0 and later.\u003c/p\u003e\n"],["\u003cp\u003eA crucial initial step involves creating a map ID within the Google Cloud console and integrating it into your map initialization code.\u003c/p\u003e\n"],["\u003cp\u003eIt is imperative to verify if advanced markers are supported on the device using \u003ccode\u003eMapCapabilities.isAdvancedMarkersAvailable()\u003c/code\u003e, and to provide a fallback mechanism, such as standard markers, if they are not.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers must ensure compatibility by checking device requirements for the new map renderer, as some devices might not support it.\u003c/p\u003e\n"]]],[],null,["# Get started\n\nSelect platform: [Android](/maps/documentation/android-sdk/advanced-markers/start \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/advanced-markers/overview \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/advanced-markers/start \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\nFollow these steps to get set up with advanced markers.\n\nEnable the new map renderer\n---------------------------\n\nAn upgraded map renderer is available as of version 18.0.0 of the\nMaps SDK for Android. This renderer brings many improvements, including\nsupport for Cloud-based maps styling, to Maps SDK for Android.\n\nWith the release of version 18.2.0 of the Maps SDK for Android, Google switched the\ndefault renderer from the legacy renderer to the upgraded map renderer. This\nchange means that the upgraded map renderer is now used by default in your app\nwhen you build a new app or rebuild an existing app.\n| **Caution:** To use advanced markers in your app, your app must be built using the upgraded map renderer. If you are adding advanced markers to an existing app, ensure that you rebuild the app so that your app uses the upgraded map renderer. For more information, see [New Map Renderer](/maps/documentation/android-sdk/renderer).\n\nCreate a map ID\n---------------\n\nTo create a new map ID, follow the steps at\n[Create a map ID](/maps/documentation/get-map-id#create-a-map-id). Make sure you\nset the Map type to **Android**.\n| **Important:** For testing, you can skip the step of creating and configuring a map ID by using a map ID of `DEMO_MAP_ID` in your app code. `DEMO_MAP_ID` is intended for testing purposes only. Don't use `DEMO_MAP_ID` in a production environment.\n\nUpdate your map initialization code\n-----------------------------------\n\nThis step requires the map ID you just created. It can be found on your [Maps\nManagement](https://console.cloud.google.com/google/maps-apis/studio/maps) page.\n\nTo add the map ID to your initialization code, see\n[Add the map ID to your app](/maps/documentation/get-map-id#add-a-map-id-to-your-app).\n\nCheck map capabilities (required)\n---------------------------------\n\nAdvanced markers requires a map ID. If the map ID is missing, or an\ninvalid map ID is passed, advanced markers cannot load. Use\nthe\n[`MapCapabilities.isAdvancedMarkersAvailable()`](/android/reference/com/google/android/gms/maps/model/MapCapabilities)\nmethod to check to see if advanced markers are supported.\n| **Caution:** Some devices might not support the new map renderer and therefore cannot display advanced markers. You must use `MapCapabilities` to check for support at runtime. If advanced markers are not supported, define a fallback option such as using standard [markers](/maps/documentation/android-sdk/marker). For device requirements for the new map renderer, see [Supported\ndevices](/maps/documentation/android-sdk/renderer#supported-devices). \n\n### Kotlin\n\n\n```kotlin\nval capabilities: MapCapabilities = googleMap.getMapCapabilities()\nSystem.out.println(\"is advanced marker enabled?\" + capabilities.isAdvancedMarkersAvailable())\n```\n\n\u003cbr /\u003e\n\n### Java\n\n\n```java\nMapCapabilities capabilities = googleMap.getMapCapabilities();\nSystem.out.println(\"is advanced marker enabled?\" + capabilities.isAdvancedMarkersAvailable());\n```\n\n\u003cbr /\u003e\n\nNext steps\n----------\n\n[Create an advanced marker](/maps/documentation/android-sdk/advanced-markers/add-marker)"]]