Skip to content

Commit

Permalink
Limit tactile pavings to set of countries, fixes streetcomplete#750
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoniecz committed Feb 2, 2018
1 parent 5e161a6 commit cad93ca
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.inject.Inject;

import de.westnordost.streetcomplete.R;
import de.westnordost.streetcomplete.data.osm.Countries;
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 @@ -44,4 +45,15 @@ public void applyAnswerTo(Bundle answer, StringMapChangesBuilder changes)
if(hasName) return R.string.quest_tactilePaving_title_name_bus;
else return R.string.quest_tactilePaving_title_bus;
}

@Override public Countries getEnabledForCountries()
{
return Countries.noneExcept(new String[]
{
// areas based on research
"CN-91", "SG", "AU", "NZ",
// generated from OSM data
"DE", "CH", "GB", "IE", "JP", "ES", "FR", "NL", "US-GA",
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.inject.Inject;

import de.westnordost.streetcomplete.R;
import de.westnordost.streetcomplete.data.osm.Countries;
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 @@ -42,4 +43,16 @@ public void applyAnswerTo(Bundle answer, StringMapChangesBuilder changes)
{
return R.string.quest_tactilePaving_title_crosswalk;
}

@Override public Countries getEnabledForCountries()
{
return Countries.noneExcept(new String[]
{
// areas based on research
"CN-91", "SG", "AU", "NZ", "PL",
// generated from OSM data
"SK", "AT", "HU", "DE", "CZ", "BE", "SE", "GB", "IE",
"US", "AR", "ES", "CA", "FR", "NL", "RU-MOW",
});
}
}

0 comments on commit cad93ca

Please sign in to comment.