|
@ -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; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|