Skip to content

Commit 26e582f

Browse files
authored
Merge pull request #192 from dubiety/users/charlie/filter-autosuggest-point-address-type
Only filter point address for autosuggest sample
2 parents 6a0ecb9 + 7f52c6b commit 26e582f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎Samples/REST Services/Fill Address Form with Autosuggest/Fill Address Form with Autosuggest.html‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
'Content-Type': 'application/json; charset=utf-8'
5656
}
5757
}).then(r => r.json()).then(data => {
58-
response(data.results);
58+
// Only filter the "real address", exclude streets, municipalities, or other item types
59+
var results = data.results.filter(item => item.type === "Point Address");
60+
response(results);
5961
});
6062
},
6163
select: function (event, ui) {

0 commit comments

Comments
 (0)