无法嵌入Google地图

时间:2011-06-30 12:57:19

标签: google-maps google-plus

截至今天,似乎Google地图不再嵌入代码!

有人能指出我正确的方向,或者可能会提供一些旧的嵌入代码,我可以尝试将其嵌入有用的东西中吗?

以下是解释如何嵌入Google地图的文章: http://maps.google.com/help/maps/getmaps/quick.html

我认为这与过去几天出现的Google+社交网络“事物”有关。

此外,我已尝试上述链接中的说明,这些说明均已登录Google Apps帐户,但未登录任何Google帐户。

5 个答案:

答案 0 :(得分:1)

我刚刚尝试了嵌入代码,它似乎对我来说正常工作。你最近在网页上有什么改变吗?这是我试过的。

 <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" 
marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&
amp;q=Birmingham,+MI&amp;aq=1&amp;sll=37.0625,-95.677068&amp;sspn=64.880423,107.138672&
amp;ie=UTF8&amp;hq=&amp;hnear=Birmingham,+Oakland,+Michigan&amp;t=h&amp;z=12&
amp;ll=42.546701,-83.211319&amp;output=embed"></iframe><br /><small><a 
href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&
amp;q=Birmingham,+MI&amp;aq=1&amp;sll=37.0625,-95.677068&amp;sspn=64.880423,107.138672&
amp;ie=UTF8&amp;hq=&amp;hnear=Birmingham,+Oakland,+Michigan&amp;t=h&amp;z=12&
amp;ll=42.546701,-83.211319" style="color:#0000FF;text-align:left">View Larger Map</a></small>

答案 1 :(得分:1)

尝试停用地图实验室以使用地图嵌入。 - reference

答案 2 :(得分:1)

http://maps.google.com - 嵌入框现在又回来了。

我想这是一个暂时的故障。我很确定它不在我身边,我尝试了几种不同的机器和浏览器。

答案 3 :(得分:1)

Google地图已将设置链接从搜索栏的左下角,左上角,左侧移动

答案 4 :(得分:0)

以下是将Google地图添加到您的网页的代码。无需API密钥。

<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map-canvas { height: 100% }
</style>

<script type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?&sensor=true">
</script>

<script type="text/javascript">
  function initialize() {
    var mapOptions = {
      center: new google.maps.LatLng(54.584063, -5.928343),
      zoom: 8,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map-canvas"),
        mapOptions);
  }
  google.maps.event.addDomListener(window, 'load', initialize);
</script>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>BLAAAAAAAAAAAAAAAAAAA</title>
<link rel="stylesheet" href="style.css">

<body>
    <div id = "map-canvas"/>
</body>

相关问题