将嵌入式地图(谷歌地图)的中心设置到特定位置 [英] set the center of a embedded map (google map) to a specific location
本文介绍了将嵌入式地图(谷歌地图)的中心设置到特定位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在网站中使用此地图,并且正在使用下一段HTML代码来添加它.
I'm trying to use this map in a website and I am using the next piece of HTML code to add it.
<iframe src="https://www.google.com/maps/d/embed?mid=zkqAm4_X6ia8.kj6iIDUiDRdc&hl=es" width="640" height="480"></iframe>
我的问题是我希望嵌入式地图仅显示乌得勒支地区,但我不知道如何更改嵌入式地图的中心.我知道参数z =将设置缩放级别.我已经尝试了文档中指定的center =参数,但是它似乎不起作用
My problem is that I want the embedded map to show the Utrecht area only, but I can't figure out how to change the center of the embedded map. I know that the parameter z= will set the zoom level. I've tried the center= parameter as specified in the documentation, but it does not seem to work
https://developers.google.com/maps/documentation/embed/指南#optional_parameters
有人设置中心吗?
提前谢谢!
推荐答案
您可以通过添加&ll=LAT, LONG
例如:
&ll=40.7127, -74.0059
只需将其添加到src
<iframe src="https://www.google.com/maps/d/embed?mid=zkqAm4_X6ia8.kj6iIDUiDRdc&hl=es&ll=40.7127, -74.0059" width="640" height="480"></iframe>
这篇关于将嵌入式地图(谷歌地图)的中心设置到特定位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文