Commit 1833fd6d authored by Jonas Heinrich's avatar Jonas Heinrich

fix loading of video when clicking on an exhibition object

parent 48dd051f
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"type": "painting", "type": "painting",
"url": "video/video4.html", "url": "/video/video4.html",
"description": "David Teniers d. J.: <strong>In der Schenke</strong> (1648), Kunsthalle Karlsruhe" "description": "David Teniers d. J.: <strong>In der Schenke</strong> (1648), Kunsthalle Karlsruhe",
"title": "Episode 4: Abendessen in der Scheune & co. | Ausstellung-Virtuell",
"slug": "/episodes/abendessen-in-der-scheune-und-co"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -20,8 +22,10 @@ ...@@ -20,8 +22,10 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"type": "painting", "type": "painting",
"url": "video/video8.html", "url": "/video/video8.html",
"description": "Matthias Grünewald: <strong>Heilige Märtyrerin</strong> (1511/12), Kunsthalle Karlsruhe" "description": "Matthias Grünewald: <strong>Heilige Märtyrerin</strong> (1511/12), Kunsthalle Karlsruhe",
"title": "Episode 8: Die heilige Elisabeth von Thüringen | Ausstellung-Virtuell",
"slug": "/episodes/die-heilige-elisabeth-von-thueringen"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -477,7 +481,9 @@ ...@@ -477,7 +481,9 @@
"properties": { "properties": {
"type": "painting", "type": "painting",
"description": "Wolfgang Münch/Kioyoshi Furukawa: <strong>Bubbles</strong> (2000), ZKM Karlsruhe", "description": "Wolfgang Münch/Kioyoshi Furukawa: <strong>Bubbles</strong> (2000), ZKM Karlsruhe",
"url": "video/video10.html" "url": "/video/video10.html",
"title": "Episode 10: Bubbles | Ausstellung-Virtuell",
"slug": "/episodes/bubbles"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -491,9 +497,11 @@ ...@@ -491,9 +497,11 @@
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"url": "video/video4.html", "url": "/video/video4.html",
"type": "painting", "type": "painting",
"description": "David Teniers d. J.: <strong>Dorffest</strong> (1648), Kunsthalle Karlsruhe" "description": "David Teniers d. J.: <strong>Dorffest</strong> (1648), Kunsthalle Karlsruhe",
"title": "Episode 4: Abendessen in der Scheune & co. | Ausstellung-Virtuell",
"slug": "/episodes/abendessen-in-der-scheune-und-co"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -509,7 +517,9 @@ ...@@ -509,7 +517,9 @@
"properties": { "properties": {
"type": "painting", "type": "painting",
"description": "Arnulf Rainer: <strong>Van Gogh als verkannter Hochstapler</strong> (1979), Städtische Gallerie Karlsruhe", "description": "Arnulf Rainer: <strong>Van Gogh als verkannter Hochstapler</strong> (1979), Städtische Gallerie Karlsruhe",
"url": "video/video7.html" "url": "/video/video7.html",
"title": "Episode 7: Van Gogh als verkannter Hochstapler | Ausstellung-Virtuell",
"slug": "/episodes/van-gogh-als-verkannter-hochstapler"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -524,8 +534,10 @@ ...@@ -524,8 +534,10 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"type": "painting", "type": "painting",
"url": "video/video2.html", "url": "/video/video2.html",
"description": "Heinz Mack: <strong>Dynamische Struktur</strong> (1958), Orangerie Kunsthalle Karlsruhe" "description": "Heinz Mack: <strong>Dynamische Struktur</strong> (1958), Orangerie Kunsthalle Karlsruhe",
"slug": "/episodes/dynamische-struktur",
"title": "Episode 2: Dynamische Struktur | Ausstellung-Virtuell"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -615,7 +627,9 @@ ...@@ -615,7 +627,9 @@
"properties": { "properties": {
"type": "painting", "type": "painting",
"description": "Marijke van Warmerdam: <strong>Take a long break I, II</strong> (2006), ZKM Karlsruhe", "description": "Marijke van Warmerdam: <strong>Take a long break I, II</strong> (2006), ZKM Karlsruhe",
"url": "video/video5.html" "url": "/video/video5.html",
"slug": "/episodes/take-a-long-break-1-2",
"title": "Episode 5: Take a long break I, II | Ausstellung-Virtuell"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -631,7 +645,9 @@ ...@@ -631,7 +645,9 @@
"properties": { "properties": {
"type": "painting", "type": "painting",
"description": "Sebastian Vrancx: <strong>Überfall auf einen Geleitzug</strong> (1618), Kunsthalle Karlsruhe", "description": "Sebastian Vrancx: <strong>Überfall auf einen Geleitzug</strong> (1618), Kunsthalle Karlsruhe",
"url": "video/video3.html" "url": "/video/video3.html",
"slug": "/episodes/ueberfall-auf-einen-geleitzug",
"title": "Episode 3: Überfall auf einen Geleitzug | Ausstellung-Virtuell"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -646,8 +662,10 @@ ...@@ -646,8 +662,10 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"type": "painting", "type": "painting",
"url": "video/video9.html", "url": "/video/video9.html",
"description": "Hans Baldung, gen. Grien: <strong>Markgraf Christoph I. von Baden mit seiner Familie in Anbetung vor der heiligen Anna Selbdritt</strong> (um 1510), Kunsthalle Karlsruhe" "description": "Hans Baldung, gen. Grien: <strong>Markgraf Christoph I. von Baden mit seiner Familie in Anbetung vor der heiligen Anna Selbdritt</strong> (um 1510), Kunsthalle Karlsruhe",
"title": "Episode 9: Markgraf Christoph I. von Baden mit seiner Familie | Ausstellung-Virtuell",
"slug": "/episodes/markgraf-christoph-1-von-baden-mit-seiner-familie"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -1083,9 +1101,11 @@ ...@@ -1083,9 +1101,11 @@
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"url": "video/video7.html", "url": "/video/video7.html",
"type": "painting", "type": "painting",
"description": "Arnulf Rainer: <strong>Van Gogh im schwarzen Schein</strong> (1977-79), Städtische Gallerie Karlsruhe" "description": "Arnulf Rainer: <strong>Van Gogh im schwarzen Schein</strong> (1977-79), Städtische Gallerie Karlsruhe",
"title": "Episode 7: Van Gogh als verkannter Hochstapler | Ausstellung-Virtuell",
"slug": "/episodes/van-gogh-als-verkannter-hochstapler"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -1100,8 +1120,10 @@ ...@@ -1100,8 +1120,10 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"type": "painting", "type": "painting",
"url": "video/video4.html", "url": "/video/video4.html",
"description": "David Teniers d. J.: <strong>Abendessen in der Scheune</strong> (1634), Kunsthalle Karlsruhe" "description": "David Teniers d. J.: <strong>Abendessen in der Scheune</strong> (1634), Kunsthalle Karlsruhe",
"slug": "/episodes/abendessen-in-der-scheune-und-co",
"title": "Episode 4: Abendessen in der Scheune & co. | Ausstellung-Virtuell"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -1191,7 +1213,9 @@ ...@@ -1191,7 +1213,9 @@
"properties": { "properties": {
"type": "painting", "type": "painting",
"description": "Marijke van Warmerdam: <strong>Take a long break I, II</strong> (2006), ZKM Karlsruhe", "description": "Marijke van Warmerdam: <strong>Take a long break I, II</strong> (2006), ZKM Karlsruhe",
"url": "video/video5.html" "url": "/video/video5.html",
"slug": "/episodes/take-a-long-break-1-2",
"title": "Episode 5: Take a long break I, II | Ausstellung-Virtuell"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -1207,7 +1231,9 @@ ...@@ -1207,7 +1231,9 @@
"properties": { "properties": {
"description": "Max Beckmann: <strong>Großes Stillleben mit Kerzen und Spiegel</strong> (1930), Orangerie Karlsruhe", "description": "Max Beckmann: <strong>Großes Stillleben mit Kerzen und Spiegel</strong> (1930), Orangerie Karlsruhe",
"type": "painting", "type": "painting",
"url": "video/video6.html" "url": "/video/video6.html",
"title": "Episode 6: Großes Stillleben mit Kerzen und Spiegel | Ausstellung-Virtuell",
"slug": "/episodes/grosses-stillleben-mit-kerzen-und-spiegel"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -1223,7 +1249,9 @@ ...@@ -1223,7 +1249,9 @@
"properties": { "properties": {
"type": "painting", "type": "painting",
"description": "Matthias Grünewald: <strong>Die heilige Elisabeth von Thüringen</strong> (1511/12), Kunsthalle Karlsruhe", "description": "Matthias Grünewald: <strong>Die heilige Elisabeth von Thüringen</strong> (1511/12), Kunsthalle Karlsruhe",
"url": "video/video8.html" "url": "/video/video8.html",
"title": "Episode 8: Die heilige Elisabeth von Thüringen | Ausstellung-Virtuell",
"slug": "/episodes/die-heilige-elisabeth-von-thueringen"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
...@@ -1238,8 +1266,10 @@ ...@@ -1238,8 +1266,10 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"type": "painting", "type": "painting",
"url": "video/video1.html", "url": "/video/video1.html",
"description": "Josef Albers: <strong>Ehrung des Quadrats: Gelbes Zentrum</strong> (1954), Orangerie Kunsthalle Karlsruhe</p>" "description": "Josef Albers: <strong>Ehrung des Quadrats: Gelbes Zentrum</strong> (1954), Orangerie Kunsthalle Karlsruhe</p>",
"slug": "/episodes/ehrung-des-quadrats",
"title": "Episode 1: Ehrung des Quadrats - Gelbes Zentrum | Ausstellung-Virtuell"
}, },
"geometry": { "geometry": {
"coordinates": [ "coordinates": [
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</div> </div>
</navigation> </navigation>
<map> <map>
<!-- <div id='map' style='width: 100%; height: 100%;'></div> --> <div id='map' style='width: 100%; height: 100%;'></div>
</map> </map>
<content> <content>
</content> </content>
......
...@@ -59,7 +59,7 @@ map.on('load', function() { ...@@ -59,7 +59,7 @@ map.on('load', function() {
} }
}, labelLayerId); */ }, labelLayerId); */
map.addSource('museum', { type: 'geojson', data: 'geojson/museum.geojson' }); map.addSource('museum', { type: 'geojson', data: '/geojson/museum.geojson' });
map.addLayer({ map.addLayer({
"id": "exhibits", "id": "exhibits",
...@@ -113,8 +113,10 @@ map.on('load', function() { ...@@ -113,8 +113,10 @@ map.on('load', function() {
}); });
map.on('click', 'exhibits', function (e) { map.on('click', 'exhibits', function (e) {
var link = e.features[0].properties.url; var url = e.features[0].properties.url;
load_page(link); var title = e.features[0].properties.title;
var slug = e.features[0].properties.slug;
load_page(url, title, slug);
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment