So, I created some kind of custom JSON to make the oceans more saturated with blue, but now it seems it can’t get the default map for TERRAIN, it just goes into the standard ROADMAP view, it doesn't seem to work why this happens, some ideas?
function initialize() {
var blueOceanStyles = [
{
featureType: "water",
stylers: [
{ hue: "#4b83d4" },
{ saturation: 53 }
]
}
];
var blueOceanType = new google.maps.StyledMapType(blueOceanStyles,
{name: "Blue Oceans"});
var mapOptions = {
zoom: 5,
center: new google.maps.LatLng(50, 0),
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.TERRAIN,
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.TERRAIN, 'blue_oceans']
}
};
var map = new google.maps.Map(document.getElementById('map_canvas'),
mapOptions);
map.mapTypes.set('blue_oceans', blueOceanType);
map.setMapTypeId('blue_oceans');
}
source
share