GoogleMap.OnMyLocationClickListener
點按「我的位置」點 (代表使用者位置) 時的回呼介面。
公用方法
公用抽象
void
onMyLocationClick
(Location location)
按一下「我的位置」點時呼叫。
系統會在 Android UI 執行緒上呼叫此方法。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-06-16 (世界標準時間)。
[null,null,["上次更新時間:2025-06-16 (世界標準時間)。"],[[["`GoogleMap.OnMyLocationClickListener` is an interface used to handle clicks on the \"My Location\" dot in Google Maps."],["It includes a single method, `onMyLocationClick(Location location)`, which is triggered when the user taps the \"My Location\" dot, providing the current location."],["This method is executed on the Android UI thread, ensuring any UI updates within it are handled safely."]]],["The `GoogleMap.OnMyLocationClickListener` interface provides a callback for when the user's location dot on a Google Map is clicked. The key action is the `onMyLocationClick(Location location)` method, which is invoked when the dot is clicked. This method, executed on the UI thread, provides the current `Location` of the user, represented by the clicked dot.\n"]]