Skip to content

[feature] latitude and longitude should not have to be exact to match a location #3

@akhoury

Description

@akhoury

The lat and long are now used as keys, so the input values MUST exactly match.

Current behavior:

// this matches

zipdb.latlong("42.71", "-71.18");
/* { zipcode: '01844',
  type: 'standard',
  city: 'Methuen',
  state: 'MA',
  latitude: '42.71',
  longitude: '-71.18' }
*/

// but those do not, even though they are either a little off or have more decimal points

zipdb.latlong("42.711", "-71.18");
// {}

zipdb.latlong("42.72", "-71.18");
// {}

zipdb.latlong("42.71", "-71.14");
// {}

// you get the gist

It would be nice if you can build a matrix and when you dont get a hit, you return the closest zipcode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions