Last active
August 29, 2015 14:11
-
-
Save ErnieAtLYD/4c4891af120ca9f31119 to your computer and use it in GitHub Desktop.
Simple Leaftlet based map of FIU
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
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script> | |
<style type="text/css"> | |
#mapdiv { height: 100%; } | |
</style> | |
</head> | |
<body> | |
<div id="mapdiv"></div> | |
<script> | |
var geojsonFeature = { | |
"type": "Feature", | |
"properties": { | |
"name": "FIU GIS Center!" | |
}, | |
"geometry": { | |
"type": "Point", | |
"coordinates": [-80.3738606, 25.757256] | |
} | |
}; | |
var mapvar = L.map('mapdiv').setView([25.757256,-80.3738606],12); | |
var tileLayer = L.tileLayer( | |
'http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.jpg', | |
{ | |
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under CC BY 3.0. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under CC BY SA.' | |
} | |
); | |
mapvar.addLayer(tileLayer); | |
var geojsonLayer = L.geoJson( | |
geojsonFeature, | |
{ | |
onEachFeature: function(feature, layer) { layer.bindPopup(feature.properties.name); } | |
} | |
); | |
mapvar.addLayer(geojsonLayer); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment