mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 00:54:03 +02:00
Show all OSM entity options when searching for a number without a prefix (close #7112)
This commit is contained in:
@@ -207,6 +207,28 @@ export function uiFeatureList(context) {
|
||||
}
|
||||
});
|
||||
|
||||
if (q.match(/^[0-9]+$/)) {
|
||||
// if query is just a number, possibly an OSM ID without a prefix
|
||||
result.push({
|
||||
id: 'n' + q,
|
||||
geometry: 'point',
|
||||
type: t('inspector.node'),
|
||||
name: q
|
||||
});
|
||||
result.push({
|
||||
id: 'w' + q,
|
||||
geometry: 'line',
|
||||
type: t('inspector.way'),
|
||||
name: q
|
||||
});
|
||||
result.push({
|
||||
id: 'r' + q,
|
||||
geometry: 'relation',
|
||||
type: t('inspector.relation'),
|
||||
name: q
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user