Center on my home
This commit is contained in:
parent
6e602b9d30
commit
8cd758a780
5
main.js
5
main.js
|
@ -2,6 +2,7 @@ import './style.css';
|
||||||
import {Map, View} from 'ol';
|
import {Map, View} from 'ol';
|
||||||
import TileLayer from 'ol/layer/Tile';
|
import TileLayer from 'ol/layer/Tile';
|
||||||
import OSM from 'ol/source/OSM';
|
import OSM from 'ol/source/OSM';
|
||||||
|
import {fromLonLat} from 'ol/proj.js';
|
||||||
|
|
||||||
const map = new Map({
|
const map = new Map({
|
||||||
target: 'map',
|
target: 'map',
|
||||||
|
@ -11,7 +12,7 @@ const map = new Map({
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
view: new View({
|
view: new View({
|
||||||
center: [0, 0],
|
center: fromLonLat([-93.24151, 44.80376]),
|
||||||
zoom: 2
|
zoom: 10,
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue