Skip to content

Commit d275159

Browse files
authored
Nearby: Markers now show place via pin base (commons-app#6090)
1 parent 46cefa4 commit d275159

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,8 @@ public Marker convertToMarker(Place place, boolean isBookMarked) {
18701870
place.getLongDescription()) : place.getLongDescription());
18711871
}
18721872
marker.setTextLabelFontSize(40);
1873-
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_TOP);
1873+
// anchorV is 21.707/28.0 as icon height is 28dp while the pin base is at 21.707dp from top
1874+
marker.setAnchor(Marker.ANCHOR_CENTER, 0.77525f);
18741875
marker.setOnMarkerClickListener((marker1, mapView) -> {
18751876
if (clickedMarker != null) {
18761877
clickedMarker.closeInfoWindow();

0 commit comments

Comments
 (0)