tzwhere
tzwhere copied to clipboard
Near timezone search for (lat, lon).
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 neat idea. any tests?
Oops, tests are missing (and doc in readme is missing too). I will try to find some time to add tests.
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'
}