I'm using Mapbox, which is based on Leaflet.js to generate my maps. I'm trying to add a layer group to my map. But every time I call .addTo(map), I get
Uncaught TypeError: Object [object Object] has no method 'on'
My code is as follows:
map = L.mapbox.map("map", "dannyvaughton.map-lmwtrr8k").setView([54.4, 0.43], 14)
markers = new L.LayerGroup().addTo(map)
Thanks.