Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8854bc5
street furniture overlay
matkoniecz Oct 12, 2023
cc83416
add hiunting stand
matkoniecz Nov 14, 2023
c8a486f
remove unused method
westnordost Nov 14, 2023
d3f3861
fix typo
matkoniecz Nov 15, 2023
28a65a4
refactoring popular shops
matkoniecz Nov 15, 2023
bdca6cc
add amenity=bicycle_wash
matkoniecz Nov 15, 2023
721e642
lifecycle prefix handler
matkoniecz Nov 15, 2023
9e01dd1
try to reconstruct from lifecycle prefix
matkoniecz Nov 15, 2023
e90acba
simplify syntax
matkoniecz Nov 15, 2023
d3149f6
fix syntax error
matkoniecz Nov 15, 2023
c217e9d
add values from systematic taginfo review
matkoniecz Nov 19, 2023
cbfa267
better marker
matkoniecz Nov 19, 2023
c7a289c
group strings
matkoniecz Nov 19, 2023
aa0014f
support table_soccer tables
matkoniecz Nov 23, 2023
53ae3ae
move unit test
westnordost Nov 23, 2023
5de8a9f
use bench as overlay icon
westnordost Nov 23, 2023
9129808
remove unnecessary suspend function
westnordost Nov 23, 2023
181b578
Merge branch 'master' into street_furniture
westnordost Nov 23, 2023
228bfd1
use "plus" icon for adding a street furniture poi
westnordost Nov 23, 2023
79a3c7c
Features without a dedicated icon shall fall back to a generic marker…
westnordost Nov 23, 2023
ef3ff23
remove duplicate
westnordost Nov 23, 2023
99b3c6a
add comments about the number of usages
westnordost Nov 23, 2023
1f6e108
Merge remote-tracking branch 'upstream/master' into street_furniture
matkoniecz Nov 27, 2023
c17951a
fix broken prefix
matkoniecz Nov 27, 2023
165a784
fix map display
matkoniecz Dec 5, 2023
49e4c47
better handle objects not in presets
matkoniecz Dec 5, 2023
8d636db
Merge remote-tracking branch 'upstream/master' into street_furniture
matkoniecz Dec 5, 2023
ca95588
man mades together
matkoniecz Dec 5, 2023
4243ef2
show also natural=spring as other water source features are shown
matkoniecz Dec 5, 2023
1e94454
Merge branch 'master' into street_furniture
matkoniecz Feb 4, 2024
dc238ff
fix merge
westnordost Feb 4, 2024
15e2dd9
refactor handling of disused
westnordost Feb 5, 2024
917d05c
sort features alphabetically (consistent with Shop.kt)
westnordost Feb 5, 2024
2db50bf
for added features, the geometry type is always POINT
westnordost Feb 7, 2024
6eb6ddf
Extend "shops" category to "places" category (fixes #5152)
westnordost Feb 7, 2024
ab4aed4
add many street furniture POIs
westnordost Feb 7, 2024
29db166
rename Shop to Place
westnordost Feb 7, 2024
3d547fe
review list of quick-select features
westnordost Feb 7, 2024
06fcff1
reorder overlays so that street furniture is next to shops
westnordost Feb 7, 2024
566d0a5
add delete node answer
westnordost Feb 13, 2024
732cc93
include a few more things
westnordost Feb 13, 2024
46dbb6f
do not allow editing features
westnordost Feb 14, 2024
46909c0
add playground equipment
westnordost Feb 14, 2024
9ec2e55
use dot icon
westnordost Feb 14, 2024
693307e
rename StreetFurniture to "Thing"
westnordost Feb 14, 2024
6521238
rename StreetFurniture to "Thing"
westnordost Feb 14, 2024
13bf845
simplify edit creation (because modification of feature is disabled)
westnordost Feb 14, 2024
f9c956a
remove unused imports
westnordost Feb 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ interface OsmElementQuestType<T> : QuestType, ElementEditType {
* elements that are expected to be some kind of shop/amenity should be replaceable this way,
* i.e. anything that when it's gone, there is a vacant shop then.
* */
val isReplaceShopEnabled: Boolean get() = false
val isReplacePlaceEnabled: Boolean get() = false

override val title: Int get() = getTitle(emptyMap())

Expand Down
21 changes: 21 additions & 0 deletions app/src/main/java/de/westnordost/streetcomplete/osm/Lifecycle.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package de.westnordost.streetcomplete.osm

import de.westnordost.streetcomplete.data.osm.mapdata.Element
import de.westnordost.streetcomplete.util.ktx.copy

/** Returns a copy of this element with all tags prefixed with the given [lifecycle] prefix moved
* to normal tags space and all others cleared.
* Returns `null` if the element has no tags with the given [lifecycle] prefix
*
* E.g. when calling this method with [lifecycle] = "disused" for an element with the tags
* `building=yes` + `disused:shop=yes` , a copy of that element is returned with the only tag
* `shop=yes`. */
fun Element.asIfItWasnt(lifecycle: String): Element? =
if (tags.hasPrefixed(lifecycle)) copy(tags = tags.getPrefixedOnly(lifecycle)) else null

private fun Map<String, String>.hasPrefixed(prefix: String): Boolean =
any { it.key.startsWith("$prefix:") }

private fun Map<String, String>.getPrefixedOnly(prefix: String): Map<String, String> = this
.filter { it.key.startsWith("$prefix:") }
.mapKeys { it.key.substring(prefix.length + 1) }
Loading