如何在本地而不是从 CDN 中包含 Google Maps JS 库
How to include Google Maps JS library locally and not from CDN
目前我正在我的混合移动应用程序中像这样从 google CDN 加载 google 地图 JS API。
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places,geometry"></script>
是否有一种干净、官方的方法可以将此库本地包含在我的资源中?例如,我找不到官方的 Bower 组件等...
例如
<script type="text/javascript" src="lib/maps/api/js?libraries=places,geometry"></script>
我可以只从上面 URL 下载 JS 文件并将其包含在我的网络应用程序的相关文件夹中吗?
没有。 Terms 状态:
10.1 Administrative Restrictions.
No access to APIs or Content except through the Service. You will not access the Maps API(s) or the Content except through the Service.
For example, you must not access map tiles or imagery through
interfaces or channels (including undocumented Google interfaces)
other than the Maps API(s).
10.5 Intellectual Property Restrictions.
No use of Content outside the Service. You will not use any Content outside of the Service
except as expressly permitted to do so in Subsection (d). For example,
you will not export or save the Content to a third party’s platform or
service. No caching or storage. You will not pre-fetch, cache, index,
or store any Content to be used outside the Service, except that you
may store limited amounts of Content solely for the purpose of
improving the performance of your Maps API Implementation due to
network latency (and not for the purpose of preventing Google from
accurately tracking usage), and only if such storage:
- is temporary (and in no event more than 30 calendar days);
- is secure;
- does not manipulate or aggregate any part of the Content or Service; and
- does not modify attribution in any way.
目前我正在我的混合移动应用程序中像这样从 google CDN 加载 google 地图 JS API。
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places,geometry"></script>
是否有一种干净、官方的方法可以将此库本地包含在我的资源中?例如,我找不到官方的 Bower 组件等...
例如
<script type="text/javascript" src="lib/maps/api/js?libraries=places,geometry"></script>
我可以只从上面 URL 下载 JS 文件并将其包含在我的网络应用程序的相关文件夹中吗?
没有。 Terms 状态:
10.1 Administrative Restrictions.
No access to APIs or Content except through the Service. You will not access the Maps API(s) or the Content except through the Service. For example, you must not access map tiles or imagery through interfaces or channels (including undocumented Google interfaces) other than the Maps API(s).
10.5 Intellectual Property Restrictions.
No use of Content outside the Service. You will not use any Content outside of the Service except as expressly permitted to do so in Subsection (d). For example, you will not export or save the Content to a third party’s platform or service. No caching or storage. You will not pre-fetch, cache, index, or store any Content to be used outside the Service, except that you may store limited amounts of Content solely for the purpose of improving the performance of your Maps API Implementation due to network latency (and not for the purpose of preventing Google from accurately tracking usage), and only if such storage:
- is temporary (and in no event more than 30 calendar days);
- is secure;
- does not manipulate or aggregate any part of the Content or Service; and
- does not modify attribution in any way.