Files
contao-leaflet-maps/module/assets/js/contao-leaflet.js

24 lines
415 B
JavaScript
Raw Normal View History

2014-12-29 12:17:40 +01:00
L.Contao = L.Class.extend( {
includes: L.Mixin.Events,
maps: {},
addMap: function (id, map) {
this.maps[id] = map;
this.fire('mapadded', { id: id, map: map});
return this;
},
getMap: function (id) {
if (typeof (this.map[id]) === 'undefined') {
return null;
}
return this.map[id]
}
});
window.ContaoLeaflet = new L.Contao();