简体   繁体   English

登录后使用谷歌地图

[英]using google map after logging

I have a project witch is using googleMap, when I used localhost googleMap works correctly and anythings is OK, but when I deploy it on the other computer the site can not work(don't show google map!!!). 我有一个项目女巫正在使用googleMap,当我使用本地主机googleMap可以正常工作并且一切正常时,但是当我将其部署在另一台计算机上时,该站点将无法工作(不显示google map !!)。 I got a valid key but stil this problem exists! 我有一个有效的密钥,但仍然存在此问题! please help me! 请帮我!

Might it be a cross-site scripting issue? 可能是跨站点脚本问题? There's an option in the GoogleMaps preferences that allows you to turn off security. GoogleMaps首选项中有一个选项可让您关闭安全性。 As an experiment, try turning it off to see if it makes any difference. 作为实验,请尝试将其关闭以查看是否有任何区别。 (And don't forget to turn it back on when you are done!) (并且别忘了在完成后将其重新打开!)

Do you manage correctly the errors from Google Map API in your code, in order to see if there is a given error returned by one of the google map function you use 您是否在代码中正确管理了Google Map API中的错误,以便查看您使用的其中一个Google Map函数是否返回了给定的错误

Also, did you inspect the page when deployed on the other computer, with a tool like firebug/web inspector, to see if there are some errors linked to the problem 另外,当您将页面部署到另一台计算机上时是否使用firebug / web inspector之类的工具检查该页面,以查看是否存在与此问题相关的错误

This really sounds like an API key problem. 这听起来确实像是API密钥问题。 Make sure that you used the right domain to get your key. 确保您使用正确的域来获取密钥。

If you use "example.com" to get your key, all of the sub-directories on example.com will be valid. 如果您使用“ example.com”获取密钥,则example.com上的所有子目录均有效。

If that's not it, you definitely need to use Firebug to find out what the error is. 如果不是那样,那么您肯定需要使用Firebug来找出错误所在。

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

相关问题 Spring 安全性 - 如何在使用主体通过 OAuth/Google 登录后检索数据(如 email、姓名、图片等)? - Spring Security - How do I retrieve data (like email, name, picture, etc) after logging in with OAuth/Google by using principal? 登录Google Play游戏服务后获取玩家ID - Getting player ID after logging in to Google Play Game Services 在片段中使用Google地图 - Using Google map within a fragment 即使在使用 Json 隐藏 Google Map 的所有内容后,建筑物(Blok M Square)仍然可见 - Even after hiding everything from Google Map using Json to style, a building (Blok M Square) stays visible 应用程式在呼叫Google Map活动后终止 - App terminates after calling google map activity 谷歌最近一次更新后,Direction API谷歌地图出现问题 - Problem with Direction API google map after the last update from google 使用Java使用Google Map下载地图图像 - Downloading a map image using Google Map using Java 使用Google Flogger记录ClassNotFoundException时找不到记录平台:com.google.common.flogger.backend.system.DefaultPlatform - No logging platforms found in while using google flogger logging ClassNotFoundException: com.google.common.flogger.backend.system.DefaultPlatform 无法使用API​​ 2显示Google地图 - Can't display google map using API 2 如何使用Java在浏览器上显示Google Map? - how to display google map on browser using java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM