Google地图API密钥无法使用 [英] Google Maps API key not working
问题描述
我在使Google Maps API密钥正常工作时遇到问题。我原本在尝试使用为 http://dev.domain.com 时遇到了问题href =http://domain.com =noreferrer> http://domain.com ,但是我后来尝试为 http://dev.domain.com ,它仍然没有工作。
I'm having a problem with getting my Google Maps API key to work. I originally had the problem when trying to access http://dev.domain.com using a key generated for http://domain.com, however I subsequently tried generating a key for http://dev.domain.com and it still didn't work.
我得到典型的此网站需要不同的Google Maps API密钥。尝试使用网站时,可以在http://code.google.com/apis/maps/。
警报消息中生成新密钥。检查他们的常见问题解答,并按照提示(窗口.location.host)
来检查域名是否返回 dev.domain.com
,它看起来是正确的(除非它的意思是http://开始?在这种情况下,我看不到我做错了什么)。
I get the typical This web site needs a different Google Maps API key. A new key can be generated at http://code.google.com/apis/maps/.
alert message when trying the site. Checking their FAQ and following it's instructions to alert(window.location.host)
to check the domain returns dev.domain.com
which looks correct (unless it's meant to have http:// at the start? In which case I don't see how I've done something wrong).
这两个键( dev.domain.com
和
domain.com
)在 localhost
上正常工作。
Both keys (dev.domain.com
and domain.com
) work correctly on localhost
.
有没有人对我可以做些什么来解决这个问题或者我可以做什么进一步的测试有什么想法?
Does anyone have any ideas on what I can do to solve this or any further tests I can do to work it out?
推荐答案
这篇关于Google地图API密钥无法使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!