|
|
@ -9,9 +9,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
var check = require('check-types'); |
|
|
|
var check = require('check-types'); |
|
|
|
|
|
|
|
|
|
|
|
var accuracyLevel_point = 'point'; |
|
|
|
var accuracyLevelPoint = 'point'; |
|
|
|
var accuracyLevel_interpolated = 'interpolated'; |
|
|
|
var accuracyLevelInterpolated = 'interpolated'; |
|
|
|
var accuracyLevel_centroid = 'centroid'; |
|
|
|
var accuracyLevelCentroid = 'centroid'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function setup() { |
|
|
|
function setup() { |
|
|
@ -43,11 +43,11 @@ function computeAccuracyLevelForResult(hit) { |
|
|
|
switch (hit.layer) { |
|
|
|
switch (hit.layer) { |
|
|
|
case 'venue': |
|
|
|
case 'venue': |
|
|
|
case 'address': |
|
|
|
case 'address': |
|
|
|
hit.accuracy = accuracyLevel_point; |
|
|
|
hit.accuracy = accuracyLevelPoint; |
|
|
|
break; |
|
|
|
break; |
|
|
|
// this means it's a street or admin area
|
|
|
|
// this means it's a street or admin area
|
|
|
|
default: |
|
|
|
default: |
|
|
|
hit.accuracy = accuracyLevel_centroid; |
|
|
|
hit.accuracy = accuracyLevelCentroid; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|