Last active
March 18, 2016 16:47
-
-
Save nighto/0007ee86b10d5857f549 to your computer and use it in GitHub Desktop.
Leaflet - first step
This file contains 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
var initialCoordinates = [-22.91, -43.20]; // Rio de Janeiro | |
var initialZoomLevel = 13; | |
// create a map in the "map" div, set the view to a given place and zoom | |
var map = L.map('map').setView(initialCoordinates, initialZoomLevel); | |
// add an OpenStreetMap tile layer | |
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { | |
attribution: '© Contribuidores do <a href="http://osm.org/copyright">OpenStreetMap</a>' | |
}).addTo(map); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment