通过调用我的函数 drawGmapLine() 我的浏览器说“line.setMap 不是函数”。我的地图创建没有任何问题。你能看出问题吗?
function drawGmapLine(id) {
    var map =  $("#map");
    var pfad = [
            new google.maps.LatLng(37.772323, -122.214897),
            new google.maps.LatLng(21.291982, -157.821856),
            new google.maps.LatLng(-18.142599, 178.431),
            new google.maps.LatLng(-27.46758, 153.027892)
        ];
        var line = new google.maps.Polyline({
          path: pfad,
          strokeColor: '#FF0000',
          strokeOpacity: 1.0,
          strokeWeight: 2
        });
        line.setMap(map);
}