We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7753613 commit 1bdc11bCopy full SHA for 1bdc11b
1 file changed
src/layers/UsePathsLayer.tsx
@@ -133,6 +133,7 @@ function addAccessNetworkLayer(map: Map, selectedPath: Path, queryPoints: QueryP
133
})
134
layer.setStyle(style)
135
for (let i = 0; i < selectedPath.snapped_waypoints.coordinates.length; i++) {
136
+ if(i >= queryPoints.length) break // can happen if deleted too fast
137
const start = fromLonLat([queryPoints[i].coordinate.lng, queryPoints[i].coordinate.lat])
138
const end = fromLonLat(selectedPath.snapped_waypoints.coordinates[i])
139
layer.getSource()?.addFeature(new Feature(createBezierLineString(start, end)))
0 commit comments