forked from MapComplete/MapComplete
Fix various bugs
This commit is contained in:
parent
30f4be183e
commit
5284f198d8
26 changed files with 339 additions and 119 deletions
|
@ -543,9 +543,9 @@ class LengthTextField extends TextFieldDef {
|
|||
// Bit of a hack: we project the centerpoint to the closes point on the road - if available
|
||||
if (options?.feature !== undefined && options.feature.geometry.type !== "Point") {
|
||||
const lonlat = <[number, number]>[...options.location]
|
||||
lonlat.reverse()
|
||||
lonlat.reverse(/*Changes a clone, this is safe */)
|
||||
options.location = <[number, number]>GeoOperations.nearestPoint(options.feature, lonlat).geometry.coordinates
|
||||
options.location.reverse()
|
||||
options.location.reverse(/*Changes a clone, this is safe */)
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue