forked from MTSR/mapserver
technic anchor overlay
This commit is contained in:
parent
e8c35a4089
commit
386ad832c3
@ -40,6 +40,7 @@
|
||||
<script src="js/overlays/LcdOverlay.js"></script>
|
||||
<script src="js/overlays/DigitermOverlay.js"></script>
|
||||
<script src="js/overlays/LuacontrollerOverlay.js"></script>
|
||||
<script src="js/overlays/TechnicAnchorOverlay.js"></script>
|
||||
|
||||
<!-- bootstrap -->
|
||||
<script src="js/main.js"></script>
|
||||
|
@ -36,6 +36,7 @@ api.getConfig().then(function(cfg){
|
||||
overlays["Digilines LCD"] = new LcdOverlay(wsChannel, layerMgr);
|
||||
overlays["Digiterms"] = new DigitermOverlay(wsChannel, layerMgr);
|
||||
overlays["Lua Controller"] = new LuacontrollerOverlay(wsChannel, layerMgr);
|
||||
overlays["Technic Anchor"] = new TechnicAnchorOverlay(wsChannel, layerMgr);
|
||||
//overlays["Protector"] = new ProtectorOverlay(wsChannel, layerMgr);
|
||||
|
||||
//Default enabled overlays
|
||||
|
22
server/static/js/overlays/TechnicAnchorOverlay.js
Normal file
22
server/static/js/overlays/TechnicAnchorOverlay.js
Normal file
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var TechnicAnchorIcon = L.icon({
|
||||
iconUrl: 'pics/technic_admin_anchor.png',
|
||||
|
||||
iconSize: [32, 32],
|
||||
iconAnchor: [16, 16],
|
||||
popupAnchor: [0, -32]
|
||||
});
|
||||
|
||||
var TechnicAnchorOverlay = AbstractIconOverlay.extend({
|
||||
initialize: function(wsChannel, layerMgr) {
|
||||
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "luacontroller", TechnicAnchorIcon);
|
||||
},
|
||||
|
||||
createPopup: function(lcd){
|
||||
return "<p>Owner: " + lcd.attributes.owner + "</p>" +
|
||||
"<p>Radius: " + lcd.attributes.radius + "</p>" +
|
||||
"<p>Locked: " + lcd.attributes.locked + "</p>" +
|
||||
"<p>Enabled: " + lcd.attributes.enabled + "</p>";
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user