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

stop duplicating office lists, use full list in each quest [ready for review] #1522

Merged
merged 3 commits into from
Aug 19, 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 @@ -22,4 +22,13 @@ public class OsmTaggings
};

public static final String SURVEY_MARK_KEY = "check_date";

public static final String[] OFFICES_VISITED_BY_GENERAL_PUBLIC = {
"insurance", "government", "travel_agent", "tax_advisor", "therapist", "religion",
"lawyer", "estate_agent", "political_party"
};

public static final String[] OFFICES_WITH_WALK_IN_BY_GENERAL_PUBLIC = {
"insurance", "government", "travel_agent", "tax_advisor", "religion"
};
westnordost marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.westnordost.streetcomplete.quests.opening_hours

import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.meta.OsmTaggings
import de.westnordost.streetcomplete.data.osm.SimpleOverpassQuestType
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder
Expand Down Expand Up @@ -39,9 +40,7 @@ class AddOpeningHours (o: OverpassMapDataDao) : SimpleOverpassQuestType<OpeningH
"miniature_golf", "bowling_alley", "horse_riding", "amusement_arcade",
"adult_gaming_centre", "tanning_salon"
),
"office" to arrayOf(
"insurance", "government", "estate_agent", "travel_agent", "religion"
)
"office" to OsmTaggings.OFFICES_WITH_WALK_IN_BY_GENERAL_PUBLIC
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
" )" +
" and !opening_hours and name and opening_hours:signed != no" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import de.westnordost.osmapi.map.data.BoundingBox
import de.westnordost.osmapi.map.data.Element
import de.westnordost.osmfeatures.FeatureDictionary
import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.meta.OsmTaggings
import de.westnordost.streetcomplete.data.osm.OsmElementQuestType
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder
import de.westnordost.streetcomplete.data.osm.download.MapDataWithGeometryHandler
Expand Down Expand Up @@ -47,9 +48,7 @@ class AddPlaceName(
"water_park", "miniature_golf", "stadium", "marina", "bowling_alley",
"amusement_arcade", "adult_gaming_centre", "tanning_salon", "horse_riding"
),
"office" to arrayOf(
"insurance", "estate_agent", "travel_agent"
)
"office" to OsmTaggings.OFFICES_VISITED_BY_GENERAL_PUBLIC
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
")"
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.westnordost.streetcomplete.quests.wheelchair_access

import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.meta.OsmTaggings
import de.westnordost.streetcomplete.data.osm.SimpleOverpassQuestType
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao
Expand Down Expand Up @@ -32,10 +33,7 @@ class AddWheelchairAccessBusiness(o: OverpassMapDataDao) : SimpleOverpassQuestTy
"bowling_alley", "horse_riding", "sports_centre", "fitness_centre",
"amusement_arcade", "adult_gaming_centre", "tanning_salon"
),
"office" to arrayOf(
"insurance", "government", "lawyer", "estate_agent", "political_party", "travel_agent",
"tax_advisor", "therapist", "religion"
)
"office" to OsmTaggings.OFFICES_VISITED_BY_GENERAL_PUBLIC
).map { it.key + " ~ " + it.value.joinToString("|") }.joinToString(" or ") +
" )" +
" and !wheelchair and name"
Expand Down