cccamp19-map/main.js

19 lines
335 B
JavaScript
Raw Normal View History

2018-06-26 22:01:18 +00:00
import {Map, View} from 'ol';
import TileLayer from 'ol/layer/Tile';
import XYZ from 'ol/source/XYZ';
2016-12-24 18:27:32 +00:00
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
})
});