Browse Source

if the query has a number - search addresses

pull/169/head
Harish Krishna 10 years ago
parent
commit
a8c090252a
  1. 2
      sanitiser/_input.js

2
sanitiser/_input.js

@ -52,7 +52,7 @@ function sanitize( req ){
// address parsing
parsedAddress1 = parser( params.input );
// set target_layer if input suggests no address
if (parsedAddress1.text === parsedAddress1.regions.join(' ')) {
if (parsedAddress1.text === parsedAddress1.regions.join(' ') && !hasNumber) {
parsedAddress2.target_layer = get_layers(['admin', 'poi']);
} // else {
// this might be an overkill - you'd want to search for poi and admin

Loading…
Cancel
Save