1
0
forked from MTSR/mapserver
mapserver/server/static/js/overlays/LuacontrollerOverlay.js
2019-04-04 10:49:55 +02:00

36 lines
837 B
JavaScript

/* exported LuacontrollerOverlay */
/* globals AbstractIconOverlay: true */
var LuacontrollerIcon = L.icon({
iconUrl: 'pics/jeija_luacontroller_top.png',
iconSize: [16, 16],
iconAnchor: [8, 8],
popupAnchor: [0, -16]
});
var LuacontrollerBurntIcon = L.icon({
iconUrl: 'pics/jeija_luacontroller_burnt_top.png',
iconSize: [16, 16],
iconAnchor: [8, 8],
popupAnchor: [0, -16]
});
var LuacontrollerOverlay = AbstractIconOverlay.extend({
initialize: function(wsChannel, layerMgr) {
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "luacontroller");
},
getIcon: function(ctrl){
if (ctrl.burnt)
return LuacontrollerBurntIcon;
else
return LuacontrollerIcon;
},
createPopup: function(ctrl){
return "<pre>" + ctrl.attributes.code + "</pre>";
}
});