5m
This commit is contained in:
@@ -57,7 +57,7 @@ func (m *Maps) Search(ctx context.Context, query string) ([]Location, error) {
|
|||||||
a := m.around.Lat - results[i].Lat
|
a := m.around.Lat - results[i].Lat
|
||||||
b := m.around.Lng - results[i].Lng
|
b := m.around.Lng - results[i].Lng
|
||||||
dist := math.Sqrt(a*a + b*b)
|
dist := math.Sqrt(a*a + b*b)
|
||||||
shouldKeep = dist*convertToMiles < 20.0
|
shouldKeep = dist*convertToMiles < 5.0
|
||||||
}
|
}
|
||||||
if !shouldKeep {
|
if !shouldKeep {
|
||||||
results = append(results[:i], results[i+1:]...)
|
results = append(results[:i], results[i+1:]...)
|
||||||
|
|||||||
Reference in New Issue
Block a user