|
|
@ -168,9 +168,9 @@ module.exports.tests.sanitize_optional_geo = function(test, common) { |
|
|
|
module.exports.tests.sanitize_bbox = function(test, common) { |
|
|
|
module.exports.tests.sanitize_bbox = function(test, common) { |
|
|
|
var bboxes = { |
|
|
|
var bboxes = { |
|
|
|
invalid_coordinates: [ |
|
|
|
invalid_coordinates: [ |
|
|
|
'90,-181,-180,34', // invalid top_right lon, bottom_left lat
|
|
|
|
'-181,90,34,-180', // invalid top_right lon, bottom_left lat
|
|
|
|
'91,-170,45,-181', // invalid top_right lat, bottom_left lon
|
|
|
|
'-170,91,-181,45', // invalid top_right lat, bottom_left lon
|
|
|
|
'91,-181,-91,181', // invalid top_right lat/lon, bottom_left lat/lon
|
|
|
|
'-181,91,181,-91', // invalid top_right lon/lat, bottom_left lon/lat
|
|
|
|
'91, -181,-91,181',// invalid - spaces between coordinates
|
|
|
|
'91, -181,-91,181',// invalid - spaces between coordinates
|
|
|
|
], |
|
|
|
], |
|
|
|
invalid: [ |
|
|
|
invalid: [ |
|
|
@ -180,7 +180,7 @@ module.exports.tests.sanitize_bbox = function(test, common) { |
|
|
|
'' // invalid - empty param
|
|
|
|
'' // invalid - empty param
|
|
|
|
], |
|
|
|
], |
|
|
|
valid: [ |
|
|
|
valid: [ |
|
|
|
'90,-179,-80,34', // valid top_right lat/lon, bottom_left lat/lon
|
|
|
|
'-179,90,34,-80', // valid top_right lon/lat, bottom_left lon/lat
|
|
|
|
'0,0,0,0' // valid top_right lat/lon, bottom_left lat/lon
|
|
|
|
'0,0,0,0' // valid top_right lat/lon, bottom_left lat/lon
|
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|