CloudMade/Leaflet — pull request #891 by psla (2012-08-10 14:08:58+00:00)
Title: Added Text layer which contains provided text centered around given point

This layer adds possibility to insert texts (actually - any other DOM object might be inserted as well).

This code is pretty much reduntant (what you have already noticed). Methods onAdd, onRemove, bringToFront, bringToBack could be extracted in most cases in future.