mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 22:03:37 +02:00
fix sorting of nearby streets in address field dropdown
This commit is contained in:
@@ -44,6 +44,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
#### :white_check_mark: Validation
|
||||
#### :bug: Bugfixes
|
||||
* Validator: Don't falsely flag certain tags as "should be a closed area" if the tag also allows both area and line geometries in two separate presets (e.g. `highway=elevator` in the "Elevator" and "Inclined Lift" presets)
|
||||
* Fix sorting of nearby streets in address field dropdown
|
||||
#### :earth_asia: Localization
|
||||
#### :hourglass: Performance
|
||||
#### :mortar_board: Walkthrough / Help
|
||||
|
||||
@@ -46,13 +46,13 @@ export function uiFieldAddress(field, context) {
|
||||
.map(d => {
|
||||
let dist = geoSphericalDistance(d.extent(context.graph()).center(), l);
|
||||
|
||||
if (d.type === 'way') {
|
||||
if (d.geometry(context.graph()) === 'line') {
|
||||
var loc = context.projection([
|
||||
(extent[0][0] + extent[1][0]) / 2,
|
||||
(extent[0][1] + extent[1][1]) / 2
|
||||
]);
|
||||
var choice = geoChooseEdge(context.graph().childNodes(d), loc, context.projection);
|
||||
dist = Math.min(dist, choice.distance);
|
||||
dist = geoSphericalDistance(choice.loc, l);
|
||||
}
|
||||
|
||||
const value = resultProp && d.tags[resultProp] ? d.tags[resultProp] : d.tags.name;
|
||||
|
||||
Reference in New Issue
Block a user