Add base map code
This was built with `npm create ol-app my-app`.
This commit is contained in:
commit
a762f2b9a4
10 changed files with 1471 additions and 0 deletions
17
main.js
Normal file
17
main.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import './style.css';
|
||||
import {Map, View} from 'ol';
|
||||
import TileLayer from 'ol/layer/Tile';
|
||||
import OSM from 'ol/source/OSM';
|
||||
|
||||
const map = new Map({
|
||||
target: 'map',
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new OSM()
|
||||
})
|
||||
],
|
||||
view: new View({
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
})
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue