views:

39

answers:

1

Can you post a link to a gmap that has darker water, then I could look which value to change.

+3  A: 

Here you go:

<!DOCTYPE html>
<html> 
<head> 
   <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
   <title>Google Maps Dark Water Style Demo</title> 
   <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> 
</head> 
<body> 
   <div id="map" style="width: 550px; height: 300px;"></div> 

   <script type="text/javascript"> 
     var darkStyle = [{
       featureType: 'water',
       elementType: 'all',
       stylers: [{ invert_lightness: true }, { hue: '#3300ff' }]
     }];

     var map = new google.maps.Map(document.getElementById('map'), {
       mapTypeControlOptions: {
         mapTypeIds: ['darkwater', google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.TERRAIN]
       },
       center: new google.maps.LatLng(30, 0),
       zoom: 1,
       mapTypeId: 'darkwater'
     });

     map.mapTypes.set('darkwater', new google.maps.StyledMapType(darkStyle, { name: 'Dark' }));
   </script> 
</body> 
</html>

Is this dark enough?

Google Maps Dark Water Style Demo

This is using the new Styled Map features of the v3 API. You may also want to check out the Google Maps API Styled Map Wizard which will allow you to graphically edit styles.

Daniel Vassallo
Close to perfect leaving me wish more like black than the blue and the landscape from the Terrain map. Thank you Dear Sir!
LarsOn
@LarsOn: Try using the Style Map Wizard: http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html. Click on water, and change the hue and other settings. Then click on "View JSON" and simply replace the JSON object with the one used in `darkStyle` in my example.
Daniel Vassallo
Thanks! You may inspect the choice 'Dark' I deployed to http://www.koolbusiness.com/
LarsOn
@LarsOn: Very nice. Well done :)
Daniel Vassallo