0

所以我在 CodeIgniter 框架中设置了一个谷歌地图。我有一个“地图视图”按钮,可以将我带到地图,并且该地图可以正常加载,带有所有标记和所有内容。我想要完成的是从该页面获取基本地图并将其带到另一个页面并使其更小。听起来很简单吧!!好吧,当我将代码粘贴到新页面时,我会从 firebug 收到所有这些错误消息。我猜测页面上运行的其他 JavaScript 会导致这些错误,但我不确定。我已经粘贴了下面的代码...

<---------此代码在第一页上运行良好,所以我只想复制并粘贴到新页面中----------->

<div class="domtab">
        <?php
        echo '<div class="large-box"; style="float:left; margin: 0.5cm 1cm 0.5cm 1cm; padding: 1em";>';
        ?>
        <div class="domtab">
        <link href="/intelligencegraph/resources/css/style.css" rel="stylesheet" type="text/css" />  
        <link href="/intelligencegraph/resources/css/developer.css" rel="stylesheet" type="text/css" />  
        <link href="/intelligencegraph/resources/css/thickbox.css" rel="stylesheet" type="text/css" />  
        <link href="/intelligencegraph/resources/css/jquery-ui.css" rel="stylesheet" type="text/css" />  
        <script type="text/javascript" src="/intelligencegraph/resources/uploads/entity_icons" ></script>

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCy38HO--LhhK-BS1WqIDrHXyFU9ljaRT4&sensor=false"></script>
<script type="text/javascript">
        <script type="text/javascript">                   
  // This loads the map, 
  function initialize() {
    var myLatlng = new google.maps.LatLng(<?php echo $node_address?>);
    var myOptions = {
      zoom: 10,
      center: myLatlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }

    // Adding a marker, to map
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    var marker = new google.maps.Marker({
      position: myLatlng, 
      map: map
      });        
  }



</script>
<body onload="initialize()">
<!-- Size Of map-->
<div id="map_canvas" style="height: 500px; width: 100%;"></div> 
        </div>  

        </div>
    </div>

<---------这是我认为干扰它的代码--------->

<br style="clear: both;" /> 
<a onclick="document.getElementById('graphdb-viz').style.display = 'block'">View Visualization</a>

<div style="display: none" id="graphdb-viz">
    <iframe src="/intelligencegraph/viz/graph.jsp?nodeid=<?php echo $node_id ?>&database=<?php echo $database ?>" height="650" width="950"></iframe>
</div>


<a onclick="document.getElementById('graphdb-viz2').style.display = 'block'">View Alternative Visualization</a>

<div id="graphdb-viz2" style="height: 650px; width:950px; display: none" >
<script type="text/javascript" src="/intelligencegraph/resources/flash/swfobject.js"></script>
        <script type="text/javascript">
            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
            var swfVersionStr = "10.2.0";
            // To use express install, set to playerProductInstall.swf, otherwise the empty string. 
            var xiSwfUrlStr = "playerProductInstall.swf";
            var flashvars = {nodeid:<?php echo $node_id; ?>,database:'<?php echo $database; ?>'};
            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            var attributes = {};
            attributes.id = "GraphDBVis";
            attributes.name = "GraphDBVis";
            attributes.align = "middle";
            swfobject.embedSWF(
                "/intelligencegraph/resources/flash/GraphDBVis.swf", "flashContent", 
                "100%", "100%", 
                swfVersionStr, xiSwfUrlStr, 
                flashvars, params, attributes);
            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
        </script>
        <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough 
             JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
             when JavaScript is disabled.
        -->
        <div id="flashContent" style="height: 2000px; width:2000px" >
        </div>


</div> 

<---------这里是所有的错误信息--------->

//"NetworkError: 404 Not Found - http://localhost:8091/resources/js/ckeditor/ckeditor_basic.js"

ckeditor_basic.js

"NetworkError: 404 Not Found - http://localhost:8091/resources/js/jquery.js"

jquery.js

"NetworkError: 404 Not Found - http://localhost:8091/resources/js/jquery-ui.js"

jquery-ui.js

"NetworkError: 404 Not Found - http://localhost:8091/resources/js/thickbox.js"

thickbox.js

"NetworkError: 404 Not Found - http://localhost:8091/intelligencegraph/resources/uploads/entity_icons/"

/intel..._icons/

"NetworkError: 404 Not Found - http://localhost:8091/resources/js/jquery-ui.js"

jquery-ui.js

"NetworkError: 404 Not Found - http://localhost:8091/resources/js/thickbox.js"

thickbox.js

"NetworkError: 404 Not Found - http://localhost:8091/intelligencegraph/resources/uploads/entity_icons/"

"NetworkError: 404 Not Found - http://mbostock.github.com/d3/d3.layout.js?2.6.0"

d3.lay...s?2.6.0

"NetworkError: 404 Not Found - http://mbostock.github.com/d3/d3.geom.js?2.6.0"

如果一切都一样,为什么我在这个页面上得到它们而不是在另一个页面上?

4

1 回答 1

0

这不适用于任何页面,您在这里有一个双脚本标签:

<script type="text/javascript">
        <script type="text/javascript">//<--causes a syntax-error, remove this line                
  // This loads the map, 
于 2012-09-21T23:18:35.783 回答