Team:St Andrews/Team2
From 2012.igem.org
(Difference between revisions)
Line 8: | Line 8: | ||
ul#thumbnail {align="center"} | ul#thumbnail {align="center"} | ||
</style> | </style> | ||
- | |||
<link rel="stylesheet" href="http://dl.dropbox.com/u/491730/iGEm/leaflet.css" /> | <link rel="stylesheet" href="http://dl.dropbox.com/u/491730/iGEm/leaflet.css" /> | ||
- | <!--[if lte IE 8]> | + | <!--[if lte IE 8]> |
- | + | <link rel="stylesheet" href="http://dl.dropbox.com/u/491730/iGEm/leaflet.ie.css" /> | |
- | <![endif]--> | + | <![endif]--> |
- | + | ||
- | |||
- | |||
- | <script type="text/javascript"> | + | <script src="http://dl.dropbox.com/u/491730/iGEm/leaflet.js"></script> |
+ | <script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js"></script> | ||
+ | <script type="text/javascript"> | ||
function initialize() { | function initialize() { | ||
var layers = ["toner", "terrain", "watercolor"]; | var layers = ["toner", "terrain", "watercolor"]; | ||
- | + | var layer = "watercolor"; | |
- | var layer = | + | |
var map = new L.Map(layer, { | var map = new L.Map(layer, { | ||
- | center: new L.LatLng( | + | center: new L.LatLng(56.3339,-2.8035), |
zoom: 10 | zoom: 10 | ||
}); | }); | ||
map.addLayer(new L.StamenTileLayer(layer)); | map.addLayer(new L.StamenTileLayer(layer)); | ||
- | + | var marker = new L.Marker(new L.LatLng(56.3339,-2.8035)); | |
+ | map.addLayer(marker); | ||
+ | marker.bindPopup("We are here!").openPopup(); | ||
+ | |||
} | } | ||
</script> | </script> | ||
- | <style type="text/css"> | + | <style type="text/css"> |
.map { | .map { | ||
- | width: | + | width: "auto"; |
- | height: | + | height: 420px; |
margin: 0 0 1em 0; | margin: 0 0 1em 0; | ||
} | } | ||
Line 40: | Line 40: | ||
</head> | </head> | ||
- | <body> | + | <body onload="initialize()"> |
<div align="center"> | <div align="center"> | ||
<img src="http://placehold.it/720x540" alt=""> | <img src="http://placehold.it/720x540" alt=""> | ||
Line 94: | Line 94: | ||
- | <div id=" | + | <div id="watercolor" class="map"></div> |
- | + | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 13:36, 7 June 2012