DaylightMap Technical Notes

General

This site is implemented using version 2 of the Google Maps API. As such, it should work on most modern browsers; I've confirmed it works well on Internet Explorer 6 and Firefox 1.5 for Windows, but Opera 9 has rendering issues with GMap tiles sometimes. And Night Mode in particular looks best on Mozilla-based browsers (like Firefox).

I'm using a solar elevation of -0.333 and -0.833 degrees for the edges of the partially-shaded areas on the map. These numbers equate to when the sun's upper and lower edges touch the horizon, accounting for atmospheric refraction, viewed from sea level. They don't account for twilight (after sunset and before dawn); I'm hoping to do so at some point, but it's much more processor intensive, and this site can't currently justify a server with that level of resources.

URL Parameters

If you want to link to the map, here are the parameters it supports:

lat
Latitude of the map's center point, in decimal degrees
lng
Longitude of the map's center point, in decimal degrees
z
Map's initial zoom, as an integer: 0 is widest, 20 is narrowest
t
Initial map type: S for satellite, H for hybrid, M for map, P for terrain
d
Date/time of daylight plot, as a URL string (example: 2006/04/15+11:06)
tz
Timezone offset of d parameter, in hours from GMT (example: -8 for PST)
s
Style of map markers (single-character: Analog, Digital, or Color-coded)
x0
Latitude of the first marker to display on the map, in decimal degrees
y0
Longitude of the first marker, in decimal degrees
n0
Displayed name of the first marker
night
When set to a nonzero value, invokes the site in global Night Mode, in which city lights are displayed over the entire planet

The x, y, and n URL parameters above can be repeated for additional map markers by substituting the numbers 1 through 9 for the 0 (x1, y1, n1; x2, y2, n2; ... x9, y9, n9).

The Daylight Layer

If you have a Google Map on your page – or you're not averse to adding one – the Daylight layer can be added to any standard GMaps API implementation. You'll find full instructions on the Get Your Own page.

For those with an interest in such things, the daylightLayer object is implemented as a GTileLayer, providing a v2 API-compliant interface to the tile server that does the real work. If you have any further questions, please feel free to contact me.