如何修复错误:W083

时间:2017-08-22 03:31:27

标签: javascript

如何在以下代码中修复Error: W083

我尝试了一些东西,但后来我的功能无效。

new google.maps.event.addListener(location[i].holdMarker, 'click', (function(marker, i) {
    return function() {
        infowindow.setContent(location[i].contentString);
        infowindow.open(map,this);
        var windowWidth = $(window).width();
        if (windowWidth <= 1080) {
            map.setZoom(13);
        } else if (windowWidth > 1080) {
            map.setZoom(14);  
        }
        map.setCenter(marker.getPosition());
        location[i].picBoolTest = true;
    }; 
})(location[i].holdMarker, i));

//Loads the infoWindow when a item is selected fron nav list
var searchNav = $('#nav' + i);
searchNav.click((function(marker, i) {
    return function() {
        infowindow.setContent(location[i].contentString);
        infowindow.open(map,marker);
        map.setZoom(14);
        map.setCenter(marker.getPosition());
        location[i].picBoolTest = true;
     }; 
})(location[i].holdMarker, i));

0 个答案:

没有答案