The OSM map won't show anymore with Openlayers 5 I tried to added from ol.source.OSM() but a grey map shown.
var map3 = new ol.Map({
layers: new ol.layer.Tile({
source: new ol.source.OSM()
}) ,
target: 'map-id3',
view: new ol.View({
center:ol.proj.fromLonLat([10.74,34.77]),
zoom:12
})
});
layers
must be an array
layers: [ new ol.layer.Tile({
source: new ol.source.OSM()
}) ],