1
0
forked from MTSR/mapserver
mapserver/server/static/js/Overlaysetup.js

64 lines
2.0 KiB
JavaScript
Raw Normal View History

2019-04-04 11:19:29 +03:00
/* jshint undef: false */
/* exported Overlaysetup */
2019-02-15 14:47:43 +03:00
function Overlaysetup(cfg, map, overlays, wsChannel, layerMgr){
if (cfg.mapobjects.mapserver) {
2019-04-04 11:19:29 +03:00
overlays.Player = new PlayerOverlay(wsChannel, layerMgr);
overlays.POI = new PoiOverlay(wsChannel, layerMgr);
overlays.Label = new LabelOverlay(wsChannel, layerMgr);
overlays.Border = new BorderOverlay(wsChannel, layerMgr);
2019-02-15 14:47:43 +03:00
2019-04-04 11:19:29 +03:00
map.addLayer(overlays.Player);
map.addLayer(overlays.POI);
map.addLayer(overlays.Labels);
2019-02-15 14:47:43 +03:00
}
if (cfg.mapobjects.travelnet) {
2019-04-04 11:19:29 +03:00
overlays.Travelnet = new TravelnetOverlay(wsChannel, layerMgr);
2019-02-15 14:47:43 +03:00
}
if (cfg.mapobjects.bones) {
2019-04-04 11:19:29 +03:00
overlays.Bones = new BonesOverlay(wsChannel, layerMgr);
2019-02-15 14:47:43 +03:00
}
if (cfg.mapobjects.digilines) {
overlays["Digilines LCD"] = new LcdOverlay(wsChannel, layerMgr);
}
if (cfg.mapobjects.digiterms) {
2019-04-04 11:19:29 +03:00
overlays.Digiterms = new DigitermOverlay(wsChannel, layerMgr);
2019-02-15 14:47:43 +03:00
}
if (cfg.mapobjects.luacontroller) {
overlays["Lua Controller"] = new LuacontrollerOverlay(wsChannel, layerMgr);
}
if (cfg.mapobjects.technic) {
overlays["Technic Anchor"] = new TechnicAnchorOverlay(wsChannel, layerMgr);
overlays["Technic Quarry"] = new TechnicQuarryOverlay(wsChannel, layerMgr);
overlays["Technic Switching station"] = new TechnicSwitchOverlay(wsChannel, layerMgr);
}
if (cfg.mapobjects.protector) {
2019-04-04 11:19:29 +03:00
overlays.Protector = new ProtectorOverlay(wsChannel, layerMgr);
2019-02-15 14:47:43 +03:00
}
if (cfg.mapobjects.xpprotector) {
overlays["XP Protector"] = new XPProtectorOverlay(wsChannel, layerMgr);
}
if (cfg.mapobjects.privprotector) {
overlays["Priv Protector"] = new PrivProtectorOverlay(wsChannel, layerMgr);
}
2019-02-15 14:47:43 +03:00
if (cfg.mapobjects.mission) {
2019-04-04 11:19:29 +03:00
overlays.Missions = new MissionOverlay(wsChannel, layerMgr);
2019-02-15 14:47:43 +03:00
}
2019-02-24 22:06:20 +03:00
if (cfg.mapobjects.train) {
2019-04-04 11:19:29 +03:00
overlays.Trains = new TrainOverlay(wsChannel, layerMgr);
overlays.Trainlines = new TrainlineOverlay(wsChannel, layerMgr);
2019-02-24 22:06:20 +03:00
}
2019-02-15 14:47:43 +03:00
}