Team:St Andrews/Team2

From 2012.igem.org

(Difference between revisions)
Line 15: Line 15:
 +
<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() {
 +
                var layers = ["toner", "terrain", "watercolor"];
 +
                for (var i = 0; i < layers.length; i++) {
 +
                    var layer = layers[i];
 +
                    var map = new L.Map(layer, {
 +
                        center: new L.LatLng(37.8, -122.4),
 +
                        zoom: 10
 +
                    });
 +
                    map.addLayer(new L.StamenTileLayer(layer));
 +
                }
 +
            }
 +
        </script>
 +
<style type="text/css">
 +
            .map {
 +
                width: 600px;
 +
                height: 320px;
 +
                margin: 0 0 1em 0;
 +
            }
 +
        </style>
</head>
</head>
Line 72: Line 93:
-
<script>
 
-
var map = new L.Map("element_id", {
 
-
    center: new L.LatLng(37.7, -122.4),
 
-
    zoom: 12
 
-
});
 
-
</script>
 
-
 
-
<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>
 
 +
<div id="map" style="width: 600px; height: 400px"></div>
</body>
</body>
-
 
-
<div id="map" style="width: 600px; height: 400px"></div>
 
-
 
</html>
</html>

Revision as of 13:06, 7 June 2012