简体   繁体   English

谷歌地图静态API - 标记没有显示

[英]Google maps static api - Marker doesn't show up

I got a static map link using this wizard http://gmaps-samples.googlecode.com/svn/trunk/simplewizard/makestaticmap.html and the marker is on the image, but when i put this link into my website, the marker doesn't show up. 我使用这个向导获得了一个静态地图链接http://gmaps-samples.googlecode.com/svn/trunk/simplewizard/makestaticmap.html并且标记位于图像上,但当我将此链接放入我的网站时,标记没有出现。

Here is the website where i'm trying to view the map. 这是我试图查看地图的网站。 I see the map, but no marker. 我看到地图,但没有标记。 http://church.allthingswebdesign.com http://church.allthingswebdesign.com

I just have the link in an image tag like this 我只是在这样的图像标签中有链接

<img id="map" src="http://maps.google.com/staticmap?center=43.963415,-92.460594&zoom=14&markers=Comfort+Suites,+4141+Maine+Ave+SE,+Rochester,+MN++55904&size=300x400&sensor=TRUE_OR_FALSE&key=ABQIAAAA6-Rq-t8XwsqXeXws3DleLBSI_7XewNJfovQwsmZjGMbTG7rp6BQaj3bwm-gy7nGQPyWKPTd3zPtcVA" alt="Map" />

Why doesn't the marker show up on my website? 为什么标记不会显示在我的网站上?

Ok, one thing to change - where it says TRUE_OR_FALSE in the url try changing it to false (all lower case). 好的,有一件事需要改变 - 在url中说TRUE_OR_FALSE尝试将其更改为false (全部小写)。

If I browse directly to the url of the image provided, I don't see a marker so I suspect it's a problem with the wizard rather than your site. 如果我直接浏览提供的图像的网址,我没有看到标记,所以我怀疑它是向导而不是您的网站的问题。

Try this: 试试这个:

<img src="https://maps.google.com/maps/api/staticmap?center=43.962072,-92.456297&zoom=13&markers=43.962072,-92.456297&size=300x400&sensor=false&key=ABQIAAAA6-Rq-t8XwsqXeXws3DleLBSI_7XewNJfovQwsmZjGMbTG7rp6BQaj3bwm-gy7nGQPyWKPTd3zPtcVA">

For details on the sensor parameter, see here 有关传感器参数的详细信息, 请参见此处

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

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