简体   繁体   English

如何降低 iframe 中加载的 google-map 的缩放级别

[英]How to decrease the zoom level of google-map loaded in iframe

I am loading map completely by iframe.我正在通过 iframe 完全加载地图。 In iframe all code corresponding to map is present.在 iframe 中,所有对应于 map 的代码都存在。 Iframe loaded dynamically in which zoom effect is not present.动态加载的 iframe,其中不存在缩放效果。 I want to control zoom effect of map in this case.在这种情况下,我想控制地图的缩放效果。 I know if map is directly loaded then it can control by "z" factor in link.我知道如果地图是直接加载的,那么它可以通过链接中的“z”因子进行控制。 But if in iFrame all map code is present so how i control on zoom factor of the map.但是如果在 iFrame 中存在所有地图代码,那么我如何控制地图的缩放系数。

<iframe src="<?php echo $file_name; ?>" width="100%" height="700px;" frameBorder="0"></iframe> 

this is code of line and $file_name is the html file load dynamically.这是行代码,$file_name 是动态加载的 html 文件。

map.setZoom(zoom:number) map.setZoom(缩放:数字)

Check this link for gmap options 检查此链接以获取 gmap 选项

Change the value of Z accordingly and the URL of course..相应地更改 Z 的值,当然还有 URL ..

<iframe src="http://mapsengine.google.com/map/u/0/embed?mid=zYk_BmXXTdxw.k83snDbX5SJc&z=9" width="745" height="480"></iframe>

Check this for more info 检查这个以获取更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM