block by aaizemberg 45e23c1b8741bcf7b34f

Proyecto BAHRA

Full Screen

index.html

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Proyecto BAHRA</title>

	<link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
	<script src="//cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="//leaflet.github.io/Leaflet.markercluster/example/screen.css" />

	<link rel="stylesheet" href="//leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.css" />
	<link rel="stylesheet" href="//leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
	<script src="//leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
	<script src="bahra_05.js" charset="utf-8"></script>
</head>
<body>
  <div id="map"></div>
  <script type="text/javascript">

		var tiles = L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png', {
				maxZoom: 18,
				attribution: '&copy; <a href="//osm.org/copyright">OpenStreetMap</a>'
			}),
			latlng = L.latLng(-39, -57);

		var map = L.map('map', {center: latlng, zoom: 4, layers: [tiles]});

		var markers = L.markerClusterGroup({ chunkedLoading: true });
		
		for (var i = 0; i < addressPoints.length; i++) {
			var a = addressPoints[i];
			var title = a[2];
			var marker = L.marker(L.latLng(a[0], a[1]), { title: title });
			marker.bindPopup(title);
			markers.addLayer(marker);
		}

		map.addLayer(markers);

  </script>
</body>
</html>