From 32c49e86a7876f9252b0a88a0685c203830476f1 Mon Sep 17 00:00:00 2001 From: 陈泽平 <chenzeping> Date: 星期五, 28 五月 2021 16:40:23 +0800 Subject: [PATCH] 企业应急-事件上报-搜索定位 --- src/components/LayerController/service/BusiLayerService.js | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/LayerController/service/BusiLayerService.js b/src/components/LayerController/service/BusiLayerService.js index 254a819..65166db 100644 --- a/src/components/LayerController/service/BusiLayerService.js +++ b/src/components/LayerController/service/BusiLayerService.js @@ -13,18 +13,23 @@ init (layer) { // 寮曞叆 鍏宠仈鐨刯s锛屽湪constant.js涓牴鎹甤onfig閰嶇疆鐨刬d寰楀埌澶勭悊js const id = this.config.code - console.log(logicMapper) + console.log(id) const file = logicMapper[id] if (!file) { - console.log('鎵句笉鍒伴�昏緫澶勭悊js!!!') + console.log('鎵句笉鍒伴�昏緫澶勭悊js!!!' + id) } else { - console.log('-----' + file) var BusiLayer = require('../logic/' + file) - console.log(BusiLayer) var busiLayer = new BusiLayer() - // 璋冪敤init - busiLayer.init(layer) + busiLayer.init(layer, this.L) + if (busiLayer.bindTooltip) { + // 鍏ㄥ眬tips浣嶇疆 + layer.bindTooltip(busiLayer.bindTooltip, { direction: 'top', offset: [0, -15], sticky: false }) + } // 璋冪敤click浜嬩欢 + if (busiLayer.clickListener) { + layer.on('click', busiLayer.clickListener) + } + layer.addTo(this.map) } } } -- Gitblit v1.8.0