cccamp19-map/main.js

21 lines
379 B
JavaScript
Raw Normal View History

2017-07-24 20:20:40 +00:00
import 'ol/ol.css';
2016-12-24 18:27:32 +00:00
import Map from 'ol/map';
import View from 'ol/view';
import TileLayer from 'ol/layer/tile';
import XYZ from 'ol/source/xyz';
new Map({
target: 'map',
layers: [
new TileLayer({
source: new XYZ({
url: 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'
})
})
],
view: new View({
center: [0, 0],
zoom: 2
})
});