public List<SearchResult> searchByObjectName(String name){
  List<SearchResult> all=new ArrayList<>();
  for (  Layer layer : layers) {
    if (isLayerVisible(layer)) {
      all.addAll(layer.searchByObjectName(name));
    }
  }
  Log.d(TAG,"Got " + all.size() + " results in total for "+ name);
  return all;
}

public List < SearchResult > searchByObjectName ( String name ) { List < SearchResult > all = new ArrayList < > ( ) ; for ( Layer layer : layers ) { if ( isLayerVisible ( layer ) ) { all . addAll ( layer . searchByObjectName ( name ) ) ; } } Log . d ( TAG , "Got " + all . size ( ) + " results in total for " + name ) ; return all ; }
search all visible layers for an object with the given name .
