forked from MTSR/mapserver
bones overlay
This commit is contained in:
parent
627a8f4ef2
commit
c9e1b268fb
@ -36,6 +36,7 @@
|
||||
<script src="js/overlays/PoiOverlay.js"></script>
|
||||
<script src="js/overlays/PlayerOverlay.js"></script>
|
||||
<script src="js/overlays/ProtectorOverlay.js"></script>
|
||||
<script src="js/overlays/BonesOverlay.js"></script>
|
||||
|
||||
<!-- bootstrap -->
|
||||
<script src="js/main.js"></script>
|
||||
|
@ -32,9 +32,12 @@ api.getConfig().then(function(cfg){
|
||||
overlays["Player"] = new PlayerOverlay(wsChannel, layerMgr);
|
||||
overlays["POI"] = new PoiOverlay(wsChannel, layerMgr);
|
||||
overlays["Travelnet"] = new TravelnetOverlay(wsChannel, layerMgr);
|
||||
overlays["Bones"] = new BonesOverlay(wsChannel, layerMgr);
|
||||
//overlays["Protector"] = new ProtectorOverlay(wsChannel, layerMgr);
|
||||
|
||||
//Default enabled overlays
|
||||
map.addLayer(overlays["Player"]);
|
||||
map.addLayer(overlays["POI"]);
|
||||
|
||||
L.control.layers(layers, overlays).addTo(map);
|
||||
|
||||
|
19
server/static/js/overlays/BonesOverlay.js
Normal file
19
server/static/js/overlays/BonesOverlay.js
Normal file
@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
var BonesIcon = L.icon({
|
||||
iconUrl: 'pics/bones_top.png',
|
||||
|
||||
iconSize: [16, 16],
|
||||
iconAnchor: [8, 8],
|
||||
popupAnchor: [0, -16]
|
||||
});
|
||||
|
||||
var BonesOverlay = AbstractIconOverlay.extend({
|
||||
initialize: function(wsChannel, layerMgr) {
|
||||
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "bones", BonesIcon);
|
||||
},
|
||||
|
||||
createPopup: function(bones){
|
||||
return "<h4>" + bones.attributes.owner + "</h4>";
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user