Skip to content

Commit 110c429

Browse files
committed
new deployment
1 parent 49a0c34 commit 110c429

29 files changed

Lines changed: 64 additions & 55 deletions

File tree

compiled/berlin-bike-routes.js

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ const lat = 52.5233;
33
const lon = 13.4127;
44
const zoom = 11;
55

6-
const routes = [{ name: "Wannsee-Route RR1", gpx: "/gpx/wannseeroute_rr1.gpx" }, { name: "Gatow-Route RR2", gpx: "/gpx/gatow_route_rr2.gpx" }, { name: "Spandau-Route RR3", gpx: "/gpx/spandau_route_rr3.gpx" }, { name: "Hellersdorf-Route RR8", gpx: "/gpx/hellersdorf_route_rr8.gpx" }, { name: "Teltow-Route RR12", gpx: "/gpx/teltow_route_rr12.gpx" }, { name: "Nordspange TR2", gpx: "/gpx/nordspange_tr2.gpx" }, { name: "Südspange TR4", gpx: "/gpx/suedspange_tr4.gpx" }, { name: "Berliner Mauerweg 1 (Stadtroute)", gpx: "/gpx/mauerweg_1.gpx" }, { name: "Berliner Mauerweg 2 (Südroute)", gpx: "/gpx/mauerweg_2.gpx" }, { name: "Berliner Mauerweg 3 (Westroute)", gpx: "/gpx/mauerweg_3.gpx" }, { name: "Europaradweg R1 (West)", gpx: "/gpx/europaradweg_r1_west.gpx" }, { name: "Europaradweg R1 (Ost)", gpx: "/gpx/europaradweg_r1_ost.gpx" }, { name: "Radfernweg Berlin-Kopenhagen", gpx: "/gpx/radfernweg_berlin_kopenhagen.gpx" }, { name: "Radfernweg Berlin-Usedom", gpx: "/gpx/radfernweg_berlin_usedom.gpx" }];
6+
const routes = [{ name: 'Wannsee-Route RR1', gpx: '/gpx/wannseeroute_rr1.gpx' }, { name: 'Gatow-Route RR2', gpx: '/gpx/gatow_route_rr2.gpx' }, { name: 'Spandau-Route RR3', gpx: '/gpx/spandau_route_rr3.gpx' }, { name: 'Hellersdorf-Route RR8', gpx: '/gpx/hellersdorf_route_rr8.gpx' }, { name: 'Teltow-Route RR12', gpx: '/gpx/teltow_route_rr12.gpx' }, { name: 'Nordspange TR2', gpx: '/gpx/nordspange_tr2.gpx' }, { name: 'Südspange TR4', gpx: '/gpx/suedspange_tr4.gpx' }, { name: 'Berliner Mauerweg 1 (Stadtroute)', gpx: '/gpx/mauerweg_1.gpx' }, { name: 'Berliner Mauerweg 2 (Südroute)', gpx: '/gpx/mauerweg_2.gpx' }, { name: 'Berliner Mauerweg 3 (Westroute)', gpx: '/gpx/mauerweg_3.gpx' }, { name: 'Europaradweg R1 (West)', gpx: '/gpx/europaradweg_r1_west.gpx' }, { name: 'Europaradweg R1 (Ost)', gpx: '/gpx/europaradweg_r1_ost.gpx' }, { name: 'Radfernweg Berlin-Kopenhagen', gpx: '/gpx/radfernweg_berlin_kopenhagen.gpx' }, { name: 'Radfernweg Berlin-Usedom', gpx: '/gpx/radfernweg_berlin_usedom.gpx' }];
7+
8+
const routeStyle = {
9+
color: '#006600',
10+
weight: 5,
11+
opacity: 0.7
12+
};
713

814
function setMapHeight() {
915
const vis = document.getElementById('vis');
@@ -17,27 +23,30 @@ function setMapHeight() {
1723
function initMap() {
1824
setMapHeight();
1925

20-
map = new OpenLayers.Map("vis", {
21-
controls: [new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Attribution()]
22-
});
26+
map = L.map('vis').setView([lat, lon], zoom);
2327

24-
const layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
25-
map.addLayer(layerMapnik);
28+
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
29+
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
30+
}).addTo(map);
2631

27-
const lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
28-
map.setCenter(lonLat, zoom);
32+
const layerControl = L.control.layers().addTo(map);
2933

3034
routes.forEach((route, index) => {
31-
const lgpx = new OpenLayers.Layer.Vector(route.name, {
32-
strategies: [new OpenLayers.Strategy.Fixed()],
33-
protocol: new OpenLayers.Protocol.HTTP({
34-
url: route.gpx,
35-
format: new OpenLayers.Format.GPX()
36-
}),
37-
style: { strokeColor: "#060", strokeWidth: 5, strokeOpacity: 0.7 },
38-
projection: new OpenLayers.Projection("EPSG:4326"),
39-
visibility: index === 0 });
40-
map.addLayer(lgpx);
35+
const gpxLayer = new L.GPX(route.gpx, {
36+
async: true,
37+
polyline_options: routeStyle,
38+
marker_options: {
39+
startIconUrl: null,
40+
endIconUrl: null,
41+
shadowUrl: null
42+
}
43+
});
44+
45+
if (index === 0) {
46+
gpxLayer.addTo(map);
47+
}
48+
49+
layerControl.addOverlay(gpxLayer, route.name);
4150
});
4251
}
4352

css/berlin-bike-routes.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#OpenLayers_Control_LayerSwitcher_4,#OpenLayers_Control_MaximizeDiv_innerImage{right:1rem}#vis{width:100%;display:block}
1+
#vis{width:100%;display:block}

info/ballon-dor-male-players-votes-2013/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h2 id="about-the-visualization">About the Visualization</h2>
8484

8585
<div class="postinfo">
8686
<p>Published on January 13, 2014 (updated on March 30, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
87-
<br>Tags: <a href="/tags/network-graph/">network graph</a>, <a href="/tags/networkx/">networkx</a>, <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/football/">football</a>.</p>
87+
<br>Tags: <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/network-graph/">network graph</a>, <a href="/tags/networkx/">networkx</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/football/">football</a>.</p>
8888
</div> </main>
8989
<aside class="sidebar">
9090

info/ballon-dor-votes-2012/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ <h1>Who Voted for Whom at Ballon d'Or 2012</h1>
4545

4646
<div class="postinfo">
4747
<p>Published on January 09, 2013 (updated on March 30, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
48-
<br>Tags: <a href="/tags/network-graph/">network graph</a>, <a href="/tags/networkx/">networkx</a>, <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/football/">football</a>.</p>
48+
<br>Tags: <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/network-graph/">network graph</a>, <a href="/tags/networkx/">networkx</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/football/">football</a>.</p>
4949
</div> </main>
5050
<aside class="sidebar">
5151

info/berlin-bike-routes/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<title>A Map of Bike Routes in Berlin, Germany | Exploring Data</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<meta name="description" content="The bike routes map for Berlin, Germany shows 14 different biking routes through and around the city. Created with OpenLayers, Open Street Map and data from Senatsverwaltung für Stadtentwicklung und Umwelt.">
7+
<meta name="description" content="The bike routes map for Berlin, Germany shows 14 different biking routes through and around the city. Created with Leaflet, Open Street Map and data from Senatsverwaltung für Stadtentwicklung und Umwelt.">
88
<meta property="og:image" content="/img/preview/berlin-bike-routes.jpg">
99
<meta name="author" content="Ramiro Gómez">
1010
<link rel="canonical" href="https://exploring-data.com/info/berlin-bike-routes/">
@@ -38,12 +38,12 @@
3838
<div class="container two-column">
3939
<main class="main-3">
4040
<h1>A Map of Bike Routes in Berlin, Germany</h1>
41-
<p><a href="/maps/osm/berlin-bike-routes/">Berlin bike routes</a> is a map of Berlin, Germany showing 14 different biking routes through and around the city. By default 1 route is shown, Wansee-Route RR1. Routes can be added or removed from the map after clicking on the plus icon <img src="https://www.openlayers.org/api/img/layer-switcher-maximize.png" alt="layer switcher"> on the top right. The map can be zoomed and navigated using the controls on the left or the mouse.</p>
42-
<p>The map is created with <a href="https://www.openstreetmap.org/">OpenStreetMap</a> and the <a href="https://www.openlayers.org/">OpenLayers</a> JavaScript library. Bike route data is read from GPX files obtained from Berlin's <a href="https://www.berlin.de/sen/uvk/mobilitaet-und-verkehr/verkehrsplanung/radverkehr/radverkehrsnetz/radrouten/gpx/">Senatsverwaltung für Stadtentwicklung und Umwelt</a>.</p>
41+
<p><a href="/maps/osm/berlin-bike-routes/">Berlin bike routes</a> is a map of Berlin, Germany showing 14 different biking routes through and around the city. By default 1 route is shown, Wansee-Route RR1. Routes can be added or removed from the map after clicking on the "layers" icon on the top right. The map can be zoomed and navigated using the controls on the left or the mouse.</p>
42+
<p>The map is created with <a href="https://www.openstreetmap.org/">OpenStreetMap</a> and the <a href="https://leafletjs.com/">Leaflet</a> JavaScript library. Bike route data is read from GPX files obtained from Berlin's <a href="https://www.berlin.de/sen/uvk/mobilitaet-und-verkehr/verkehrsplanung/radverkehr/radverkehrsnetz/radrouten/gpx/">Senatsverwaltung für Stadtentwicklung und Umwelt</a>.</p>
4343

4444
<div class="postinfo">
45-
<p>Published on February 19, 2013 (updated on March 30, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
46-
<br>Tags: <a href="/tags/berlin/">berlin</a>, <a href="/tags/biking/">biking</a>, <a href="/tags/map/">map</a>, <a href="/tags/openstreetmap/">openstreetmap</a>.</p>
45+
<p>Published on February 19, 2013 (updated on March 31, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
46+
<br>Tags: <a href="/tags/biking/">biking</a>, <a href="/tags/berlin/">berlin</a>, <a href="/tags/openstreetmap/">openstreetmap</a>, <a href="/tags/map/">map</a>.</p>
4747
</div> </main>
4848
<aside class="sidebar">
4949

info/big-sister-cities/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h2 id="how-the-graph-was-created">How the graph was created</h2>
7070

7171
<div class="postinfo">
7272
<p>Published on April 26, 2018 (updated on February 14, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
73-
<br>Tags: <a href="/tags/cities/">cities</a>, <a href="/tags/diplomacy/">diplomacy</a>, <a href="/tags/network-graph/">network graph</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/networkx/">networkx</a>.</p>
73+
<br>Tags: <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/cities/">cities</a>, <a href="/tags/network-graph/">network graph</a>, <a href="/tags/networkx/">networkx</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/diplomacy/">diplomacy</a>.</p>
7474
</div> </main>
7575
<aside class="sidebar">
7676

info/co2-emissions/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h1>CO2 emissions (metric tons per capita)</h1>
5151

5252
<div class="postinfo">
5353
<p>Published on September 24, 2019 (updated on February 23, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
54-
<br>Tags: <a href="/tags/worldbank/">worldbank</a>, <a href="/tags/environment/">environment</a>, <a href="/tags/world/">world</a>, <a href="/tags/map/">map</a>, <a href="/tags/d3/">d3</a>, <a href="/tags/climate-change/">climate change</a>, <a href="/tags/global-warming/">global warming</a>.</p>
54+
<br>Tags: <a href="/tags/worldbank/">worldbank</a>, <a href="/tags/map/">map</a>, <a href="/tags/climate-change/">climate change</a>, <a href="/tags/world/">world</a>, <a href="/tags/environment/">environment</a>, <a href="/tags/global-warming/">global warming</a>, <a href="/tags/d3/">d3</a>.</p>
5555
</div> </main>
5656
<aside class="sidebar">
5757

info/footballers-search-relations/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h2>Summary</h2>
5252

5353
<div class="postinfo">
5454
<p>Published on March 13, 2013 (updated on February 14, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
55-
<br>Tags: <a href="/tags/network-graph/">network graph</a>, <a href="/tags/networkx/">networkx</a>, <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/football/">football</a>.</p>
55+
<br>Tags: <a href="/tags/sigmajs/">sigmajs</a>, <a href="/tags/network-graph/">network graph</a>, <a href="/tags/networkx/">networkx</a>, <a href="/tags/gephi/">gephi</a>, <a href="/tags/football/">football</a>.</p>
5656
</div> </main>
5757
<aside class="sidebar">
5858

info/forest-area/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h1>Forest Area Percentage of Land Area</h1>
5151

5252
<div class="postinfo">
5353
<p>Published on September 19, 2019 (updated on February 23, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
54-
<br>Tags: <a href="/tags/worldbank/">worldbank</a>, <a href="/tags/environment/">environment</a>, <a href="/tags/world/">world</a>, <a href="/tags/forest/">forest</a>, <a href="/tags/map/">map</a>, <a href="/tags/deforestation/">deforestation</a>, <a href="/tags/d3/">d3</a>, <a href="/tags/climate-change/">climate change</a>, <a href="/tags/global-warming/">global warming</a>.</p>
54+
<br>Tags: <a href="/tags/worldbank/">worldbank</a>, <a href="/tags/climate-change/">climate change</a>, <a href="/tags/map/">map</a>, <a href="/tags/forest/">forest</a>, <a href="/tags/world/">world</a>, <a href="/tags/environment/">environment</a>, <a href="/tags/global-warming/">global warming</a>, <a href="/tags/deforestation/">deforestation</a>, <a href="/tags/d3/">d3</a>.</p>
5555
</div> </main>
5656
<aside class="sidebar">
5757

info/intentional-homicides/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h1>Where in the World Happen Most Murders</h1>
4747

4848
<div class="postinfo">
4949
<p>Published on September 20, 2013 (updated on February 20, 2026) by <a href="https://ramiro.org/">Ramiro Gómez</a>. To be informed of new posts, subscribe to the <a href="/rss.xml">RSS feed</a>.
50-
<br>Tags: <a href="/tags/worldbank/">worldbank</a>, <a href="/tags/world/">world</a>, <a href="/tags/map/">map</a>, <a href="/tags/d3/">d3</a>, <a href="/tags/homicides/">homicides</a>.</p>
50+
<br>Tags: <a href="/tags/worldbank/">worldbank</a>, <a href="/tags/map/">map</a>, <a href="/tags/homicides/">homicides</a>, <a href="/tags/world/">world</a>, <a href="/tags/d3/">d3</a>.</p>
5151
</div> </main>
5252
<aside class="sidebar">
5353

0 commit comments

Comments
 (0)