public String urlForPOISearch(String tag,BoundingBox bb,int limit,int timeout){
  StringBuilder s=new StringBuilder();
  s.append(mService + "?data=");
  String sBB="(" + bb.getLatSouth() + ","+ bb.getLonWest()+ ","+ bb.getLatNorth()+ ","+ bb.getLonEast()+ ")";
  String data="[out:json][timeout:" + timeout + "];("+ "node["+ tag+ "]"+ sBB+ ";"+ "way["+ tag+ "]"+ sBB+ ";"+ "relation["+ tag+ "]"+ sBB+ ";"+ ");out qt center "+ limit+ " tags;";
  Log.d(BonusPackHelper.LOG_TAG,"data=" + data);
  s.append(URLEncoder.encode(data));
  return s.toString();
}

public String urlForPOISearch ( String tag , BoundingBox bb , int limit , int timeout ) { StringBuilder s = new StringBuilder ( ) ; s . append ( mService + "?data=" ) ; String sBB = "(" + bb . getLatSouth ( ) + "," + bb . getLonWest ( ) + "," + bb . getLatNorth ( ) + "," + bb . getLonEast ( ) + ")" ; String data = "[out:json][timeout:" + timeout + "];(" + "node[" + tag + "]" + sBB + ";" + "way[" + tag + "]" + sBB + ";" + "relation[" + tag + "]" + sBB + ";" + ");out qt center " + limit + " tags;" ; Log . d ( BonusPackHelper . LOG_TAG , "data=" + data ) ; s . append ( URLEncoder . encode ( data ) ) ; return s . toString ( ) ; }
build the url to search for elements having a specific osm tag ( key = value ) , within a bounding box . elements will be osm nodes , ways and relations . ways and relations will have no geometry , only their center . < br > usage : urlforpoisearch ( " amenity = cinema " , map . getboundingbox ( ) , 200 , 30 ) ; < br >
