1
0
forked from MTSR/mapserver
mapserver/server/static/js/overlays/LuacontrollerOverlay.js

36 lines
837 B
JavaScript
Raw Normal View History

2019-04-04 11:49:55 +03:00
/* exported LuacontrollerOverlay */
/* globals AbstractIconOverlay: true */
2019-02-08 12:07:59 +03:00
var LuacontrollerIcon = L.icon({
iconUrl: 'pics/jeija_luacontroller_top.png',
iconSize: [16, 16],
2019-02-08 12:07:59 +03:00
iconAnchor: [8, 8],
popupAnchor: [0, -16]
});
2019-02-15 16:43:07 +03:00
var LuacontrollerBurntIcon = L.icon({
iconUrl: 'pics/jeija_luacontroller_burnt_top.png',
iconSize: [16, 16],
2019-02-15 16:43:07 +03:00
iconAnchor: [8, 8],
popupAnchor: [0, -16]
});
2019-02-08 12:07:59 +03:00
var LuacontrollerOverlay = AbstractIconOverlay.extend({
initialize: function(wsChannel, layerMgr) {
2019-02-15 16:43:07 +03:00
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "luacontroller");
},
getIcon: function(ctrl){
if (ctrl.burnt)
return LuacontrollerBurntIcon;
2019-02-15 19:53:32 +03:00
else
return LuacontrollerIcon;
2019-02-08 12:07:59 +03:00
},
2019-02-15 16:43:07 +03:00
createPopup: function(ctrl){
return "<pre>" + ctrl.attributes.code + "</pre>";
2019-02-08 12:07:59 +03:00
}
});