Skip to content

Commit

Permalink
docs: Update cdn references
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Feb 13, 2025
1 parent 0318b0e commit b588408
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/blog-lines/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var Libraries = {
geojs: {
url: 'https://cdnjs.cloudflare.com/ajax/libs/geojs/{version}/geo.min.js',
url: 'https://cdn.jsdelivr.net/npm/geojs@{version}/geo.min.js',
defaultVersion: 'current',
mainReference: 'geo',
versions: {
Expand Down
2 changes: 2 additions & 0 deletions src/trackFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ var trackFeature = function (arg) {
highidx = testidx;
}
}
// todo: if we want non-linear travel between points, we would adjust
// fl and fh here
var fh = (time - lowt) / (hight - lowt), fl = 1 - fh;
return {posidx0: lowidx, posidx1: highidx, factor0: fl, factor1: fh, angidx0: lowidx, angidx1: highidx};
});
Expand Down
2 changes: 1 addition & 1 deletion tutorials/common/tutorials.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var processBlockInfo = {
'<html>\n' +
'<head>\n' +
/* We could also load from the CDN:
* https://cdnjs.cloudflare.com/ajax/libs/geojs/1.4.2/geo.min.js
* https://cdn.jsdelivr.net/npm/geojs/geo.min.js
* or the non-minified versions to make debug easier. */
' <script type="text/javascript" src="../../built/geo.min.js"></script>\n' +
'</head>\n' +
Expand Down
2 changes: 1 addition & 1 deletion tutorials/editor3/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ block mainTutorial
<!-- Use a specific version of GeoJS by requesting it from a CDN.
For instance, remove the local references, above, and
uncomment the following:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/geojs/1.4.2/geo.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/geojs/geo.min.js"></script>
-->
</head>
<body>
Expand Down
6 changes: 4 additions & 2 deletions website/source/download/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ <h3>Download</h3>
<h4>Released builds</h4>
<p>Each released versions of GeoJS can be found on <a href="https://github.com/OpenGeoscience/geojs/releases">Github</a>.</p>
<h4>Use GeoJS from CDN</h4>
<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>
<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>
{% codeblock lang:html line_number:false %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/geojs/1.4.2/geo.min.js" integrity="sha256-t9oLE+BFJc7iWaTIqMFk+8dYJn5kmfg/FIdKNuAxMII=" crossorigin="anonymous"></script>
<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>
<script src="https://cdn.jsdelivr.net/npm/geojs/geo.min.js"></script>
<script src="https://unpkg.com/geojs/geo.min.js"></script>
{% endcodeblock %}
<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>
<h4>Install from NPM</h4>
Expand Down

0 comments on commit b588408

Please sign in to comment.