Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/452.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
Jquery与GMAPSAPI的Javascript冲突?我该如何解决?_Javascript_Jquery_Html_Css - Fatal编程技术网

Jquery与GMAPSAPI的Javascript冲突?我该如何解决?

Jquery与GMAPSAPI的Javascript冲突?我该如何解决?,javascript,jquery,html,css,Javascript,Jquery,Html,Css,有人能回答为什么jquery在下面不起作用吗 我在谷歌地图上使用的javascript和jquery之间是否存在某种冲突?我如何才能得到它,使它们正常工作?我很确定我已经引用了html中的所有内容 function initialize() { var flightPlanCoordinates = [ new google.maps.LatLng(9.9333, -84.0833), new google.maps.LatLng(10.4714, -84

有人能回答为什么jquery在下面不起作用吗

我在谷歌地图上使用的javascript和jquery之间是否存在某种冲突?我如何才能得到它,使它们正常工作?我很确定我已经引用了html中的所有内容

function initialize() {
    var flightPlanCoordinates = [
        new google.maps.LatLng(9.9333, -84.0833),
        new google.maps.LatLng(10.4714, -84.6454),
        new google.maps.LatLng(10.3143, -84.8250),
        new google.maps.LatLng(9.8833,  -85.5333),
        new google.maps.LatLng(9.6500,  -85.0667),
        new google.maps.LatLng(9.4319,  -84.1615),
        new google.maps.LatLng(9.9333, -84.0833)
    ];
    var flightPath = new google.maps.Polyline({
        path: flightPlanCoordinates,
        geodesic: true,
        strokeColor: 'blue',
        strokeOpacity: 0.5,
        strokeWeight: 3
    });

    flightPath.setMap(map);

    google.maps.event.addDomListener(window, "resize", function() {
        var center = map.getCenter();
        google.maps.event.trigger(map, "resize");
        map.setCenter(center); 
        document.getElementById('map_canvas').style.height = (h*0.4)+"px";
        document.getElementById('wrapper2').style.maxHeight = (h-15)+"px";
        document.getElementById('info').style.maxHeight = (h-(h*0.4)-15)+"px";
    });
}
google.maps.event.addDomListener(window, 'load', initialize);

$(document).ready(function() {

    $('photos').hide();

});

什么不起作用?无论如何,
photos
不是一个有效的HTML标记,它应该是
。photos
很可能是一个[class selector]。它是一个ID,但你说得对,我不会在里面放一个#!谢谢:)