From ce292baeafbdacf11c12c271995183dc60da610a Mon Sep 17 00:00:00 2001 From: missinglink Date: Wed, 24 Feb 2016 12:37:54 +0100 Subject: [PATCH] fixes for focus.point to work with wof integration --- query/view/focus_selected_layers.js | 6 ++---- .../fixture/autocomplete_linguistic_focus.js | 18 ++++-------------- ...utocomplete_linguistic_focus_null_island.js | 18 ++++-------------- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/query/view/focus_selected_layers.js b/query/view/focus_selected_layers.js index 038d7ffa..ba19919f 100644 --- a/query/view/focus_selected_layers.js +++ b/query/view/focus_selected_layers.js @@ -22,10 +22,8 @@ module.exports = function( subview ){ if( view && view.hasOwnProperty('function_score') ){ view.function_score.filter = { 'or': [ - { 'type': { 'value': 'osmnode' } }, - { 'type': { 'value': 'osmway' } }, - { 'type': { 'value': 'osmaddress' } }, - { 'type': { 'value': 'openaddresses' } } + { 'term': { 'layer': 'venue' } }, + { 'term': { 'layer': 'address' } } ] }; } diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index 7f3c7174..83156c0b 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -47,23 +47,13 @@ module.exports = { 'filter': { 'or': [ { - 'type': { - 'value': 'osmnode' + 'term': { + 'layer': 'venue' } }, { - 'type': { - 'value': 'osmway' - } - }, - { - 'type': { - 'value': 'osmaddress' - } - }, - { - 'type': { - 'value': 'openaddresses' + 'term': { + 'layer': 'address' } } ] diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index 46554715..f28b6234 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -47,23 +47,13 @@ module.exports = { 'filter': { 'or': [ { - 'type': { - 'value': 'osmnode' + 'term': { + 'layer': 'venue' } }, { - 'type': { - 'value': 'osmway' - } - }, - { - 'type': { - 'value': 'osmaddress' - } - }, - { - 'type': { - 'value': 'openaddresses' + 'term': { + 'layer': 'address' } } ]