forked from MapComplete/MapComplete
Fix: preciseInputPicker will show correct icon if snapped or not snapped to a wall
This commit is contained in:
parent
64728d17db
commit
98703914ca
1 changed files with 6 additions and 2 deletions
|
@ -176,13 +176,13 @@ export default class LocationInput
|
||||||
loc.lat,
|
loc.lat,
|
||||||
])
|
])
|
||||||
if (min === undefined) {
|
if (min === undefined) {
|
||||||
min = nearestPointOnLine
|
min = { ...nearestPointOnLine }
|
||||||
matchedWay = feature
|
matchedWay = feature
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (min.properties.dist > nearestPointOnLine.properties.dist) {
|
if (min.properties.dist > nearestPointOnLine.properties.dist) {
|
||||||
min = nearestPointOnLine
|
min = { ...nearestPointOnLine }
|
||||||
matchedWay = feature
|
matchedWay = feature
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -208,6 +208,10 @@ export default class LocationInput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
min.properties = options?.snappedPointTags ?? min.properties
|
min.properties = options?.snappedPointTags ?? min.properties
|
||||||
|
min.properties = {
|
||||||
|
...min.properties,
|
||||||
|
_referencing_ways: JSON.stringify([matchedWay.properties.id]),
|
||||||
|
}
|
||||||
self.snappedOnto.setData(<any>matchedWay)
|
self.snappedOnto.setData(<any>matchedWay)
|
||||||
return min
|
return min
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue