Last active
August 29, 2015 14:06
-
-
Save geneorama/d5e4b3c771a6cedbbb30 to your computer and use it in GitHub Desktop.
Leaflet_example_3
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
// Gene Leynes 2014-09-23 SOME EDITS | |
// Example taken (borrowed) from http://leafletjs.com/ | |
// I'm using this example to test http://bl.ocks.org/ | |
// (this should now be index.html) | |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> | |
<div id="map"></div> | |
// create a map in the "map" div, set the view to a given place and zoom | |
var map = L.map('map').setView([51.505, -0.09], 13); | |
// add an OpenStreetMap tile layer | |
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { | |
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' | |
}).addTo(map); | |
// add a marker in the given location, attach some popup content to it and open the popup | |
L.marker([51.5, -0.09]).addTo(map) | |
.bindPopup('A pretty CSS3 popup. <br> Easily customizable.') | |
.openPopup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment