Code Enhancement (Explore Map) (#6293)
Some checks are pending
Android CI / Run tests and generate APK (push) Waiting to run

* Exclude past locations (P585) from Nearby query

* "Send" button text should be white

* Custom picker: logic

* Revert back changes

* Enhancement :- Explore Map information

* Enhancement :- Explore Map information

* Style

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
Khushbu Khemchandani 2025-04-21 11:19:15 +05:30 committed by GitHub
parent ed42d85f67
commit 7479d96675
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 6 deletions

View file

@ -717,8 +717,20 @@ public class ExploreMapFragment extends CommonsDaggerSupportFragment
authorUser = Html.fromHtml(authorUser, Html.FROM_HTML_MODE_LEGACY).toString();
}
OverlayItem item = new OverlayItem(nearbyBaseMarker.getPlace().name,
authorUser, point);
String title = nearbyBaseMarker.getPlace().name;
// Remove "File:" if present at start
if (title.startsWith("File:")) {
title = title.substring(5);
}
// Remove extensions like .jpg, .jpeg, .png, .svg (case insensitive)
title = title.replaceAll("(?i)\\.(jpg|jpeg|png|svg)$", "");
title = title.replace("_", " ");
//Truncate if too long because it doesn't fit the screen
if (title.length() > 43) {
title = title.substring(0, 40) + "";
}
OverlayItem item = new OverlayItem(title, authorUser, point);
item.setMarker(d);
items.add(item);
ItemizedOverlayWithFocus overlay = new ItemizedOverlayWithFocus(items,