Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
39b8340
#117 version bump
hallahan May 13, 2016
fda469b
#117 #148 Constraints class loading JSON
hallahan May 13, 2016
6ecab23
#117 #148 Instantiate constraints in the 2 places that seem to make s…
hallahan May 14, 2016
af78c06
#117 #148 Some constraints in constraints JSON to get started with
hallahan May 14, 2016
773e791
#117 #148 #21 Cleaner singleton implementation of Constraints, stub f…
hallahan May 16, 2016
23206b9
#117 #148 Closes #21
hallahan May 16, 2016
2ed285d
#117 #148 Closes #21 - Numeric constraint for SelectMultipleTagValueF…
hallahan May 16, 2016
81cb09e
#117 #148, addresses #150, closes #147
hallahan May 16, 2016
aa0ecde
#117 #148 Setup Auto Complete EditText view #52
hallahan May 16, 2016
82655db
#117 #148 #147 Implements auto complete for EditText TagSwipe view
hallahan May 16, 2016
f63a291
#117 #148 Closes #52
hallahan May 17, 2016
7abba18
#117 #148 #37 Improve skip logic constraint JSON
hallahan May 17, 2016
f5ad425
#117 #37 Tapping into tag updates to notify constraints
hallahan May 17, 2016
6d4462e
#117 #137 Turn FragmentPagerAdapter into FragmentStatePagerAdapter
hallahan May 17, 2016
11a3173
#117 #37 Showing removing another tag view, but the fragments don't u…
hallahan May 18, 2016
a632571
#117 #37 Correctly removes fragments dynamically
hallahan May 18, 2016
19e2a66
#117 #37 Keeping track of which tags should be hidden.
hallahan May 19, 2016
bad57d4
#117 #37 Working on the show_if portion of tagShouldBeShown method
hallahan May 19, 2016
8b892a3
#117 #37 Working on hideMap potion of tagShouldBeShown method. the hi…
hallahan May 19, 2016
085d5e7
#117 #37 We actually really do need both types of hash indices. 1: Th…
hallahan May 19, 2016
19be77d
#117 #37 Almost there with hiding things for real.
hallahan May 19, 2016
d45efa4
#117 #37 Actually hiding hide_if elements when the condition arises
hallahan May 19, 2016
778e416
#117 #37 Doesn't show tags that should be hidden upon first load of T…
hallahan May 20, 2016
570ae79
#117 #37 Check for null reference in causeShowMap and causeHideMap - …
hallahan May 20, 2016
9cb8fad
#117 #37 Adds and removes dependent tags properly, but the radio butt…
hallahan May 20, 2016
73b26ac
#117 #37 Fix null reference when finding tags upon delete
hallahan May 20, 2016
1a0c235
#117 #37 Fix incorrect re-toggling of button when view implicitly rel…
hallahan May 20, 2016
78b1e5b
#117 #37 Hide when its time tags that have been explicitly shown due …
hallahan May 20, 2016
d8b7364
#117 #37 If tag edits get taken out and the index of the active view …
hallahan May 20, 2016
898e3df
#117 Closes #20
hallahan May 20, 2016
bfb309e
#117 Closes #151
hallahan May 20, 2016
92fbdee
#151 #17 Added required text view.
hallahan May 20, 2016
92b0ef1
#151 #17 Shows if tag is required based off of constraint.
hallahan May 21, 2016
d46ec1b
#151 #17 Setup UI for complaining about missing tag.
hallahan May 22, 2016
63ab1a8
#151 #17 finding missing tags that are required
hallahan May 23, 2016
74fa243
#151 #17 Required constraint working correctly, fixing a bug with def…
hallahan May 23, 2016
a039f42
#117 #148 zip code should be numeric
hallahan May 23, 2016
23c2bf8
#117 Closes #57
hallahan May 28, 2016
3b0dc8c
#117 Some default JSON for select_multiple #103
hallahan May 28, 2016
b65342a
#151 Select Multiple view shows up based off of select_multiple const…
hallahan May 30, 2016
e064b9e
Closes #142
hallahan May 30, 2016
322847c
Closes #143
hallahan May 30, 2016
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,6 +54,15 @@ public class OSMDataSet {
*/
private List<OSMWay> openWays = new ArrayList<>();

private static Set<String> tagValues = new HashSet<>();

public static void addTagValue(String tagValue) {
tagValues.add(tagValue);
}

public static Set<String> tagValues() {
return tagValues;
}

public OSMDataSet() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ private void readTags(OSMElement el) throws XmlPullParserException, IOException
String k = parser.getAttributeValue(ns, "k");
String v = parser.getAttributeValue(ns, "v");
el.addParsedTag(k, v);
OSMDataSet.addTagValue(v);
// we do this twice, because these are singular nodes that
// function as start and end tags
parser.nextTag();
Expand Down
2 changes: 1 addition & 1 deletion app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
<orderEntry type="library" exported="" name="guava-18.0" level="project" />
<orderEntry type="library" exported="" name="commons-io-2.4" level="project" />
<orderEntry type="library" exported="" name="guava-18.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-urlconnection-2.4.0" level="project" />
<orderEntry type="library" exported="" name="zxing-android-embedded-3.2.0" level="project" />
<orderEntry type="library" exported="" name="cardview-v7-23.1.1" level="project" />
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId "org.redcross.openmapkit"
minSdkVersion 16
targetSdkVersion 21
versionCode 20
versionName "0.20"
versionCode 21
versionName "0.21"
}
buildTypes {
release {
Expand Down
25 changes: 25 additions & 0 deletions app/src/main/assets/constraints/buildings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"addr:city": {
"default": "Sacramento",
"required": true,
"custom_value": true
},
"addr:housenumber": {
"numeric": true
},
"addr:state": {
"default": "CA",
"required": true
},
"addr:street": {
"required": true
},
"building": {
"required": true
},
"name": {
"hide_if": {
"building": "house"
}
}
}
65 changes: 64 additions & 1 deletion app/src/main/assets/constraints/default.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
{
"test": "value1"
"addr:city": {
"default": "Sacramento"
},
"addr:housenumber": {
"numeric": true
},
"addr:state": {
"default": "CA"
},
"addr:postcode": {
"numeric": true
},
"amenity": {
"hide_if": {
"building": "residential",
"shop": true,
"office": true
},
"custom_value": true
},
"building": {
"default": "yes"
},
"building:levels": {
"numeric": true,
"custom_value": true
},
"cuisine": {
"show_if": {
"amenity": true
}
},
"network": {
"select_multiple": true
},
"office": {
"hide_if": {
"amenity": true,
"shop": true
}
},
"opening_hours": {
"select_multiple": true
},
"operator": {
"select_multiple": true,
"custom_value": true
},
"religion": {
"show_if": {
"amenity": "place_of_worship"
}
},
"shop": {
"custom_value": true,
"hide_if": {
"building": "residential",
"amenity": true,
"office": true
}
},
"source": {
"implicit": "survey"
}
}
4 changes: 2 additions & 2 deletions app/src/main/java/org/redcross/openmapkit/Basemap.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void presentBasemapsOptions() {
}

if (basemaps.size() == 0) {
Toast prompt = Toast.makeText(context, "Device is offline. Please add .mbtiles file to " + ExternalStorage.getMBTilesDir() + " or check out a deployment.", Toast.LENGTH_LONG);
Toast prompt = Toast.makeText(context, "No basemap downloaded yet. You may 1) download a deployment, 2) connect to the internet, or 3) add .mbtiles file to " + ExternalStorage.getMBTilesDir() + ".", Toast.LENGTH_LONG);
prompt.show();
return;
}
Expand Down Expand Up @@ -189,7 +189,7 @@ private void selectMBTilesBasemap(String mbtilesPath) {
if(!mbtilesFile.exists()) {
AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);
builder.setTitle("Offline Basemap Not Found");
builder.setMessage("Please add MBTiles to " + ExternalStorage.getMBTilesDir());
builder.setMessage("Please check out a deployment or add MBTiles files to " + ExternalStorage.getMBTilesDir());
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
//placeholder
Expand Down
Loading