Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address alias #61

Merged
merged 3 commits into from
Jan 13, 2015
Merged

Address alias #61

merged 3 commits into from
Jan 13, 2015

Conversation

missinglink
Copy link
Member

This PR starts to expose the new address types via the API, initially just openaddresses but later also TIGER, openvenues etc.

I think it's best to introduce a new alias for addresses, so we can turn them on/off and have query-time control over what is returned (just like the existing poi/admin aliases).

In this PR I've also slightly changed the way we assign default layers, in the past we defaulted to all layers, now if you fail to specify a layers param in your GET request it'll default to poi,admin.

Maybe later we can change that to include address but need to do some testing first.

related: pelias/schema#36

cc/ @hkrishna

@@ -160,8 +160,9 @@ module.exports.tests.sanitize_layers = function(test, common) {
});
test('invalid layer', function(t) {
sanitize({ layers: 'test_layer', input: 'test', lat: 0, lon: 0 }, function( err, clean ){
var msg = 'invalid param \'layer\': must be one or more of geoname,osmnode,osmway,admin0,admin1,admin2,neighborhood,poi,admin';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the way this test runs in an attempt to make it less brittle when new layers are added.

missinglink added a commit that referenced this pull request Jan 13, 2015
@missinglink missinglink merged commit cb5b77b into master Jan 13, 2015
@sevko sevko deleted the address_alias branch March 12, 2015 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant