GoogleMap.OnMyLocation')}>
Antarmuka callback saat titik Lokasiku (yang menandakan lokasi pengguna) diklik.
Metode Publik
abstrak
publik
void
onMyLocationClick
(Lokasi lokasi)
Dipanggil saat titik Lokasiku diklik.
Fungsi ini dipanggil di UI thread Android.
Parameter
lokasi |
Lokasi titik Lokasiku saat ini.
|
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-16 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-16 UTC."],[[["`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"]]