Skip to content

Commit

Permalink
more tweaks on the way to publishing stamen maps update.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGermuska committed Oct 6, 2023
1 parent b7f84e0 commit 5422865
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 45 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.9.2 (2023-10-06)
* Minor bug-fixes in advance of launching authoring tool update.

0.9.1 (2023-10-02)
* Hard-code preserving undefined map type as toner-lite, temporarily.

Expand Down
2 changes: 1 addition & 1 deletion dotenv.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AWS_ENDPOINT_URL=https://localstack:4566
AWS_SSL_VERIFY=false
AWS_STORAGE_BUCKET_KEY=storymapjs
AWS_STORAGE_BUCKET_NAME=uploads.knilab.com
AWS_STORAGE_BUCKET_URL=//localhost:4566/uploads.knilab.com/
AWS_STORAGE_BUCKET_URL=http://localhost:4566/uploads.knilab.com/
CDN_URL=https://localhost/compiled/
DB_ENGINE__DEFAULT=mongo
DB_HOST__DEFAULT=mongo
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "StoryMapJS",
"version": "0.9.1",
"version": "0.9.2",
"description": "StoryMapJS is a tool for telling stories through the context of places on a map. For more information, see storymap.knightlab.com",
"private": "true",
"directories": {
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ psycopg2-binary==2.8.5
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.14
pycrypto==2.6
PyNaCl==1.3.0
pyOpenSSL==20.0.1
python-slugify==1.1.2
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ psycopg2-binary==2.8.5
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.14
pycrypto==2.6
PyNaCl==1.3.0
pyOpenSSL==20.0.1
python-slugify==1.1.2
Expand Down
16 changes: 8 additions & 8 deletions src/embed/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@

<body>
<div id="storymap-embed"></div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-27829802-2"></script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M95DDQGLWH"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-27829802-2', {
'anonymize_ip': true,
'linker': { 'domains': ['knightlab.com'] }
});

gtag('config', 'G-M95DDQGLWH');
gtag('event', 'EmbeddedIn', {
'event_label': document.referrer,
'event_category': 'StoryMapJS',
'non_interaction': true
});
})

</script>

<script>
Expand Down
10 changes: 7 additions & 3 deletions src/js/map/leaflet/Map.Leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export default class Leaflet extends Map {
this._map.on("moveend", this._onMapMoveEnd, this);
this._map.attributionControl.setPrefix("<a href='http://storymap.knightlab.com/' target='_blank' class='vco-knightlab-brand'><span>&#x25a0;</span> StoryMapJS</a>");

var map_type_arr = this.options.map_type.split(':');

// Create Tile Layer
this._tile_layer = this._createTileLayer(this.options.map_type);
this._tile_layer.on("load", this._onTilesLoaded, this);
Expand Down Expand Up @@ -242,8 +240,14 @@ export default class Leaflet extends Map {
break;

case 'ch-watercolor':
options.url = "https://watercolormaps.collection.cooperhewitt.org/tile/watercolor//{Z}/{X}/{Y}.png"
options.attribution = _attribution_knightlab + _attribution_cooperhewitt
options.type = 'jpg'
options.minZoom = 0
options.maxZoom = 16
_tilelayer = new L.TileLayer("https://watercolormaps.collection.cooperhewitt.org/tile/watercolor/{z}/{x}/{y}.jpg", options);

break;

case 'osm':
default: // osm is the default now
options.subdomains = 'ab';
Expand Down
2 changes: 1 addition & 1 deletion src/js/map/tile/TileLayer.Stamen.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let PROVIDERS = {
"terrain": MAKE_PROVIDER("stamen_terrain", "jpg", 4, 18),
"watercolor": MAKE_PROVIDER("stamen_watercolor", "jpg", 0, 16),
"ch_watercolor": {
"url": "https://watercolormaps.collection.cooperhewitt.org/tile/watercolor//{Z}/{X}/{Y}.png",
"url": "https://watercolormaps.collection.cooperhewitt.org/tile/watercolor//{z}/{x}/{y}.png",
"type": 'png',
"subdomains": '',
"minZoom": 0,
Expand Down
12 changes: 3 additions & 9 deletions storymap/templates/_analytics.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-27829802-1"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8F4WPDMPL5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-27829802-1',
{
'anonymize_ip': true,
'linker': {
'domains': ['knightlab.com']
}
});
gtag('config', 'G-8F4WPDMPL5');
</script>
34 changes: 14 additions & 20 deletions storymap/templates/_embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,22 @@
<body>
<div id="storymap-embed"></div>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-27829802-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M95DDQGLWH"></script>
<script>
window.dataLayer = window.dataLayer || [];

gtag('config', 'UA-27829802-2',
{
'anonymize_ip': true,
'linker': {
'domains': ['knightlab.com']
}
});
function gtag(){ dataLayer.push(arguments); }

gtag('js', new Date());
gtag('config', 'G-M95DDQGLWH');
gtag('event', 'EmbeddedIn', {
'event_label': document.referrer,
'event_category': 'StoryMapJS',
'non_interaction': true
})

gtag('event', 'EmbeddedIn', {
'event_label': document.referrer,
'event_category': 'StoryMapJS',
'non_interaction': true
});
</script>
<!-- End Google Analytics -->
</script>

<script type="text/javascript">
var storymap;
Expand Down

0 comments on commit 5422865

Please sign in to comment.