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