Browse Source

fix 点击选中路线后再次点击路线未消失

dev
巴林闲侠 1 year ago
parent
commit
16fa7777dc
  1. 7
      web/client/src/sections/quanju/containers/public/olMap.js

7
web/client/src/sections/quanju/containers/public/olMap.js

@ -262,6 +262,7 @@ const OlMap = (props) => {
selectStyle: { stroke: { width: 8, color: '#9933FF' } }, selectStyle: { stroke: { width: 8, color: '#9933FF' } },
layerName: 'geometry' + index++ layerName: 'geometry' + index++
}); });
break;
} }
} }
} }
@ -567,7 +568,7 @@ const OlMap = (props) => {
layerName: 'geometry_build_road_' + renderIndex layerName: 'geometry_build_road_' + renderIndex
}); });
// // 获取线条点位
console.log(olMap, olMap.olLayer) console.log(olMap, olMap.olLayer)
let feat = olMap.olLayer.geometryLayers['geometry_build_road_' + renderIndex].getSource().getFeatures() let feat = olMap.olLayer.geometryLayers['geometry_build_road_' + renderIndex].getSource().getFeatures()
if (feat.length > 0) { if (feat.length > 0) {
@ -576,6 +577,8 @@ const OlMap = (props) => {
console.log(start); console.log(start);
roadPointPosition = start roadPointPosition = start
} }
break;
} }
} }
} }
@ -859,7 +862,7 @@ const OlMap = (props) => {
<Carousel autoplay > <Carousel autoplay >
{ {
r.scenePic?.map(v => <img className='picfileimg_' r.scenePic?.map(v => <img className='picfileimg_'
style={{ width: 80,maxHeight:70,height:70, display: 'inline-block', }} style={{ width: 80, maxHeight: 70, height: 70, display: 'inline-block', }}
src={ src={
v.startsWith("http") ? v : v.startsWith("http") ? v :
`${localStorage.getItem("qndmn")}/${v}` `${localStorage.getItem("qndmn")}/${v}`

Loading…
Cancel
Save