constructing legends from web services when applicable