and every other proprietary solution ...
OpenStreetMap is a free, editable map of the whole world that is being built by volunteers largely from scratch and released with an open-content license.
The OpenStreetMap License allows free (or almost free) access to our map images and all of our underlying map data. The project aims to promote new and interesting uses of this data.
Humanitarian
OpenStreetMap
Team
Don’t forget to give the OpenStreetMap credit when you use our maps (or services).
© OpenStreetMap contributors
🤩
🤩
<iframe
width="425" height="350" frameborder="0"
scrolling="no" marginheight="0" marginwidth="0"
src="https://www.openstreetmap.org/export/embed.html?bbox=4.343451%2C50.8437928%2C4.361368%2C50.849815&layer=mapnik&marker=50.846807%2C4.352409"
style="border: 1px solid black"
></iframe>
<br>
<small>
<a href="https://www.openstreetmap.org/?mlat=50.84681&mlon=4.35241#map=17/50.84680/4.35241">
View Larger Map
</a>
</small>
🤩
🤩
🤓
🤓
1. Include Leaflet JavaScript library and stylesheet
2. Create a <div> element
3. Use Leaflet JavaScript library to load the map
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"
integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg=="
crossorigin=""></script>
<div id="map"></div>
var map = L.map('map').setView([0, 0], 2);
L.tileLayer("https://tile.openstreetmap.be/osmbe/{z}/{x}/{y}.png", {
attribution: "© <a href=\"http://openstreetmap.org\">OpenStreetMap</a> contributors, Tiles courtesy of <a href=\"https://geo6.be/\">GEO-6</a>",
maxZoom: 18,
}).addTo(map);
🤓
4. Add a popup to your marker
var map = L.map('map').setView([0, 0], 2);
L.tileLayer(...).addTo(map);
var marker = L.marker([50.846807, 4.352409]).addTo(map);
marker.bindPopup("<b>Hello world!</b><br>I am a popup.").openPopup();
🤓
3. Add a marker
var map = L.map('map').setView([0, 0], 2);
L.tileLayer(...).addTo(map);
var marker = L.marker([50.846807, 4.352409]).addTo(map);
🤓
Step by step tutorials
Full documentation
Many (mostly free) baselayers are available !
OpenStreetMap Belgium - Default name
L.tileLayer('https://tile.openstreetmap.be/osmbe/{z}/{x}/{y}.png', {
attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, '
+ 'Tiles courtesy of <a href="https://geo6.be/">GEO-6</a>',
maxZoom: 18
}).addTo(map);
OpenStreetMap Belgium - Name in French
L.tileLayer('https://tile.openstreetmap.be/osmbe-fr/{z}/{x}/{y}.png', {
attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, '
+ 'Tiles courtesy of <a href="https://geo6.be/">GEO-6</a>',
maxZoom: 18
}).addTo(map);
OpenStreetMap Belgium - Name in Dutch
L.tileLayer('https://tile.openstreetmap.be/osmbe-nl/{z}/{x}/{y}.png', {
attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, '
+ 'Tiles courtesy of <a href="https://geo6.be/">GEO-6</a>',
maxZoom: 18
}).addTo(map);
😱
OpenLayers
Every data available in OpenStreetMap database splitted by country
Quite complicated but you have full control on everything !
Open-Source
(most of it)
Everything that’s possible with Google Maps
is possible with OpenStreetMap
and (almost) as easy to use and to set up!
So why not make the switch ?
Open-Data
+
Open-Source