1
0
forked from MTSR/mapserver

technic anchor overlay

This commit is contained in:
NatureFreshMilk 2019-02-08 10:13:27 +01:00
parent e8c35a4089
commit 386ad832c3
3 changed files with 24 additions and 0 deletions

View File

@ -40,6 +40,7 @@
<script src="js/overlays/LcdOverlay.js"></script> <script src="js/overlays/LcdOverlay.js"></script>
<script src="js/overlays/DigitermOverlay.js"></script> <script src="js/overlays/DigitermOverlay.js"></script>
<script src="js/overlays/LuacontrollerOverlay.js"></script> <script src="js/overlays/LuacontrollerOverlay.js"></script>
<script src="js/overlays/TechnicAnchorOverlay.js"></script>
<!-- bootstrap --> <!-- bootstrap -->
<script src="js/main.js"></script> <script src="js/main.js"></script>

View File

@ -36,6 +36,7 @@ api.getConfig().then(function(cfg){
overlays["Digilines LCD"] = new LcdOverlay(wsChannel, layerMgr); overlays["Digilines LCD"] = new LcdOverlay(wsChannel, layerMgr);
overlays["Digiterms"] = new DigitermOverlay(wsChannel, layerMgr); overlays["Digiterms"] = new DigitermOverlay(wsChannel, layerMgr);
overlays["Lua Controller"] = new LuacontrollerOverlay(wsChannel, layerMgr); overlays["Lua Controller"] = new LuacontrollerOverlay(wsChannel, layerMgr);
overlays["Technic Anchor"] = new TechnicAnchorOverlay(wsChannel, layerMgr);
//overlays["Protector"] = new ProtectorOverlay(wsChannel, layerMgr); //overlays["Protector"] = new ProtectorOverlay(wsChannel, layerMgr);
//Default enabled overlays //Default enabled overlays

View 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>";
}
});