forked from Snck3rs/contao-leaflet-maps
Ongoing development.
This commit is contained in:
23
module/assets/js/contao-leaflet.js
Normal file
23
module/assets/js/contao-leaflet.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user