npmap.js
Version:
A JavaScript web mapping library, built as a Leaflet plugin, for the National Park Service.
30 lines (22 loc) • 610 B
JavaScript
/* globals L */
;
var Module = L.Class.extend({
initialize: function(options) {
var content, title
this._container = document.createElement('div');
content = L.DomUtil.create('div', 'content', this._container);
content.innerHTML = options.content;
title = L.DomUtil.create('h2', 'title', this._container);
title.innerHTML = options.title;
// TODO: Also add button.
return this._container;
},
addTo: function(map) {
this._map = map;
console.log(map);
return this;
}
});
module.exports = function(options) {
return new Module(options);
};