Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ask about footway part of segregated way #1544

Merged
merged 3 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import de.westnordost.streetcomplete.quests.segregated.AddCyclewaySegregation;
import de.westnordost.streetcomplete.quests.sidewalk.AddSidewalk;
import de.westnordost.streetcomplete.quests.surface.AddCyclewayPartSurface;
import de.westnordost.streetcomplete.quests.surface.AddFootwayPartSurface;
import de.westnordost.streetcomplete.quests.surface.AddPathSurface;
import de.westnordost.streetcomplete.quests.tactile_paving.AddTactilePavingBusStop;
import de.westnordost.streetcomplete.quests.tactile_paving.AddTactilePavingCrosswalk;
Expand Down Expand Up @@ -164,6 +165,7 @@ public class QuestModule
// ↓ 8. defined in the wiki, but not really used by anyone yet. Just collected for
// the sake of mapping it in case it makes sense later
new AddCyclewayPartSurface(o),
new AddFootwayPartSurface(o),
new AddMotorcycleParkingCover(o),
new AddFireHydrantType(o),
new AddParkingType(o),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package de.westnordost.streetcomplete.quests.surface

import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.osm.SimpleOverpassQuestType
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao

class AddFootwayPartSurface(o: OverpassMapDataDao) : SimpleOverpassQuestType<String>(o) {

override val tagFilters = """
ways with highway ~ path|footway|cycleway|bridleway and surface = paved and foot ~ designated|yes and segregated=yes
and !footway:surface and !surface:footway
"""
override val commitMessage = "Add path surfaces"
override val icon = R.drawable.ic_quest_footway_surface

override fun getTitle(tags: Map<String, String>) = R.string.quest_footwayPartSurface_title

override fun createForm() = AddPathSurfaceForm()

override fun applyAnswerTo(answer: String, changes: StringMapChangesBuilder) {
changes.add("footway:surface", answer)
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -672,4 +672,5 @@ Otherwise, you can download another keyboard in the app store. Popular keyboards
<string name="about_missing_stars">Currently, the star count is not shared across devices, but answers are added directly to the OpenStreetMap database.</string>
<string name="how_to_get_stars">Choose one of the markers on the map and answer the question. This way you will improve OpenStreetMap data and get stars. If you see no markers you may need to zoom out the map.</string>
<string name="quest_cyclewayPartSurface_title">What\'s the surface of the cycleway here?</string>
<string name="quest_footwayPartSurface_title">What\'s the surface of the footway here?</string>
</resources>