Nearby: Markers now show place via pin base (#6090)

This commit is contained in:
Tanmay Gupta 2024-12-29 12:16:29 +05:30 committed by GitHub
parent 46cefa4899
commit d2751595cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1870,7 +1870,8 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
place.getLongDescription()) : place.getLongDescription());
}
marker.setTextLabelFontSize(40);
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_TOP);
// anchorV is 21.707/28.0 as icon height is 28dp while the pin base is at 21.707dp from top
marker.setAnchor(Marker.ANCHOR_CENTER, 0.77525f);
marker.setOnMarkerClickListener((marker1, mapView) -> {
if (clickedMarker != null) {
clickedMarker.closeInfoWindow();