An enzyme that catalyzes the methylation of glycine using s-adenosylmethionine to form sarcosine with the concomitant production of s-adenosylhomocysteine.