From db929db466201b100a5af70add4a8f6b46bb8b5d Mon Sep 17 00:00:00 2001 From: 陈泽平 <qibolin02429@126.com> Date: 星期一, 17 五月 2021 10:30:50 +0800 Subject: [PATCH] 企业图层展示控制 --- src/components/LayerController/service/BusiLayerService.js | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/LayerController/service/BusiLayerService.js b/src/components/LayerController/service/BusiLayerService.js index b297749..65166db 100644 --- a/src/components/LayerController/service/BusiLayerService.js +++ b/src/components/LayerController/service/BusiLayerService.js @@ -13,21 +13,21 @@ init (layer) { // 寮曞叆 鍏宠仈鐨刯s锛屽湪constant.js涓牴鎹甤onfig閰嶇疆鐨刬d寰楀埌澶勭悊js const id = this.config.code + console.log(id) const file = logicMapper[id] if (!file) { - console.log('鎵句笉鍒伴�昏緫澶勭悊js!!!') + console.log('鎵句笉鍒伴�昏緫澶勭悊js!!!' + id) } else { var BusiLayer = require('../logic/' + file) var busiLayer = new BusiLayer() busiLayer.init(layer, this.L) if (busiLayer.bindTooltip) { - layer.bindTooltip(busiLayer.bindTooltip) + // 鍏ㄥ眬tips浣嶇疆 + layer.bindTooltip(busiLayer.bindTooltip, { direction: 'top', offset: [0, -15], sticky: false }) } // 璋冪敤click浜嬩欢 if (busiLayer.clickListener) { - layer.on('click', function (e) { - console.log(layer) - }) + layer.on('click', busiLayer.clickListener) } layer.addTo(this.map) } -- Gitblit v1.8.0