From 190304b0390c7d9b32051406ad9a12ae1deb5a74 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Wed, 16 Sep 2015 14:15:03 -0400 Subject: [PATCH] Use flat structure for focus.point.{lat|lon} in query/search.js --- query/search.js | 6 +++--- test/unit/query/search.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/query/search.js b/query/search.js index fff3c172..9dc7702b 100644 --- a/query/search.js +++ b/query/search.js @@ -58,10 +58,10 @@ function generateQuery( clean ){ } // focus point - if( clean.lat && clean.lon ){ + if( clean['focus.point.lat'] && clean['focus.point.lon'] ){ vs.set({ - 'focus:point:lat': clean.lat, - 'focus:point:lon': clean.lon + 'focus:point:lat': clean['focus.point.lat'], + 'focus:point:lon': clean['focus.point.lon'] }); } diff --git a/test/unit/query/search.js b/test/unit/query/search.js index d595d1a7..3baa14f8 100644 --- a/test/unit/query/search.js +++ b/test/unit/query/search.js @@ -16,7 +16,7 @@ module.exports.tests.query = function(test, common) { test('valid search + focus + bbox', function(t) { var query = generate({ text: 'test', size: 10, - lat: 29.49136, lon: -82.50622, + 'focus.point.lat': 29.49136, 'focus.point.lon': -82.50622, bbox: { top: 47.47, right: -61.84, @@ -71,7 +71,7 @@ module.exports.tests.query = function(test, common) { test('search search + focus', function(t) { var query = generate({ text: 'test', size: 10, - lat: 29.49136, lon: -82.50622, + 'focus.point.lat': 29.49136, 'focus.point.lon': -82.50622, layers: ['test'] });