Skip to content

Instantly share code, notes, and snippets.

@marcellobenigno
Created May 28, 2013 11:16
Show Gist options
  • Save marcellobenigno/5662047 to your computer and use it in GitHub Desktop.
Save marcellobenigno/5662047 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>EX 2 - Leaflet</title>
<link rel="stylesheet" href="lib/leaflet.css" />
<script src="lib/leaflet.js"></script>
<script src="lib/Google.js"></script>
<script src="lib/Bing.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
</head>
<body>
<h1>Ex. 2 0 Leaflet.js</h1>
<div style="width:700px; height:500px" id="map"></div>
<script type='text/javascript'>
var map = new L.Map('map', {center: new L.LatLng(-7.156, -34.857), zoom: 13});
var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
// var bing = new L.BingLayer("AnjpN2gHrA5jVJYz0ZRaU-HnaZeW3ZcdIDxVB2F6Aqj7_N17P6Pc4KoCgS1PMvG2");
// map.addLayer(bing);
var ggl = new L.Google();
map.addLayer(ggl);
//map.addLayer(osm);
// map.addControl(new L.Control.Layers( {"Bing":bing, 'Google':ggl, 'OSM':osm}, {}));
map.addControl(new L.Control.Layers( {'Google':ggl, 'OSM':osm}, {}));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment