Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.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
Google maps api 3 首次使用谷歌地图Java API-不';我不会出现在IE 10中_Google Maps Api 3 - Fatal编程技术网

Google maps api 3 首次使用谷歌地图Java API-不';我不会出现在IE 10中

Google maps api 3 首次使用谷歌地图Java API-不';我不会出现在IE 10中,google-maps-api-3,Google Maps Api 3,我刚开始使用GoogleMapsAPI,遇到了API方面的问题。我使用的代码来自GoodMaps示例,它可以与Chrome和Firefox一起使用,但在IE10中没有显示任何内容。 我在没有帮助的情况下搜索了主题。我在IE中添加了安全站点,尝试了v=3.28的技巧,还尝试了向后兼容的元标记,但没有成功 以下是我的html: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml">

我刚开始使用GoogleMapsAPI,遇到了API方面的问题。我使用的代码来自GoodMaps示例,它可以与Chrome和Firefox一起使用,但在IE10中没有显示任何内容。 我在没有帮助的情况下搜索了主题。我在IE中添加了安全站点,尝试了v=3.28的技巧,还尝试了向后兼容的元标记,但没有成功

以下是我的html:

      <!DOCTYPE html>
      <html xmlns="http://www.w3.org/1999/xhtml">

      <head>
            <title></title>
      </head>
      <body>

      <div id="map" style="width:100%;height:1200px;"></div>

      <script>        
              function initMap() {
              var myLatLng = { lat: 32.681390, lng: -97.108682 };
          var map = new google.maps.Map(document.getElementById('map'), {
            center: myLatLng,
            zoom: 14
        });

        var marker = new google.maps.Marker({
            position: myLatLng,
            map: map,
        });

        var infowindow = new google.maps.InfoWindow();
        var service = new google.maps.places.PlacesService(map);            
         }        
         </script>
         <script src="https://maps.googleapis.com/maps/api/js?key=MyKey&callback=initMap">
         </script>
         </body>
         </html>

函数initMap(){
var Mylatng={lat:32.681390,液化天然气:-97.108682};
var map=new google.maps.map(document.getElementById('map'){
中心:myLatLng,
缩放:14
});
var marker=new google.maps.marker({
职位:myLatLng,
地图:地图,
});
var infowindow=new google.maps.infowindow();
var service=newgoogle.maps.places.PlacesService(地图);
}        
上面的标记在IE 10中没有显示任何地图。我无法前进。我只是从这个开始,想在asp.net 4.5的更新面板中使用它。但目前,简单的html对我来说不起作用

有什么建议吗?
谢谢。

您启用activeX了吗?是的,我启用了activeX并添加到安全站点。与Chrome和FireFox配合使用效果良好,但不会在IE中显示任何内容。发布的代码在IE11中适用于我(我没有可用的IE10)。根据IE10的支持(只要不使用兼容模式);在代码的上面添加了一行,但仍然没有帮助。仍然适用于Chrome和Firefox,但不适用于IE。@geocodezip。。。。我没有使用IE 10的兼容模式。