开发者

Google Maps JavaScript API V3 not working on localhost

i m using Google map markers with info window but when run the script on the browser it shows only map image without any functionality can some one tell whether i need to generate api key for this i开发者_C百科s what i m trying to run on localhost , see the link


Delete the line:

<script src="http://maps.gstatic.com/intl/en_us/mapfiles/api-3/5/5/main.js" type="text/javascript"></script>

and you're good to go.


Google maps (and many other client-server services) only work via HTTP.

Navigating to file://C:\Users\Greg\Documents and Settings\My Documents\WEBSITES\CoolSite\Index.html is fine for displaying the HTML, but any client-server communication will fail.

Serve the website to something like http://coolsite.localhost (note http:// rather than file://).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜