Code: Select all
OpenLayers3 scratchpad
[h4]Javascript is not enabled in your browser and this map will not not work.[/h4]
import Map from 'ol/Map.js';
import View from 'ol/View.js';
import TileLayer from 'ol/layer/Tile.js';
import OSM from 'ol/source/OSM.js';
const map = new Map({
view: new View({
center: [-0.2262, 51.5403],
zoom: 12,
}),
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
});
Mobile version