Skip to content

Commit 406e294

Browse files
authored
Merge pull request #1367 from OpenGeoscience/update-cdn
docs: Update cdn references
2 parents 0318b0e + b588408 commit 406e294

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

examples/blog-lines/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var Libraries = {
44
geojs: {
5-
url: 'https://cdnjs.cloudflare.com/ajax/libs/geojs/{version}/geo.min.js',
5+
url: 'https://cdn.jsdelivr.net/npm/geojs@{version}/geo.min.js',
66
defaultVersion: 'current',
77
mainReference: 'geo',
88
versions: {

src/trackFeature.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ var trackFeature = function (arg) {
216216
highidx = testidx;
217217
}
218218
}
219+
// todo: if we want non-linear travel between points, we would adjust
220+
// fl and fh here
219221
var fh = (time - lowt) / (hight - lowt), fl = 1 - fh;
220222
return {posidx0: lowidx, posidx1: highidx, factor0: fl, factor1: fh, angidx0: lowidx, angidx1: highidx};
221223
});

tutorials/common/tutorials.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var processBlockInfo = {
1313
'<html>\n' +
1414
'<head>\n' +
1515
/* We could also load from the CDN:
16-
* https://cdnjs.cloudflare.com/ajax/libs/geojs/1.4.2/geo.min.js
16+
* https://cdn.jsdelivr.net/npm/geojs/geo.min.js
1717
* or the non-minified versions to make debug easier. */
1818
' <script type="text/javascript" src="../../built/geo.min.js"></script>\n' +
1919
'</head>\n' +

tutorials/editor3/index.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ block mainTutorial
1717
<!-- Use a specific version of GeoJS by requesting it from a CDN.
1818
For instance, remove the local references, above, and
1919
uncomment the following:
20-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/geojs/1.4.2/geo.min.js"></script>
20+
<script src="https://cdn.jsdelivr.net/npm/geojs/geo.min.js"></script>
2121
-->
2222
</head>
2323
<body>

website/source/download/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ <h3>Download</h3>
1010
<h4>Released builds</h4>
1111
<p>Each released versions of GeoJS can be found on <a href="https://github.com/OpenGeoscience/geojs/releases">Github</a>.</p>
1212
<h4>Use GeoJS from CDN</h4>
13-
<p>GeoJS is hosted on <a href="https://cdnjs.com/libraries/geojs">cdnjs</a>. To use GeoJS, include the following in your HTML head:</p>
13+
<p>GeoJS is hosted on <a href="https://cdnjs.com/libraries/geojs">cdnjs</a>. It can also be accessed via cdn.jsdelivr.net and unpkg.com. To use GeoJS, include <b>one</b> of the following lines in your HTML head:</p>
1414
{% codeblock lang:html line_number:false %}
15-
<script src="https://cdnjs.cloudflare.com/ajax/libs/geojs/1.4.2/geo.min.js" integrity="sha256-t9oLE+BFJc7iWaTIqMFk+8dYJn5kmfg/FIdKNuAxMII=" crossorigin="anonymous"></script>
15+
<script src="https://cdnjs.cloudflare.com/ajax/libs/geojs/1.14.0/geo.min.js" integrity="sha512-UP9PPy450DGNsgZedRODl/TwPcLL+6Uoyzn05611NL36+BTXM7J9Higk6zhJCzfVcCVA8SBMfv11qmC0/AlW6g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
16+
<script src="https://cdn.jsdelivr.net/npm/geojs/geo.min.js"></script>
17+
<script src="https://unpkg.com/geojs/geo.min.js"></script>
1618
{% endcodeblock %}
1719
<p>This will include minified version of GeoJS and its dependencies on your page. The integrity hash will make sure the integrity of the file.</p>
1820
<h4>Install from NPM</h4>

0 commit comments

Comments
 (0)