smaller radius
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 < 30.0
|
shouldKeep = dist*convertToMiles < 20.0
|
||||||
}
|
}
|
||||||
if !shouldKeep {
|
if !shouldKeep {
|
||||||
results = append(results[:i], results[i+1:]...)
|
results = append(results[:i], results[i+1:]...)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
[env]
|
[env]
|
||||||
GOOGLE_PLACES_API_KEY = "AIzaSyBkACm-LQkoSfsTO5_XAzBVZE9-JQzcNkg"
|
GOOGLE_PLACES_API_KEY = "AIzaSyBkACm-LQkoSfsTO5_XAzBVZE9-JQzcNkg"
|
||||||
|
CATEGORIES = "schools,dump,prison,water treatment,police department,college,trailer park,coffee roaster,board game store,costco,organic grocery store"
|
||||||
|
|
||||||
[tasks.default]
|
[tasks.default]
|
||||||
run = "mise run olympia -- \"schools\""
|
run = "mise run olympia -- \"schools\""
|
||||||
@@ -7,5 +8,8 @@ run = "mise run olympia -- \"schools\""
|
|||||||
[tasks.olympia]
|
[tasks.olympia]
|
||||||
run = "mise run search -- \"olympia, wa\""
|
run = "mise run search -- \"olympia, wa\""
|
||||||
|
|
||||||
|
[tasks.duvall]
|
||||||
|
run = "mise run search -- \"duvall, wa\""
|
||||||
|
|
||||||
[tasks.search]
|
[tasks.search]
|
||||||
run = "cd \"${MISE_PROJECT_ROOT}\"; go run ./ "
|
run = "cd \"${MISE_PROJECT_ROOT}\"; go run ./ "
|
||||||
|
|||||||
Reference in New Issue
Block a user