diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt index a553b4cf01..6742eda562 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt @@ -18,7 +18,10 @@ class RoadNameSuggestionsSource( fun getNames(points: List, maxDistance: Double): List> { if (points.isEmpty()) return emptyList() - val bbox = points.enclosingBoundingBox().enlargedBy(maxDistance) + /* add 50m radius for bbox query because roads will only be included in the result that have + at least one node in the bounding box around the tap position. This is a problem for long + straight roads (#3797). This doesn't completely solve this issue but mitigates it */ + val bbox = points.enclosingBoundingBox().enlargedBy(maxDistance + 50) val mapData = mapDataSource.getMapDataWithGeometry(bbox) val roadsWithNames = mapData.ways.filter { it.isRoadWithName() }