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) {
|
2015-01-06 14:55:12 +01:00
|
|
|
if (typeof (this.maps[id]) === 'undefined') {
|
2014-12-29 12:17:40 +01:00
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-06 14:55:12 +01:00
|
|
|
return this.maps[id];
|
2014-12-29 12:17:40 +01:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2015-01-06 14:55:12 +01:00
|
|
|
L.Icon.Default.imagePath = 'system/modules/leaflet/assets/leaflet/leaflet/images';
|
|
|
|
|
|
2014-12-29 12:17:40 +01:00
|
|
|
window.ContaoLeaflet = new L.Contao();
|