leaflet-terminator
v0.1.0
Published
show the solar terminator on a leaflet map
Downloads
9
Readme
leaflet-terminator
Displays a solar terminator on a Leaflet map.
API
terminator(date)
Create a solar terminator. The terminator is a Leaflet L.Path object.
date
is optional, and would need to be a JavaScript Date object. Default
is now.
terminator.setDate(date)
Recalculate the terminator to a given JavaScript Date object.
Using it
This is built with browserify. If you want a standalone javascript file or UMD module,
download leaflet-terminator.js
.
If you want to use it with browserify, use npm.
If you have a patch to contribute, change things in index.js
or in one of the
dependency files. leaflet-terminator.js
is a built file, do not change it:
your changes will be overwritten.
See Also
This is totally cribbed from Mike Bostock's example, which is itself cribbed from science. Under the hood lie a bunch of libraries that you can use separately, like leaflet-geodesy and spherical.