Leaflet/Leaflet.label — pull request #60 by crrobinson14 (2013-12-16 18:58:07+00:00)
Title: Allow center-position of Labels

This pull request adds a 'center' option for 'position' that shifts the Label half its width rather than all or none of it. This can be used to horizontally center a Label, e.g. by:

```
var mapCenter = map.getCenter();
var label = new L.Label({
classname: 'heading',
direction: 'center',
offset: [0, 0]
});
label.setContent('My Heading');
label.setLatLng([51.6, mapCenter.lng]);
map.showLabel(label);
```

The vertical position is still up to the caller - Label only calculates its width, not its height.