diff options
Diffstat (limited to 'photon')
-rw-r--r-- | photon/photon.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/photon/photon.go b/photon/photon.go index 7dee4c5..046a8de 100644 --- a/photon/photon.go +++ b/photon/photon.go @@ -108,6 +108,7 @@ func Geocode(location string) ([]Coordinates, error) { } // Make matching coordinates list. + names := map[string]bool{} for _, feature := range r.Features { if feature.Properties.CountryCode != "US" { continue // skip @@ -120,6 +121,11 @@ func Geocode(location string) ([]Coordinates, error) { feature.Properties.Name, feature.Properties.State, ) + if names[c.Name] { + continue // skip. + } + names[c.Name] = true + mCoords = append(mCoords, c) } return mCoords, nil |