forked from gravitystorm/openstreetmap-carto
-
Notifications
You must be signed in to change notification settings - Fork 2
OpenLayers
Jonathan Beliën edited this page Dec 11, 2018
·
13 revisions
Click here to see it working.
var attribution = new ol.control.Attribution({
collapsible: false
});
var map = new ol.Map({
controls: ol.control.defaults({attribution: false}).extend([attribution]),
layers: [
new ol.layer.Tile({
source: new ol.source.OSM({
url: "https://tile.openstreetmap.be/osmbe/{z}/{x}/{y}.png",
attributions: [ ol.source.OSM.ATTRIBUTION, "Tiles courtesy of <a href=\"https://geo6.be/\">GEO-6</a>" ],
maxZoom: 18
})
})
],
target: "map",
view: new ol.View({
center: [0, 0],
maxZoom: 18,
zoom: 2
})
});
Just replace osmbe
by osmbe-fr
or osmbe-nl
to render localized baselayer.