Googlemap.OnMyLocationbuttonClickListener
ממשק התקשרות חזרה עבור לחיצה על הלחצן 'המיקום שלי'.
שיטות ציבוריות
מופעלת בעקבות לחיצה על לחצן המיקום שלי.
ההגדרה הזו נקראת ב-thread של ממשק המשתמש ב-Android.
אם צריך לאתר את המיקום הנוכחי של המשתמש, צריך להשתמש ב-com.google.android.gms.location.FusedLocationProviderApi.
החזרות
true
אם ה-listener צרך את האירוע (כלומר, התנהגות ברירת המחדל
לא אמורה להתרחש). false
אחרת (כלומר, ההתנהגות המוגדרת כברירת מחדל אמורה להתרחש). ההתנהגות
שמוגדרת כברירת מחדל היא הזזת המצלמה כך שהיא תהיה במרכז המיקום של המשתמש.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-13 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-13 (שעון UTC)."],[[["`GoogleMap.OnMyLocationButtonClickListener` is an interface used to handle clicks on the \"My Location\" button within a Google Map."],["The primary method, `onMyLocationButtonClick()`, is called when the button is clicked and allows custom actions to be performed before or instead of the default camera movement."],["Returning `true` from `onMyLocationButtonClick()` prevents the default behavior (centering the camera on the user's location), while returning `false` allows it."]]],["The `GoogleMap.OnMyLocationButtonClickListener` interface triggers the `onMyLocationButtonClick()` method when the \"My Location\" button is pressed. This method, executed on the UI thread, allows developers to handle the event. Returning `true` prevents the default camera movement to the user's location, while `false` allows it. For retrieving the user's location, the `FusedLocationProviderApi` is recommended.\n"]]