legend.js | |
---|---|
wax = wax || {};
wax.mm = wax.mm || {}; | |
Legend ControlThe Modest Maps version of this control is a very, very
light wrapper around the | wax.mm.legend = function(map, tilejson) {
tilejson = tilejson || {};
var l, // parent legend
legend = {};
legend.add = function() {
l = wax.legend()
.content(tilejson.legend || '');
return this;
};
legend.element = function() {
return l.element();
};
legend.appendTo = function(elem) {
wax.util.$(elem).appendChild(l.element());
return this;
};
return legend.add();
};
|