|
|
@ -48,11 +48,11 @@ function sanitize( req ){ |
|
|
|
// 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(' ')) { |
|
|
|
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
|
|
|
|
// even if an address is being queried. TBD
|
|
|
|
// even if an address is being queried. TBD
|
|
|
|
parsedAddress2.target_layer = get_layers(['address']); |
|
|
|
// parsedAddress2.target_layer = get_layers(['address']);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var parsedAddress = extend(parsedAddress0, parsedAddress1, parsedAddress2); |
|
|
|
var parsedAddress = extend(parsedAddress0, parsedAddress1, parsedAddress2); |
|
|
|