Add base map code

This was built with `npm create ol-app my-app`.
This commit is contained in:
Chandler Swift 2023-07-03 00:20:36 -05:00
commit a762f2b9a4
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
10 changed files with 1471 additions and 0 deletions

17
main.js Normal file
View 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
})
});