Skip to content

Commit

Permalink
Merge pull request #1266 from matkoniecz/dogs
Browse files Browse the repository at this point in the history
ask whatever leisure=dog_park is wheelchair accessible [generalize, change icon]
  • Loading branch information
westnordost committed Dec 2, 2018
2 parents fdd5fa5 + 201acd5 commit 19756b0
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 0 deletions.
Expand Up @@ -67,6 +67,7 @@
import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelChairAccessToilets;
import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelchairAccessBusiness;
import de.westnordost.streetcomplete.quests.bench_backrest.AddBenchBackrest;
import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelchairAccessOutside;

@Module
public class QuestModule
Expand Down Expand Up @@ -127,6 +128,7 @@ public class QuestModule
new AddTrafficSignalsSound(o),
new AddRoofShape(o),
new AddWheelChairAccessPublicTransport(o),
new AddWheelchairAccessOutside(o),
new AddTactilePavingBusStop(o),
new AddTactilePavingCrosswalk(o),
new AddWayLit(o),
Expand Down
@@ -0,0 +1,47 @@
package de.westnordost.streetcomplete.quests.wheelchair_access;

import android.os.Bundle;
import android.support.annotation.NonNull;

import java.util.Map;

import javax.inject.Inject;

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;

public class AddWheelchairAccessOutside extends SimpleOverpassQuestType
{
@Inject public AddWheelchairAccessOutside(OverpassMapDataDao overpassServer)
{
super(overpassServer);
}

@Override protected String getTagFilters()
{
return "nodes, ways, relations with leisure=dog_park and !wheelchair";
}

@Override public WheelchairAccessAnswerFragment createForm()
{
return new AddWheelchairAccessOutsideForm();
}

@Override public void applyAnswerTo(Bundle answer, StringMapChangesBuilder changes)
{
String wheelchair = answer.getString(AddWheelchairAccessOutsideForm.ANSWER);
if(wheelchair != null)
{
changes.add("wheelchair", wheelchair);
}
}

@Override public String getCommitMessage() { return "Add wheelchair access to outside places"; }
@Override public int getIcon() { return R.drawable.ic_quest_wheelchair_outside; }
@Override public int getTitle(@NonNull Map<String, String> tags)
{
return R.string.quest_wheelchairAccess_outside_title;
}
}
@@ -0,0 +1,19 @@
package de.westnordost.streetcomplete.quests.wheelchair_access;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import de.westnordost.streetcomplete.R;

public class AddWheelchairAccessOutsideForm extends WheelchairAccessAnswerFragment
{
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View view = super.onCreateView(inflater, container, savedInstanceState);
setContentView(R.layout.quest_wheelchair_outside_explanation);

return view;
}
}
53 changes: 53 additions & 0 deletions app/src/main/res/drawable/ic_quest_wheelchair_outside.xml
@@ -0,0 +1,53 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="34"
android:viewportHeight="34">
<path
android:pathData="m33.87,16.93c0,9.35 -7.58,16.93 -16.93,16.93 -9.35,0 -16.93,-7.58 -16.93,-16.93 0,-9.35 7.58,-16.93 16.93,-16.93 9.35,0 16.93,7.58 16.93,16.93"
android:fillColor="#9bbe55"/>
<path
android:pathData="m21.21,26.58a6.13,6.13 55.15,0 1,-6.24 2.34,6.13 6.13,55.15 0,1 -4.69,-4.73 6.13,6.13 55.15,0 1,2.4 -6.21"
android:strokeLineCap="round"
android:strokeColor="#000"
android:strokeWidth="2.5"
android:strokeAlpha="0.2"/>
<path
android:pathData="m25.4,26.44 l-3.24,-6.59 -5.62,-1.03c0.83,-1.78 1.35,-4.9 1.38,-6.79"
android:strokeLineCap="round"
android:strokeColor="#000"
android:strokeWidth="3"
android:strokeLineJoin="round"
android:strokeAlpha="0.2"/>
<path
android:pathData="m9.86,15.94c1.04,-3.05 3.5,-3.97 8.06,-3.91"
android:strokeLineCap="round"
android:strokeColor="#000"
android:strokeWidth="2.5"
android:strokeLineJoin="round"
android:strokeAlpha="0.2"/>
<path
android:pathData="M20.16,7.24m-2.69,0a2.69,2.69 0,1 1,5.37 0a2.69,2.69 0,1 1,-5.37 0"
android:fillAlpha="0.2"
android:fillColor="#000"/>
<path
android:pathData="m21.21,25.54a6.13,6.13 61.96,0 1,-6.24 2.34,6.13 6.13,55.15 0,1 -4.69,-4.73 6.13,6.13 55.15,0 1,2.4 -6.21"
android:strokeLineCap="round"
android:strokeColor="#fff"
android:strokeWidth="2.5"/>
<path
android:pathData="m25.4,25.4 l-3.24,-6.59 -5.62,-1.03c0.83,-1.78 1.35,-4.9 1.38,-6.79"
android:strokeLineCap="round"
android:strokeColor="#fff"
android:strokeWidth="3"
android:strokeLineJoin="round"/>
<path
android:pathData="m9.86,14.9c1.04,-3.05 3.5,-3.97 8.06,-3.91"
android:strokeLineCap="round"
android:strokeColor="#fff"
android:strokeWidth="2.5"
android:strokeLineJoin="round"/>
<path
android:pathData="M20.16,6.2m-2.69,0a2.69,2.69 0,1 1,5.37 0a2.69,2.69 0,1 1,-5.37 0"
android:fillColor="#fff"/>
</vector>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/quest_wheelchairAccess_limited_description_outside"
android:labelFor="@+id/nameInput"/>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Expand Up @@ -286,6 +286,7 @@ The info you enter is then directly added to the OpenStreetMap in your name, wit
<string name="quest_wheelchairAccess_location_name_title">Is the location %s wheelchair accessible?</string>
<string name="quest_wheelchairAccess_limited">Partially</string>
<string name="quest_wheelchairAccess_limited_description_business">Partially means that there is no more than a single step to access the place and that most rooms inside are wheelchair accessible.</string>
<string name="quest_wheelchairAccess_limited_description_outside">Partially means that there is no more than a single step to access it.</string>
<string name="quest_wheelchairAccess_limited_description_public_transport">Partially means that there is no more than a single step to access it.</string>
<string name="quest_wheelchairAccess_description_toilets">A wheelchair sign like this might be visible if the restroom is accessible.
Partially means that a wheelchair can enter and use the restroom, but no handrail or adapted hand basin is present.</string>
Expand Down Expand Up @@ -622,6 +623,7 @@ Otherwise, you can download another keyboard in the app store. Popular keyboards
<string name="quest_tracktype_grade3">Mixture</string>
<string name="quest_tracktype_grade4">Mostly soft</string>
<string name="quest_tracktype_grade5">Soft</string>
<string name="quest_wheelchairAccess_outside_title">Is this place wheelchair accessible?</string>
<string name="quest_building_underground_name_title">Is %s completely underground?</string>
<string name="quest_building_underground_title">Is this building completely underground?</string>
<string name="quest_traffic_signals_sound_title">Are there sound signals for the blind here?</string>
Expand Down

0 comments on commit 19756b0

Please sign in to comment.