Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/399.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 谷歌地图api覆盖_Javascript_Google Maps Api 3_Overlay - Fatal编程技术网

Javascript 谷歌地图api覆盖

Javascript 谷歌地图api覆盖,javascript,google-maps-api-3,overlay,Javascript,Google Maps Api 3,Overlay,我正试图通过将饱和度调整为-100,亮度调整为-2,使这张谷歌地图成为黑白的,就像谷歌告诉你的那样,但出于某种原因,mpas的外观没有改变,而是保持默认覆盖 你知道为什么吗 var map; var marker; var Longitude = -1.8822221000000354; var Latitude = 50.72569620000001; var zoom = 20; var bounds = new google.maps.LatLngBounds(); var markers

我正试图通过将饱和度调整为-100,亮度调整为-2,使这张谷歌地图成为黑白的,就像谷歌告诉你的那样,但出于某种原因,mpas的外观没有改变,而是保持默认覆盖

你知道为什么吗

var map;
var marker;
var Longitude = -1.8822221000000354;
var Latitude = 50.72569620000001;
var zoom = 20;
var bounds = new google.maps.LatLngBounds();
var markers;
var new_marker;
var C;
var popupbubblepath = <%= this.popupbubble.ToString() %>;
var infowindow = new google.maps.InfoWindow();
var ib;

function LoadMap() {

    // Create an array of styles.
    var styles = [
        {
            stylers: [
                { saturation: -100 }, { lightness: -2 }
            ]
        },{
            featureType: "all",
            elementType: "all",

        }
    ];

    // Create a new StyledMapType object, passing it the array of styles,
    // as well as the name to be displayed on the map type control.
    //var styledMap = new google.maps.StyledMapType(styles, {name: "Styled Map"});

    var myOptions = {
        zoom: zoom,
        center: new google.maps.LatLng(Latitude, Longitude),
        mapTypeControl: false,
        scaleControl: false,
        streetViewControl: true,
        overviewMapControl: false,
        zoomControl: true,
        mapTypeControlOptions: {
            style:google.maps.MapTypeControlStyle.DROPDOWN_MENU,
            position:google.maps.ControlPosition.LEFT_BOTTOM 
        },
        zoomControlOptions: {
            style: google.maps.ZoomControlStyle.SMALL
        },
        panControl: false,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    }

    map = new google.maps.Map(document.getElementById("map"), myOptions);
var映射;
var标记;
变量经度=-1.88222100000354;
变量纬度=50.7256962000001;
var zoom=20;
var bounds=new google.maps.LatLngBounds();
var标记;
var新标记;
var C;
var popupblepath=;
var infowindow=new google.maps.infowindow();
var ib;
函数LoadMap(){
//创建样式数组。
变量样式=[
{
样式:[
{饱和度:-100},{亮度:-2}
]
},{
featureType:“全部”,
元素类型:“全部”,
}
];
//创建一个新的StyledMapType对象,将样式数组传递给它,
//以及要显示在地图类型控件上的名称。
//var styledMap=new google.maps.StyledMapType(样式,{name:“Styled Map”});
变量myOptions={
缩放:缩放,
中心:新google.maps.LatLng(纬度、经度),
mapTypeControl:false,
scaleControl:false,
街景控制:对,
overviewMapControl:错误,
动物控制:对,
mapTypeControlOptions:{
样式:google.maps.MapTypeControlStyle.DROPDOWN_菜单,
位置:google.maps.ControlPosition.LEFT_底部
},
ZoomControl选项:{
样式:google.maps.ZoomControlStyle.SMALL
},
泛控制:错误,
mapTypeId:google.maps.mapTypeId.ROADMAP
}
map=新的google.maps.map(document.getElementById(“map”),myOptions);
提前感谢!

请参阅