我需要去饱和我的谷歌地图。我用过stylers
,它们不起作用。这是我的代码:
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">
document.write('<div id="gmap" style="width:960px; height:360px;"></div>');
var map_center = new google.maps.LatLng(xxx, xxx);
var map = new google.maps.Map( document.getElementById("gmap"), {
zoom: 11,
center: map_center,
mapTypeId: google.maps.MapTypeId.ROADMAP,
panControl: false,
streetViewControl: false,
mapTypeControl: false,
stylers: [
{ visibility: "on" },
{ saturation: -100 }
]
});
var pos;
var marker;
for(var i = 0 ; i < 10 ; i++) {
pos = new google.maps.LatLng(xxx, xxx);
marker = new google.maps.Marker({
position: pos,
map: map,
title: 'Tu jesteśmy',
icon: 'pointer.png'
});
}
</script>
请注意,我还需要使用自定义指针。