Agreed, though I'd pick Hammett by a hair, given how much Chandler owed to him. And The Maltese Falcon is THE detective novel IMO.
Contemporary-wise, I'd personally go with T. Jefferson Parker as best detective novelist currently working, although he's a bit uneven (maybe because he mostly does stand-alone novels). But Silent Joe and Laguna Heat are as good as any detective novel I've read in the last twenty years.
All-time, it's gotta be Doyle's Sherlock Holmes, who seems never to have gone away. Love the new BBC series, for example.
It is extremely hard to choose between Hammett and Chandler and I will give you that Chandler and every other writer of detective fiction in the world owes Hammett a huge debt. But honestly The Lady in the Lake
and Farewell, My Lovely
are soooo good, that I can't admit that even Hammett was better. All-time, yes Doyle's Holmes was the quintessential detective.
ETA: My own favorite Hammett novel is Red Harvest
. I really do consider it Hammett's best work. It is one of the greatest novels ever written about the abuse of power and the casual viciousness of the language is classic Hammett.