tzwhere icon indicating copy to clipboard operation
tzwhere copied to clipboard

Near timezone search for (lat, lon).

Open johniez opened this issue 9 years ago • 3 comments

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).

johniez avatar Jul 15 '15 17:07 johniez

@johniez neat idea. any tests?

mattbornski avatar May 03 '16 19:05 mattbornski

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

johniez avatar May 03 '16 19:05 johniez

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'
}

brianreavis avatar Jul 23 '16 17:07 brianreavis