标记不集中在谷歌地图的iframe中 [英] Marker not centering in iframe for google map

查看:117
本文介绍了标记不集中在谷歌地图的iframe中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点奇怪的要求在iframe中打开谷歌地图。我有地址,我用来传递和转换成谷歌地图。但麻烦的是我的iframe的大小是200 * 200,所以标记没有居中。另一个问题是标记infowindow也会在几秒钟后得到poppedup,这会让我的标记超出帧边界。并且标记将从中心移动。
我的代码就是这样。

$ $ $ $ $ $ $ $ $ $(document).ready(function(){
$ (#map_address)。each(function(){
var embed ='< iframe class =map_googlewidth =200scrolling =noheight =200frameborder =0src =https:/maps.google.com/maps?& q = Ahmedab​​ad& output = embedmarginwidth =0marginheight =0>';
$(this).html(embed) ;
});
});

我想关闭标记信息窗口并使标记顺畅。任何帮助将不胜感激。



这是通过使用
http://jsbin.com/welcome/68407/edit 在iframe-URL中添加一个没有值的 iwloc - 参数: http://jsbin.com/emoyup/1/edit



URL参数说明: http://www.seomoz.org/ugc/everything-you-never知道关于谷歌地图的参数


I have bit strange requirement of open google map in iframe. i have address that i use to pass and convert that into google map. but the trouble is the size of my iframe is 200*200 so the marker is not getting centered. and the other problem is the marker infowindow also gets poppedup after few seconds that makes my marker out of the frame boundry.and marker moves from the centere. my code is like this.

$(document).ready(function(){
  $("#map_address").each(function(){   
    var embed ='<iframe class="map_google" width="200" scrolling="no" height="200" frameborder="0" src="https:/maps.google.com/maps?&q=Ahmedabad&output=embed" marginwidth="0" marginheight="0">';
    $(this).html(embed);
  });
});

i want to close the marker info window and make the marker cenetered. any help will be appreciated.

this was created by the use of the http://jsbin.com/welcome/68407/edit

解决方案

Add an iwloc-parameter without a value to the iframe-URL: http://jsbin.com/emoyup/1/edit

Description of URL-parameters: http://www.seomoz.org/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters

这篇关于标记不集中在谷歌地图的iframe中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆