Browse Source

Merge pull request #302 from pelias/bbox_top_bottom_flip

flip lon values for boundary.rect
pull/307/head
Peter Johnson a.k.a. insertcoffee 9 years ago
parent
commit
09f5ee0acd
  1. 4
      query/search.js
  2. 4
      test/unit/fixture/search_linguistic_bbox.js
  3. 4
      test/unit/fixture/search_linguistic_focus_bbox.js

4
query/search.js

@ -85,9 +85,9 @@ function generateQuery( clean ){
check.number(clean['boundary.rect.min_lon']) && check.number(clean['boundary.rect.min_lon']) &&
check.number(clean['boundary.rect.max_lon']) ){ check.number(clean['boundary.rect.max_lon']) ){
vs.set({ vs.set({
'boundary:rect:top': clean['boundary.rect.min_lat'], 'boundary:rect:top': clean['boundary.rect.max_lat'],
'boundary:rect:right': clean['boundary.rect.max_lon'], 'boundary:rect:right': clean['boundary.rect.max_lon'],
'boundary:rect:bottom': clean['boundary.rect.max_lat'], 'boundary:rect:bottom': clean['boundary.rect.min_lat'],
'boundary:rect:left': clean['boundary.rect.min_lon'] 'boundary:rect:left': clean['boundary.rect.min_lon']
}); });
} }

4
test/unit/fixture/search_linguistic_bbox.js

@ -73,9 +73,9 @@ module.exports = {
'must': [{ 'must': [{
'geo_bounding_box': { 'geo_bounding_box': {
'center_point': { 'center_point': {
'top': 47.47, 'top': 11.51,
'right': -61.84, 'right': -61.84,
'bottom': 11.51, 'bottom': 47.47,
'left': -103.16 'left': -103.16
}, },
'_cache': true, '_cache': true,

4
test/unit/fixture/search_linguistic_focus_bbox.js

@ -102,9 +102,9 @@ module.exports = {
'must': [{ 'must': [{
'geo_bounding_box': { 'geo_bounding_box': {
'center_point': { 'center_point': {
'top': 47.47, 'top': 11.51,
'right': -61.84, 'right': -61.84,
'bottom': 11.51, 'bottom': 47.47,
'left': -103.16 'left': -103.16
}, },
'_cache': true, '_cache': true,

Loading…
Cancel
Save