【问题标题】:Google Maps App: Hosting .js Files on Google DriveGoogle 地图应用:在 Google Drive 上托管 .js 文件
【发布时间】:2018-08-18 12:16:27
【问题描述】:

我发现了一些旧链接,其中包含在 Google 云端硬盘上托管 .js 文件的提示。随着时间的推移,正确的方法似乎发生了变化;我无法让我的 Google 地图应用在托管时查看所需的参考资料。当 .js 文件位于本地时,地图应用可以正常工作。

猜的很简单,只需要知道正确的做法。

这是我所在的地方:

1.  Created a shared folder on Google Drive
2.  Uploaded, then shared the 2 .js files
3.  Grabbed the shared file link and inserted into the reference, example:
    Replaced:  <script type="text/javascript" src="labels.js"></script>
    With:  <script type="text/javascript" src="https://drive.google.com/open?id=<my id here></script>
No luck
4.  I tried using just the shared folder ID, and appended the "/labels.js" filename
Also No luck

对完成这项任务有什么建议吗?

谢谢

【问题讨论】:

    标签: javascript google-maps google-maps-api-3 drive


    【解决方案1】:

    经过更多的探索和朋友的帮助,以下表格似乎有效:

    <script type="text/javascript" src="https://drive.google.com/uc?export=download&id="my_doc_id"</script>
    

    【讨论】:

    • 您在 "my_doc_id" 之后缺少引号和 '>' 。应该是:
    猜你喜欢
    • 2016-01-13
    • 2016-01-03
    • 1970-01-01
    • 1970-01-01
    • 2014-07-10
    • 2020-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多