Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Near timezone search for (lat, lon). #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

johniez
Copy link

@johniez johniez commented Jul 15, 2015

Suited for coastal areas, where tzNameAt() gives no results.

  • method tzNameNear(lat, lon) returns near polygon point and distance to it (= distance to polygon itself could be lesser).

@mattbornski
Copy link
Owner

@johniez neat idea. any tests?

@johniez
Copy link
Author

johniez commented May 3, 2016

Oops, tests are missing (and doc in readme is missing too). I will try to find some time to add tests.

@brianreavis
Copy link

I don't think this works quite as expected yet. For example:

tzwhere.init();

// should yield America/Denver
tzwhere.tzNameNear(44.7632226348, -107.7551973984, 1000)
{
    data: {
        key: '0',
        latitude: 47.967781,
        longitude: -104.00808,
        distance: 458174
    },
    tz: 'America/Chicago'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants