Last active
August 27, 2018 16:42
-
-
Save bernardobelchior/c6a3572bb8d9c4cfb777678cf083c876 to your computer and use it in GitHub Desktop.
map index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import View from 'ol/View'; | |
import Map from 'ol/Map'; | |
// Wait for the page to load, otherwise getElementById may not work. | |
window.onload = () => { | |
const target = document.getElementById('map') | |
// Create a new map with the target as the div#map, and without layers - for now. | |
new Map({ | |
target, | |
view: new View({ | |
center: [0, 0], | |
zoom: 2, | |
}), | |
layers: [ /* To be added later */] | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment