1
0
forked from MTSR/mapserver

lcd overlay

This commit is contained in:
NatureFreshMilk 2019-02-08 08:48:34 +01:00
parent a6b2cd13cc
commit 38851f12c4
3 changed files with 21 additions and 0 deletions

View File

@ -37,6 +37,7 @@
<script src="js/overlays/PlayerOverlay.js"></script>
<script src="js/overlays/ProtectorOverlay.js"></script>
<script src="js/overlays/BonesOverlay.js"></script>
<script src="js/overlays/LcdOverlay.js"></script>
<!-- bootstrap -->
<script src="js/main.js"></script>

View File

@ -33,6 +33,7 @@ api.getConfig().then(function(cfg){
overlays["POI"] = new PoiOverlay(wsChannel, layerMgr);
overlays["Travelnet"] = new TravelnetOverlay(wsChannel, layerMgr);
overlays["Bones"] = new BonesOverlay(wsChannel, layerMgr);
overlays["Digilines LCD"] = new LcdOverlay(wsChannel, layerMgr);
//overlays["Protector"] = new ProtectorOverlay(wsChannel, layerMgr);
//Default enabled overlays

View File

@ -0,0 +1,19 @@
'use strict';
var LcdIcon = L.icon({
iconUrl: 'pics/lcd_lcd.png',
iconSize: [16, 16],
iconAnchor: [8, 8],
popupAnchor: [0, -16]
});
var LcdOverlay = AbstractIconOverlay.extend({
initialize: function(wsChannel, layerMgr) {
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "digilinelcd", LcdIcon);
},
createPopup: function(bones){
return "<pre>" + bones.attributes.text + "</pre>";
}
});