To have the same path (starting with `ol/`, without `.js`) as in the documentation. The support was added in the webpack config in #8928
20 lines
336 B
JavaScript
20 lines
336 B
JavaScript
import Map from 'ol/Map';
|
|
import View from 'ol/View';
|
|
import TileLayer from 'ol/layer/Tile';
|
|
import OSM from 'ol/source/OSM';
|
|
|
|
|
|
const map = new Map({
|
|
layers: [
|
|
new TileLayer({
|
|
source: new OSM()
|
|
})
|
|
],
|
|
target: 'map',
|
|
view: new View({
|
|
center: [14200000, 4130000],
|
|
rotation: Math.PI / 6,
|
|
zoom: 10
|
|
})
|
|
});
|