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?
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
2010-09-29 22:56:54
Close to perfect leaving me wish more like black than the blue and the landscape from the Terrain map. Thank you Dear Sir!
LarsOn
2010-09-30 08:43:15
@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
2010-09-30 08:53:02
Thanks! You may inspect the choice 'Dark' I deployed to http://www.koolbusiness.com/
LarsOn
2010-10-02 06:25:25
@LarsOn: Very nice. Well done :)
Daniel Vassallo
2010-10-02 06:30:05