Get Your Own DaylightMap

In the best mashup tradition, you can put DaylightMap on your own website if you'd like. Take a look at the options below, and pick the one that works best for you.

On Google's My Maps

The basic day/night display can be overlaid onto maps.google.com, thanks to Google's My Maps feature. Click this button to add DaylightMap to your list of map content providers: Add Daylight to My Google Maps

On Your Google Home Page

There's a minimalist version of DaylightMap that you can place on your Google home page with one click (okay, two, but that's still pretty easy). This button will get you halfway there: Add DaylightMap gadget to iGoogle

On Your Own Web Page

The same Google Gadget from above can also be added to any web page, anywhere. You'll need to have the ability to edit your page's HTML source, but if that doesn't bother you, off you go then. Configure the gadget and get the code.

If that's still too much for you, I'd be happy to help out. Please see our Business Services page for full details.

On Any Google Map

If you're a JavaScript programmer yourself, you're welcome to add our night-side shadow to your own Google Maps API integration. The layer is free for most sites, but please see our pricing guide to make sure yours qualifies.

To get started, add the following line to the <head> section of your HTML, after the line where you include the Google Map API itself:

    <script src="http://www.daylightmap.com/daylight_packed.js" 
            type="text/javascript"></script>

Then in your JavaScript, after initializing your version 2 Google Map (using a statement like map = new GMap2(document.getElementById('map'));), add the following two lines of code:

    var daylight = new daylightMap.daylightLayer();
    daylight.addToMap(map);

obviously, changing map to match your own GMap2 object name as needed. Note also that this needs to occur before the first call to map.setCenter() in your code.

You can also add the daylight layer to a single map type (such as Satellite or Hybrid) if desired by using

    daylight.addToMapType(G_SATELLITE_MAP);

instead of the addToMap method. Any valid GMapType should work as a parameter.

The daylightLayer object has the following properties you may find useful:

when
Date/time of the daylight plot. Type: Date. Default: current date/time
opacity
Effectively, the "darkness" of the shadow, where 0 is fully transparent (and hence invisible) and 1 is fully opaque. Type: Numeric. Default: 0.5 for map view, 0.75 for satellite/hybrid
active
Whether the daylight layer is displayed when the map is redrawn. Type: Boolean. Default: true
cityLights
Whether city lights are displayed on the night side. Type: Boolean. Default: true