From 1eab2b76a58308c7947447aae0e08135820d59ab Mon Sep 17 00:00:00 2001 From: ZhAkps <46207005+ZhAkps@users.noreply.github.com> Date: 星期二, 06 二月 2024 17:56:33 +0800 Subject: [PATCH] poi search --- src/utils/map2.js | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/utils/map2.js b/src/utils/map2.js index 219f65c..2fc2edd 100644 --- a/src/utils/map2.js +++ b/src/utils/map2.js @@ -2349,7 +2349,7 @@ rjl, jzxg, jzmd, - lon:e.coordinate[0], + lon: e.coordinate[0], lat: e.coordinate[1], } } @@ -2368,7 +2368,6 @@ window.map.forEachFeatureAtPixel(e.pixel, function (feature) { if (feature && feature.values_.desc) { - ponitPanel.style.display = 'block' let obj = feature.values_.desc objdata = { POITYPE: "POINT", @@ -2377,18 +2376,15 @@ lon: obj.lng, lat: obj.lat } - overlay.setPosition(e.coordinate); + console.log('objdata'); store.setPoplayerShowAction(true); store.setPoplayerListAction(objdata); - // if (window.instance) { - // window.instance.$destroy(); - // } - // window.instance = new PoiLayerConstructor({ - // data: { - // list: objdata - // } - // }); - // window.instance.$mount(); + window.instance = new PoiLayerConstructor({ + data: { + list1: objdata + } + }); + window.instance.$mount(); } }); } -- Gitblit v1.9.3