Source
style: 'position: absolute; z-index: 1; background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat',
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
ZABBIX.namespace('classes.Observer');
ZABBIX.classes.Observer = (function() {
var Observer = function() {
this.listeners = {};
};
Observer.prototype = {
constructor: ZABBIX.classes.Observer,
bind: function(event, callback) {
var i;
if (typeof callback === 'function') {
event = ('' + event).toLowerCase().split(/\s+/);
for (i = 0; i < event.length; i++) {
if (this.listeners[event[i]] === void(0)) {
this.listeners[event[i]] = [];
}
this.listeners[event[i]].push(callback);
}
}
return this;
},
trigger: function(event, target) {
event = event.toLowerCase();
var handlers = this.listeners[event] || [],
i;
if (handlers.length) {
event = jQuery.Event(event);
for (i = 0; i < handlers.length; i++) {
try {
if (handlers[i](event, target) === false || event.isDefaultPrevented()) {
break;
}
}
catch(ex) {
window.console && window.console.log && window.console.log(ex);
}
}
}
return this;
}
};
Observer.makeObserver = function(object) {
var i;
for (i in Observer.prototype) {
if (Observer.prototype.hasOwnProperty(i) && typeof Observer.prototype[i] === 'function') {
object[i] = Observer.prototype[i];
}
}
object.listeners = {};
};
return Observer;
}());
ZABBIX.namespace('apps.map');
ZABBIX.apps.map = (function($) {
// dependencies
var Observer = ZABBIX.classes.Observer;
const ZBX_STYLE_DEFAULT_OPTION = 'default-option';
function createMap(containerId, mapData) {