Below is a view of a Spanish American War-era U.S. Navy midshipman's dress coat. The uniform is a dark blue wool, double-breasted coat, with two rows of nine buttons. At the collar is a foul anchor in gold, signifying the rank of midshipman. On the cuff is a single line of gold bullion, also signifying the rank of mishipman or ensign.
Below is an image of Ensign Worth Bagley, the only U.S. naval officer killed in the Spanish American War, wearing a similar uniform. Bagley was serving aboard the WINSLOW. Since the photo is not in color, we cannot tell if the uniform is that of an ensign or midshipman (the ensign's uniform having the collar anchor in silver rather than gold).
1897 Navy Clothing Regulations.
Cohen, Stan, Images of the Spanish American War, April - August, 1898. (Missoula: Pictorial Histoires Publiching Co., Inc., 1997) 90.