diff --git a/server/static/index.html b/server/static/index.html index d804eee..8cd86f9 100644 --- a/server/static/index.html +++ b/server/static/index.html @@ -43,6 +43,7 @@ + diff --git a/server/static/js/main.js b/server/static/js/main.js index 24563fa..00e58a9 100644 --- a/server/static/js/main.js +++ b/server/static/js/main.js @@ -40,6 +40,7 @@ api.getConfig().then(function(cfg){ overlays["Technic Anchor"] = new TechnicAnchorOverlay(wsChannel, layerMgr); overlays["Technic Quarry"] = new TechnicQuarryOverlay(wsChannel, layerMgr); overlays["Protector"] = new ProtectorOverlay(wsChannel, layerMgr); + overlays["Missions"] = new MissionOverlay(wsChannel, layerMgr); //Default enabled overlays map.addLayer(overlays["Player"]); diff --git a/server/static/js/overlays/MissionOverlay.js b/server/static/js/overlays/MissionOverlay.js new file mode 100644 index 0000000..faf708f --- /dev/null +++ b/server/static/js/overlays/MissionOverlay.js @@ -0,0 +1,22 @@ +'use strict'; + +var MissionIcon = L.icon({ + iconUrl: 'pics/mission_32px.png', + + iconSize: [32, 32], + iconAnchor: [16, 16], + popupAnchor: [0, -32] +}); + +var MissionOverlay = AbstractIconOverlay.extend({ + initialize: function(wsChannel, layerMgr) { + AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "mission", MissionIcon); + }, + + createPopup: function(mission){ + return "

Owner: " + mission.attributes.owner + "

" + + "

Name: " + mission.attributes.name + "

" + + "

Successcount: " + mission.attributes.successcount + "

" + + "

Failcount: " + mission.attributes.failcount + "

"; + } +}); diff --git a/server/static/js/overlays/TechnicQuarryOverlay.js b/server/static/js/overlays/TechnicQuarryOverlay.js index b162bea..3a6c300 100644 --- a/server/static/js/overlays/TechnicQuarryOverlay.js +++ b/server/static/js/overlays/TechnicQuarryOverlay.js @@ -13,9 +13,9 @@ var TechnicQuarryOverlay = AbstractIconOverlay.extend({ AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "technicquarry", TechnicQuarryIcon); }, - createPopup: function(lcd){ - return "

Owner: " + lcd.attributes.owner + "

" + - "

Dug: " + lcd.attributes.dug + "

" + - "

Enabled: " + lcd.attributes.enabled + "

"; + createPopup: function(quarry){ + return "

Owner: " + quarry.attributes.owner + "

" + + "

Dug: " + quarry.attributes.dug + "

" + + "

Enabled: " + quarry.attributes.enabled + "

"; } });