CINXE.COM

CyclOSM: OpenStreetMap-based bicycle map

<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=description content="CyclOSM is a beautiful open cycle map built on top of OpenStreetMap data. It provides a useful map for each and every cyclist, no matter the practice (commuting, touring, …). CyclOSM is a free and open-source software."> <meta name="twitter:image:src" content="https://www.cyclosm.org/images/social_media.png" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:title" content="CyclOSM"> <meta name="twitter:description" content="A bicycle-oriented map for every cyclist, based on OpenStreetMap data."> <meta property="og:site_name" content="CyclOSM" /> <meta property=og:image content="https://www.cyclosm.org/images/social_media.png"> <meta property=og:type content="website"> <meta property=og:title content="CyclOSM"> <meta property=og:url content="https://cyclosm.org/"> <meta property=og:description content="A bicycle-oriented map for every cyclist, based on OpenStreetMap data."> <link rel="icon" type="image/png" sizes="16x16" href="https://www.cyclosm.org/images/favicon-16.png"> <link rel="icon" type="image/png" sizes="228x228" href="https://www.cyclosm.org/images/favicon-228.png"> <link rel="icon" type="image/png" sizes="32x32" href="https://www.cyclosm.org/images/favicon-32.png"> <link rel="shortcut icon" href="https://www.cyclosm.org/images/favicon.ico"> <link rel="manifest" href="./manifest.webmanifest"> <title>CyclOSM: OpenStreetMap-based bicycle map</title> <link rel="stylesheet" href="css/leaflet.css"> <link rel="stylesheet" href="css/Control.Geocoder.css"> <link rel="stylesheet" href="css/easy-button.css"> <link rel="stylesheet" href="css/L.Control.Locate.min.css"> <link rel="stylesheet" href="css/fa-all.min.css"> <link rel="stylesheet" href="css/tingle.min.css"> <style type="text/css"> @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; src: url('/webfonts/roboto-v20-latin-regular.eot'); /* IE9 Compat Modes */ src: local('Roboto'), local('Roboto-Regular'), url('/webfonts/roboto-v20-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('/webfonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('/webfonts/roboto-v20-latin-regular.woff') format('woff'), /* Modern Browsers */ url('/webfonts/roboto-v20-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('/webfonts/roboto-v20-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */ } html { min-height: 100%; position: relative; font-family: Roboto, sans-serif; } body { margin: 0; width: 100%; height: 100%; text-align: justify; font-size: 14px; overflow: hidden; } p { text-indent: 2em; } div#modal-content { display: none; } div#map { position: absolute; top: 0; bottom: 0; left: 0; right: 0; right: 42px; } .tingle-modal { z-index: 2000; color: #2e4369; } .tingle-modal a, .tingle-modal a:visited { color: #2e4369; } .tingle-modal-box__content { padding: 3rem; } .center { text-align: center; } .footnote { font-size: 0.9em; } #mainTitle { margin-top: 0; } #legend { width: 42px; max-width: 100vw; display: flex; flex-direction: row; position: absolute; right: 0; top: 0; bottom: 0; } #legend button { height: 100%; width: 42px; background-color: #2e4369; color: #fff; border: 0; cursor: pointer; } #legend .iframe { display: none; } #legend iframe { width: 100%; padding-left: 0.5em; height: 100%; border: 0; box-sizing: border-box; } @media screen and (max-width: 540px) { .tingle-modal__close { background-color: #2e4369; } } .error { font-size: 2em; text-align: center; color: red; } .leaflet-control .fa { font-size: 14px; } </style> </head> <body> <div id="modal-content"> <h1 class="center" id="mainTitle">CyclOSM: OpenStreetMap-based bicycle map</h1> <p> <a href="https://github.com/cyclosm/cyclosm-cartocss-style/">CyclOSM</a> is a bicycle-oriented map built on top of <a href="https://www.openstreetmap.org/">OpenStreetMap</a> data <a href="#footnote-1">[1]</a>. It aims at providing a beautiful and practical map for cyclists, no matter their cycling habits or abilities. </p> <p> In urban areas, it renders the main different types of cycle tracks and lanes, on each side of the road, for helping you draw your bike to work route. It also features essential POIs as well as bicycle parking spots or spots shared with motorbikes, specific infrastructure (elevators / ramps), road speeds or surfaces to avoid streets with pavings, bumpers and bike boxes, etc. </p> <p> The same map also lets you visualize main bicycle touring routes as well as essential POIs when touring (emergency services, shelters, tourism, shops). </p> <p style="margin-bottom: 0;"> We offer three different map styles: </p> <ul style="margin-top: 0; margin-left: 1em;"> <li>The <strong>default CyclOSM</strong> style, fit for most applications <a href="#footnote-3">[3]</a> and map purposes (tiles can be cached for up to a few hours <a href="#footnote-4">[4]</a>);</li> <li>The <strong>CyclOSM live</strong> style, fit for OpenStreetMap contributors (tiles are always minute updated) and available only at <a href="https://cyclosm.org/">cyclosm.org</a> and in contributions tools;</li> <li>The <strong>CyclOSM lite</strong> variant, meant to be used as an overlay map to turn any map style into a bike map.</li> </ul> <p class="center"> <a class="modalClose" href="#"><img title="CyclOSM" alt="CyclOSM logo" style="height: 150px;" src="images/logo.png"/></a> </p> <h2 class="center"><a class="modalClose" href="#">Let's start exploring the map!</a></h2> <p class="footnote" id="footnote-1"> [1] CyclOSM map is based on <a href="https://www.openstreetmap.org/">OpenStreetMap</a> data. CyclOSM is not a complete or accurate map of the world and should not be used in such a manner that deficiencies, omissions, inaccuracies or errors could result in death, loss or injury. The maps are an iterative ongoing work-in-progress and everyone is welcome to contribute editing the OpenStreetMap data if you spot inaccuracies. </p> <p class="footnote" id="footnote-2"> [2] CyclOSM is built on open-source and free software. The source code is available at <a href="https://github.com/cyclosm/cyclosm-cartocss-style/">Github</a> and we welcome <a href="https://github.com/cyclosm/cyclosm-cartocss-style/blob/master/CONTRIBUTING.md">contributions</a>!. Our tile server infrastructure is provided by <a href="https://www.openstreetmap.fr">OpenStreetMap-France</a>, many thanks to them for their support! </p> <p class="footnote" style="margin-bottom: 0;" id="footnote-3"> [3] The map is available by default in the following smartphone applications: </p> <ul class="footnote" style="margin-top: 0; margin-left: 1em; margin-bottom: 0;"> <li><a href="https://osmand.net">OSMAnd</a></li> <li><a href="https://www.offline-maps.net">All-In-One Offline Maps</a> or <a href="https://alpinequest.net">AlpineQuest Rando GPS</a></li> <li><a href="https://framagit.org/tom79/openmaps">OpenMultiMaps</a></li> <li>Let us know about any more application we are missing!</li> </ul> <p class="footnote" style="margin-top: 0;"> A Tile Map Service is available at <code>https://{s}.tile-cyclosm.openstreetmap.fr/[cyclosm|cyclosm-lite]/{z}/{x}/{y}.png</code> under a <a href="https://operations.osmfoundation.org/policies/tiles/">fairuse tile policy</a>. </p> <p class="footnote" id="footnote-4"> [4] OpenStreetMap data should be replicated in near realtime CyclOSM style, the current delay between OpenStreetMap data and our maintained version can be seen <a href="https://munin.openstreetmap.fr/osm11.openstreetmap.fr/osm165.openstreetmap.fr/osm_replication_lag_osm2pgsql.html">here</a>. Tiles below zoom level 12 are pre-generated on a weekly basis, tiles at higher zooms are live-generated and then cached for up to 72 hours (except for the <em>live</em> variant). </p> </div> <div id="map"></div> <div id="legend"> <button>❮</button> <div class="iframe"><iframe src="https://cyclosm.org/legend.html"></iframe></div> </div> <script src="js/leaflet.js"></script> <script src="js/leaflet-fullHash.js"></script> <script src="js/Control.Geocoder.js"></script> <script src="js/easy-button.js"></script> <script src="js/L.Control.Locate.js"></script> <script src="js/leaflet.restoreview.js"></script> <script src="js/tingle.min.js"></script> <script type="text/javascript"> var VERSION = 'v0.6'; // TODO: Bump when pushing new version in production var FORCE_MODAL = false; // Register service worker for PWA if('serviceWorker' in navigator) { navigator.serviceWorker.register('sw.js'); }; function storageAvailable(type) { try { var storage = window[type], x = '__storage_test__'; storage.setItem(x, x); storage.removeItem(x); return true; } catch(e) { console.warn("Your browser blocks access to " + type); return false; } } function shouldShowModalOnStartup () { if (FORCE_MODAL) { return true; } if (!storageAvailable('localStorage')) { return true; } if (window.localStorage['lastModalShown'] !== VERSION) { return true; } return false; } document.addEventListener('DOMContentLoaded', function () { // ============ // Handle modal // ============ var modal = new tingle.modal({ footer: false, closeMethods: ['overlay', 'button', 'escape'], closeLabel: "Go to map", }); modal.setContent(document.querySelector('#modal-content').innerHTML); [].forEach.call(modal.modalBoxContent.querySelectorAll('a.modalClose'), function (item) { item.addEventListener('click', function (event) { event.preventDefault(); modal.close(); }); }); if (shouldShowModalOnStartup()) { modal.open(); if (storageAvailable('localStorage')) { window.localStorage['lastModalShown'] = VERSION; } } // ========== // Handle map // ========== // Available tiles definition var cyclosm = L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', { attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors', minZoom: 0, maxZoom: 20, }); var cyclosm_live = L.tileLayer('https://dev.{s}.tile.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', { attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors', minZoom: 0, maxZoom: 20, }); var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors', minZoom: 0, maxZoom: 19, }); var piano = L.tileLayer('https://{s}.piano.tiles.quaidorsay.fr/fr/{z}/{x}/{y}.png', { attribution: 'Tiles <a href="https://github.com/tilery/pianoforte">PianoFr</a> | &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors', minZoom: 0, maxZoom: 20, }); var ocm = L.tileLayer('https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png', { attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors', minZoom: 0, maxZoom: 18, }); var otm = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', { attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors', minZoom: 0, maxZoom: 18, }); var cyclosm_lite = L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm-lite/{z}/{x}/{y}.png', { attribution: 'CyclOSM Lite', minZoom: 11, maxZoom: 20, }); var cyclosm_be = L.tileLayer('https://{s}.tiles.champs-libres.be/cyclosm/{z}/{x}/{y}.png', { attribution: 'MNT 2013-2014 &copy; SPW; DHM Vlaanderen II &copy; Vlaanderen. Tiles courtesy of <a href="https://www.champs-libres.coop/blog/post/2020-09-17-cyclosm/">Champs-Libres</a>.', minZoom: 11, maxZoom: 20, }); var waymarked_trails = L.tileLayer('https://tile.waymarkedtrails.org/cycling/{z}/{x}/{y}.png', { attribution: '<a href="https://cycling.waymarkedtrails.org/">https://cycling.waymarkedtrails.org/</a>', minZoom: 0, maxZoom: 18, }); var map = new L.Map('map', { zoomControl: true, layers: [cyclosm] }); map.attributionControl.setPrefix('<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a> | <a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> ' + VERSION); if (!map.restoreView()) { // Default view on Amsterdam map.setView([52.3727598, 4.8936041], 12); } // Set up layers control var baseMaps = { "CyclOSM": cyclosm, "CyclOSM (Live)": cyclosm_live, "CyclOSM (better for BE)": cyclosm_be, "OpenStreetMap.org": osm, "OpenCycleMap": ocm, "OpenTopoMap": otm, "OSM Piano": piano, }; var overlayMaps = { "Waymarked Trails": waymarked_trails, "CyclOSM Lite": cyclosm_lite }; L.control.layers(baseMaps, overlayMaps, { collapsed: true }).addTo(map); // Set up hash plugin var allMapLayers = { 'cyclosm': cyclosm, 'cyclosm_live': cyclosm_live, 'cyclosm_be': cyclosm_be, 'piano': piano, 'openstreetmap': osm, 'opencyclemap': ocm, 'opentopomap': otm, 'waymarkedtrails': waymarked_trails, 'cyclosmlite': cyclosm_lite, }; L.hash(map, allMapLayers); // Set up geocoder plugin var geocoder = L.Control.geocoder({ defaultMarkGeocode: false, position: 'topleft' }); geocoder.on('markgeocode', function(e) { map.fitBounds(e.geocode.bbox); }) geocoder.addTo(map); document.querySelector('button.leaflet-control-geocoder-icon').title = 'Search' // Set up geolocation plugin L.control.locate().addTo(map); // Add a scale L.control.scale().addTo(map); // Set up routing / edit / help / legend buttons L.easyButton('fa-route', function(btn, map) { window.open('http://brouter.de/brouter-web/' + window.location.hash, '_blank'); }, 'Create an itinerary with BRouter').addTo(map); L.easyButton('fa-edit', function(btn, map) { window.open('https://www.openstreetmap.org/edit' + window.location.hash, '_blank'); }, 'Edit the map').addTo(map); L.easyButton('fa-question', function(btn, map) { window.open('legend.html', '_blank'); }, 'Legend').addTo(map); L.easyButton('fa-info', function(btn, map) { modal.open(); }, 'About').addTo(map); // ============= // Handle legend // ============= function handleResize() { var shouldLegendOpen = true; if (screen.width > 800) { shouldLegendOpen = true; } else { shouldLegendOpen = false; } if (storageAvailable('localStorage') && window.localStorage.isLegendOpen !== undefined) { shouldLegendOpen = JSON.parse(window.localStorage.isLegendOpen); } if (shouldLegendOpen) { document.querySelector('#map').style.right = '300px'; document.querySelector('#legend .iframe').style.display = 'initial'; document.querySelector('#legend').style.width = '300px'; document.querySelector('#legend button').innerText = '❯'; } else { document.querySelector('#map').style.right = '42px'; document.querySelector('#legend .iframe').style.display = 'none'; document.querySelector('#legend').style.width = '42px'; document.querySelector('#legend button').innerText = '❮'; } } handleResize(); window.addEventListener('resize', handleResize()); document.querySelector('#legend button').addEventListener('click', function (event) { event.preventDefault(); if (document.querySelector('#legend button').innerText == '❮') { if (storageAvailable('localStorage')) { window.localStorage.isLegendOpen = JSON.stringify(true); } document.querySelector('#map').style.right = '300px'; document.querySelector('#legend .iframe').style.display = 'initial'; document.querySelector('#legend').style.width = '300px'; document.querySelector('#legend button').innerText = '❯'; } else { if (storageAvailable('localStorage')) { window.localStorage.isLegendOpen = JSON.stringify(false); } document.querySelector('#map').style.right = '42px'; document.querySelector('#legend .iframe').style.display = 'none'; document.querySelector('#legend').style.width = '42px'; document.querySelector('#legend button').innerText = '❮'; } map.invalidateSize(); }); }); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10