我试图改变这个谷歌地图实例的饱和度。除了饱和样式外,其他一切都在工作。我究竟做错了什么 ?
代码:
$(function() { // when the document is ready to be manipulated.
if (GBrowserIsCompatible()) { // if the browser is compatible with Google Map's
var map = document.getElementById("myMap"); // Get div element
var m = new GMap2(map); // new instance of the GMap2 class and pass in our div location.
m.setCenter(new GLatLng(59.334951,18.088598), 13); // pass in latitude, longitude, and zoom level.
m.openInfoWindow(m.getCenter(), document.createTextNode("Looking Good")); // displays the text
m.setMapType(G_NORMAL_MAP); // sets the default mode. G_NORMAL_MAP, G_HYBRID_MAP
// var c = new GMapTypeControl(); // switch map modes
// m.addControl(c);
// m.addControl(new GLargeMapControl()); // creates the zoom feature
var styleArray = [
{
featureType: "all",
stylers: [
{saturation: -80}
]
}
];
}
else {
alert("Upgrade your browser, man!");
}
});
我整天都在寻找(并且失败)以找到解决此问题的方法。