我已经使用了新的谷歌地图的新嵌入代码,如下所示:
https://developers.google.com/maps/documentation/embed/guide
我的代码是:
<iframe width="500"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=KEY&q=Space+Needle,Seattle+WA">
</iframe>
Run Code Online (Sandbox Code Playgroud)
这很好,并正确显示地图
当我尝试使用下面的代码添加"center"参数时,它会将地图缩放到整个世界视图
<iframe width="500"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=KEY&q=Space+Needle,Seattle+WA¢er=47.620467,-122.349116">
</iframe>
Run Code Online (Sandbox Code Playgroud)
我最终想要做的是移动地图,使其不以实际标记为中心,但目前我正在测试一个非常接近标记的纬度和长度.
我正确使用¢er参数吗?有没有其他人得到&中心参数工作?
我已经检查过我使用的纬度和长度都在显示的地图中