@@ -0,0 +1,857 @@
+package org.azavea.otm.filters;%0A%0Aimport org.azavea.otm.R;%0Aimport org.azavea.otm.data.Species;%0Aimport org.json.JSONException;%0A%0Aimport android.view.View;%0A%0Apublic class SpeciesFilter extends BaseFilter %7B%0A%09public Species species = null;%0A%09%0A%09public SpeciesFilter(String key, String name) %7B%0A%09%09this.key = key;%0A%09%09this.label = name;%09%0A%09%7D%0A%09%0A%09@Override%0A%09public boolean isActive() %7B%0A%09%09return species != null;%0A%09%7D%0A%0A%09@Override%0A%09public void updateFromView(View view) %7B%0A%09%09Object species = view.getTag(R.id.species_id);%0A%09%09if (species != null) %7B%0A%09%09%09this.species = (Species)species;%0A%09%09%7D else %7B%0A%09%09%09this.species = null;%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public String toQueryStringParam() %7B%0A%09%09try %7B%0A%09%09%09return isActive() ? key + %22=%22 + species.getId() : %22%22;%0A%09%09%7D catch (JSONException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%09return %22%22;%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public void clear() %7B%0A%09%09this.species = null;%0A%09%7D%0A%0A%7D%0A

Add species filter