VANCOUVER — An earthquake with a preliminary magnitude of 5.1 has shaken Vancouver, Victoria and other cites on B.C.'s southwest coast.