[Pkg-javascript-commits] [leaflet-markercluster] 32/219: Update all examples to use OSM tiles

Jonas Smedegaard dr at jones.dk
Sat May 7 09:39:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit 649c0efff294995ce61a1c523729f15379934521
Author: danzel <danzel at localhost.geek.nz>
Date:   Mon Apr 7 10:11:37 2014 +1200

    Update all examples to use OSM tiles
---
 example/geojson.html                               |  7 +-
 example/marker-clustering-convexhull.html          |  9 +--
 example/marker-clustering-custom.html              |  9 +--
 example/marker-clustering-everything.html          |  9 +--
 example/marker-clustering-geojson.html             |  9 +--
 .../marker-clustering-realworld-maxzoom.388.html   |  9 +--
 .../marker-clustering-realworld-mobile.388.html    |  9 +--
 example/marker-clustering-realworld.10000.html     | 10 +--
 example/marker-clustering-realworld.388.html       |  9 +--
 example/marker-clustering-realworld.50000.html     | 77 +++++++++++-----------
 example/marker-clustering-singlemarkermode.html    |  9 +--
 example/marker-clustering-spiderfier.html          |  9 +--
 example/marker-clustering-zoomtobounds.html        |  9 +--
 example/marker-clustering-zoomtoshowlayer.html     |  9 +--
 example/marker-clustering.html                     |  9 +--
 example/old-bugs/add-1000-after.html               |  9 +--
 example/old-bugs/add-markers-offscreen.html        |  9 +--
 example/old-bugs/add-remove-before-addtomap.html   |  9 +--
 example/old-bugs/animationless-zoom.html           |  9 +--
 .../old-bugs/disappearing-marker-from-spider.html  |  7 +-
 .../doesnt-update-cluster-on-bottom-level.html     |  9 +--
 example/old-bugs/remove-add-clustering.html        |  9 +--
 example/old-bugs/remove-when-spiderfied.html       |  9 +--
 .../removelayer-after-remove-from-map.html         |  7 +-
 example/old-bugs/setView-doesnt-remove.html        |  9 +--
 .../zoomtoshowlayer-doesnt-need-to-zoom.html       |  9 +--
 26 files changed, 161 insertions(+), 136 deletions(-)

diff --git a/example/geojson.html b/example/geojson.html
index 4a3652d..a074eec 100644
--- a/example/geojson.html
+++ b/example/geojson.html
@@ -30,14 +30,13 @@
 			]
 		};
 
-		var cloudmade = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/997/256/{z}/{x}/{y}.png', {
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
 			maxZoom: 18,
-			attribution: 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			key: 'BC9A493B41014CAABB98F0471D759707'
+			attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
 		});
 
 		var map = L.map('map')
-				.addLayer(cloudmade);
+				.addLayer(tiles);
 
 		var markers = L.markerClusterGroup();
 
diff --git a/example/marker-clustering-convexhull.html b/example/marker-clustering-convexhull.html
index b26d5cc..25ee56d 100644
--- a/example/marker-clustering-convexhull.html
+++ b/example/marker-clustering-convexhull.html
@@ -20,12 +20,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(50.5, 30.51);
 
-		var map = L.map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = L.markerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
 
diff --git a/example/marker-clustering-custom.html b/example/marker-clustering-custom.html
index 107916a..f53d81f 100644
--- a/example/marker-clustering-custom.html
+++ b/example/marker-clustering-custom.html
@@ -28,12 +28,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(50.5, 30.51);
 
-		var map = L.map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 
 		//Custom radius and icon create function
diff --git a/example/marker-clustering-everything.html b/example/marker-clustering-everything.html
index eab39c5..cd1e727 100644
--- a/example/marker-clustering-everything.html
+++ b/example/marker-clustering-everything.html
@@ -20,12 +20,13 @@
 	<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(50.5, 30.51);
 
-		var map = L.map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = L.markerClusterGroup({ animateAddingMarkers : true });
 		var markersList = [];
diff --git a/example/marker-clustering-geojson.html b/example/marker-clustering-geojson.html
index f7287bb..1912ae8 100644
--- a/example/marker-clustering-geojson.html
+++ b/example/marker-clustering-geojson.html
@@ -20,12 +20,13 @@
 	<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade, Points &copy 2012 LINZ',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 17, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(0.78, 102.37);
 
-		var map = L.map('map', {center: latlng, zoom: 7, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 7, layers: [tiles]});
 
 		
 		var geojson = L.geoJson(geojsonSample, {
diff --git a/example/marker-clustering-realworld-maxzoom.388.html b/example/marker-clustering-realworld-maxzoom.388.html
index bcf4a3d..669b23a 100644
--- a/example/marker-clustering-realworld-maxzoom.388.html
+++ b/example/marker-clustering-realworld-maxzoom.388.html
@@ -20,12 +20,13 @@
 	<span>Markers will show on the bottom 2 zoom levels even though the markers would normally cluster.</span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade, Points &copy 2012 LINZ',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 17, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
+			}),
 			latlng = L.latLng(-37.82, 175.24);
 
-		var map = L.map('map', {center: latlng, zoom: 13, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
 
 		var markers = L.markerClusterGroup({ disableClusteringAtZoom: 17 });
 		
diff --git a/example/marker-clustering-realworld-mobile.388.html b/example/marker-clustering-realworld-mobile.388.html
index 982f346..0a8d07f 100644
--- a/example/marker-clustering-realworld-mobile.388.html
+++ b/example/marker-clustering-realworld-mobile.388.html
@@ -19,12 +19,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade, Points &copy 2012 LINZ',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
+			}),
 			latlng = L.latLng(-37.821, 175.22);
 
-		var map = L.map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = L.markerClusterGroup();
 
diff --git a/example/marker-clustering-realworld.10000.html b/example/marker-clustering-realworld.10000.html
index 462e848..ab12a80 100644
--- a/example/marker-clustering-realworld.10000.html
+++ b/example/marker-clustering-realworld.10000.html
@@ -21,11 +21,13 @@
 	<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade, Points &copy 2012 LINZ',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 17, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
+			}),
 			latlng = L.latLng(-37.89, 175.46);
-		var map = L.map('map', {center: latlng, zoom: 13, layers: [cloudmade]});
+
+		var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
 
 		var markers = L.markerClusterGroup({ chunkedLoading: true });
 		
diff --git a/example/marker-clustering-realworld.388.html b/example/marker-clustering-realworld.388.html
index 1431d59..c827a51 100644
--- a/example/marker-clustering-realworld.388.html
+++ b/example/marker-clustering-realworld.388.html
@@ -20,12 +20,13 @@
 	<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade, Points &copy 2012 LINZ',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 17, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
+			}),
 			latlng = L.latLng(-37.82, 175.24);
 
-		var map = L.map('map', {center: latlng, zoom: 13, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
 
 		var markers = L.markerClusterGroup();
 		
diff --git a/example/marker-clustering-realworld.50000.html b/example/marker-clustering-realworld.50000.html
index ff73a88..d84a573 100644
--- a/example/marker-clustering-realworld.50000.html
+++ b/example/marker-clustering-realworld.50000.html
@@ -22,56 +22,57 @@
 	<div id="map"></div>
 	<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
 	<script type="text/javascript">
-			var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			    cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade, Points &copy 2012 LINZ',
-			    cloudmade = L.tileLayer(cloudmadeUrl, { maxZoom: 17, attribution: cloudmadeAttribution }),
-			    latlng = L.latLng(-37.79, 175.27);
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
+			}),
+			latlng = L.latLng(-37.79, 175.27);
 
-			var map = L.map('map', { center: latlng, zoom: 13, layers: [cloudmade] });
+		var map = L.map('map', { center: latlng, zoom: 13, layers: [tiles] });
 
-			var progress = document.getElementById('progress');
-			var progressBar = document.getElementById('progress-bar');
+		var progress = document.getElementById('progress');
+		var progressBar = document.getElementById('progress-bar');
 
-			function updateProgressBar(processed, total, elapsed, layersArray) {
-				if (elapsed > 1000) {
-					// if it takes more than a second to load, display the progress bar:
-					progress.style.display = 'block';
-					progressBar.style.width = Math.round(processed/total*100) + '%';
-				}
+		function updateProgressBar(processed, total, elapsed, layersArray) {
+			if (elapsed > 1000) {
+				// if it takes more than a second to load, display the progress bar:
+				progress.style.display = 'block';
+				progressBar.style.width = Math.round(processed/total*100) + '%';
+			}
 
-				if (processed === total) {
-					// all markers processed - hide the progress bar:
-					progress.style.display = 'none';
-				}
+			if (processed === total) {
+				// all markers processed - hide the progress bar:
+				progress.style.display = 'none';
 			}
+		}
 
-			var markers = L.markerClusterGroup({ chunkedLoading: true, chunkProgress: updateProgressBar });
+		var markers = L.markerClusterGroup({ chunkedLoading: true, chunkProgress: updateProgressBar });
 
-			var markerList = [];
+		var markerList = [];
 
-			//console.log('start creating markers: ' + window.performance.now());
+		//console.log('start creating markers: ' + window.performance.now());
 
-			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);
-				markerList.push(marker);
-			}
-			for (var i = 0; i < addressPoints2.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);
-				markerList.push(marker);
-			}
+		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);
+			markerList.push(marker);
+		}
+		for (var i = 0; i < addressPoints2.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);
+			markerList.push(marker);
+		}
 
-			//console.log('start clustering: ' + window.performance.now());
+		//console.log('start clustering: ' + window.performance.now());
 
-			markers.addLayers(markerList);
-			map.addLayer(markers);
+		markers.addLayers(markerList);
+		map.addLayer(markers);
 
-			//console.log('end clustering: ' + window.performance.now());
+		//console.log('end clustering: ' + window.performance.now());
 	</script>
 </body>
 </html>
diff --git a/example/marker-clustering-singlemarkermode.html b/example/marker-clustering-singlemarkermode.html
index ab71f1c..7f5c1a2 100644
--- a/example/marker-clustering-singlemarkermode.html
+++ b/example/marker-clustering-singlemarkermode.html
@@ -19,12 +19,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(50.5, 30.51);
 
-		var map = L.map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = L.markerClusterGroup({ singleMarkerMode: true});
 
diff --git a/example/marker-clustering-spiderfier.html b/example/marker-clustering-spiderfier.html
index bfa3170..b4cc5f0 100644
--- a/example/marker-clustering-spiderfier.html
+++ b/example/marker-clustering-spiderfier.html
@@ -20,12 +20,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(50.5, 30.51);
 
-		var map = L.map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = L.markerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
 
diff --git a/example/marker-clustering-zoomtobounds.html b/example/marker-clustering-zoomtobounds.html
index 45b5480..0f4e209 100644
--- a/example/marker-clustering-zoomtobounds.html
+++ b/example/marker-clustering-zoomtobounds.html
@@ -19,12 +19,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(50.5, 30.51);
 
-		var map = L.map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = L.markerClusterGroup({spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false});
 
diff --git a/example/marker-clustering-zoomtoshowlayer.html b/example/marker-clustering-zoomtoshowlayer.html
index 08d763b..86a28d1 100644
--- a/example/marker-clustering-zoomtoshowlayer.html
+++ b/example/marker-clustering-zoomtoshowlayer.html
@@ -21,12 +21,13 @@
 	<span>When clicked we will zoom down to a marker, spiderfying if required to show it and then open its popup</span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade, Points &copy 2012 LINZ',
-			cloudmade = L.tileLayer(cloudmadeUrl, {maxZoom: 17, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = L.latLng(-37.82, 175.24);
 
-		var map = L.map('map', {center: latlng, zoom: 13, layers: [cloudmade]});
+		var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
 
 		var markers = L.markerClusterGroup();
 		var markerList = [];
diff --git a/example/marker-clustering.html b/example/marker-clustering.html
index 82accd4..3ea2e1a 100644
--- a/example/marker-clustering.html
+++ b/example/marker-clustering.html
@@ -20,12 +20,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup();
 		var markersList = [];
diff --git a/example/old-bugs/add-1000-after.html b/example/old-bugs/add-1000-after.html
index 75707d5..72b1435 100644
--- a/example/old-bugs/add-1000-after.html
+++ b/example/old-bugs/add-1000-after.html
@@ -25,12 +25,13 @@
 	<span id="time"></span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup();
 		var markersList = [];
diff --git a/example/old-bugs/add-markers-offscreen.html b/example/old-bugs/add-markers-offscreen.html
index ca7b098..eb4ffeb 100644
--- a/example/old-bugs/add-markers-offscreen.html
+++ b/example/old-bugs/add-markers-offscreen.html
@@ -23,12 +23,13 @@
 	<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/69">#69</a>. Click the button 2+ times. Zoom out. Should just be a single cluster but instead one of the child markers is still visible.</span><br/>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: new L.LatLng(50.41, 30.51), zoom: 17, layers: [cloudmade]});
+		var map = new L.Map('map', {center: new L.LatLng(50.41, 30.51), zoom: 17, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup({ animateAddingMarkers : true });
 		var markersList = [];
diff --git a/example/old-bugs/add-remove-before-addtomap.html b/example/old-bugs/add-remove-before-addtomap.html
index f829946..36d6d18 100644
--- a/example/old-bugs/add-remove-before-addtomap.html
+++ b/example/old-bugs/add-remove-before-addtomap.html
@@ -23,12 +23,13 @@
 	<span id="time"></span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup();
 
diff --git a/example/old-bugs/animationless-zoom.html b/example/old-bugs/animationless-zoom.html
index 169feac..9d71b87 100644
--- a/example/old-bugs/animationless-zoom.html
+++ b/example/old-bugs/animationless-zoom.html
@@ -24,12 +24,13 @@
 	<span id="time"></span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(-37.36142550190516, 174.254150390625);
 
-		var map = new L.Map('map', {center: latlng, zoom: 7, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 7, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup();
 		markers.addLayer(new L.Marker([-37.77852090603777, 175.3103667497635])); //The one we zoom in on
diff --git a/example/old-bugs/disappearing-marker-from-spider.html b/example/old-bugs/disappearing-marker-from-spider.html
index 71e9fec..3d3c25d 100644
--- a/example/old-bugs/disappearing-marker-from-spider.html
+++ b/example/old-bugs/disappearing-marker-from-spider.html
@@ -51,12 +51,11 @@
 		var trainPosition = 0,
 			trainDirection = 'up';
 
-		var cloudmadeLayer = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/997/256/{z}/{x}/{y}.png', {
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
 				maxZoom: 18,
-				attribution: 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-				key: 'BC9A493B41014CAABB98F0471D759707'
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
 			}),
-			map = new L.Map('map', {zoom: 15, layers: [cloudmadeLayer]}),
+			map = new L.Map('map', {zoom: 15, layers: [tiles]}),
 			markers = new L.MarkerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
 
 		var stationGeoJsonLayer = L.geoJson(stationJson, {
diff --git a/example/old-bugs/doesnt-update-cluster-on-bottom-level.html b/example/old-bugs/doesnt-update-cluster-on-bottom-level.html
index 7153d2c..510d7b2 100644
--- a/example/old-bugs/doesnt-update-cluster-on-bottom-level.html
+++ b/example/old-bugs/doesnt-update-cluster-on-bottom-level.html
@@ -24,16 +24,17 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(40.782982, -73.969452);
 
 		var map = new L.Map('map', { 
 			center: latlng,
 			zoom:    12,
 			maxZoom: 12,
-			layers: [cloudmade]
+			layers: [tiles]
 		});
 
 		var markerCluster = new L.MarkerClusterGroup();
diff --git a/example/old-bugs/remove-add-clustering.html b/example/old-bugs/remove-add-clustering.html
index 0c4cd82..60ebfa1 100644
--- a/example/old-bugs/remove-add-clustering.html
+++ b/example/old-bugs/remove-add-clustering.html
@@ -26,12 +26,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup({ animateAddingMarkers: true });
 		var markersList = [];
diff --git a/example/old-bugs/remove-when-spiderfied.html b/example/old-bugs/remove-when-spiderfied.html
index c7ee262..194973a 100644
--- a/example/old-bugs/remove-when-spiderfied.html
+++ b/example/old-bugs/remove-when-spiderfied.html
@@ -26,12 +26,13 @@
 
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup();
 		var markersList = [];
diff --git a/example/old-bugs/removelayer-after-remove-from-map.html b/example/old-bugs/removelayer-after-remove-from-map.html
index 691e8f4..48b5de4 100644
--- a/example/old-bugs/removelayer-after-remove-from-map.html
+++ b/example/old-bugs/removelayer-after-remove-from-map.html
@@ -28,8 +28,11 @@
 	
 		var map = new L.Map('map');
 
-		var tilesLayer = new L.TileLayer('http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png');
-		map.addLayer(tilesLayer);
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+			maxZoom: 18,
+			attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+		});
+		map.addLayer(tiles);
 
 		var objectBounds = [[44.98131207805678, 6.0726203025917], [44.981459751363204, 6.073026722623153]];
 		map.fitBounds(new L.LatLngBounds(objectBounds));
diff --git a/example/old-bugs/setView-doesnt-remove.html b/example/old-bugs/setView-doesnt-remove.html
index eb3bd25..05693b9 100644
--- a/example/old-bugs/setView-doesnt-remove.html
+++ b/example/old-bugs/setView-doesnt-remove.html
@@ -27,12 +27,13 @@
 		//Mobile does different bounds to desktop, makes the bug easier to reproduce
 		L.Browser.mobile = true;
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup();
 		var markersList = [];
diff --git a/example/old-bugs/zoomtoshowlayer-doesnt-need-to-zoom.html b/example/old-bugs/zoomtoshowlayer-doesnt-need-to-zoom.html
index 9097a12..4a3d69d 100644
--- a/example/old-bugs/zoomtoshowlayer-doesnt-need-to-zoom.html
+++ b/example/old-bugs/zoomtoshowlayer-doesnt-need-to-zoom.html
@@ -24,12 +24,13 @@
 	<span id="time"></span>
 	<script type="text/javascript">
 
-		var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
-			cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
-			cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
+		var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+				maxZoom: 18,
+				attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+			}),
 			latlng = new L.LatLng(50.5, 30.51);
 
-		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]});
+		var map = new L.Map('map', {center: latlng, zoom: 15, layers: [tiles]});
 
 		var markers = new L.MarkerClusterGroup();
 		var markersList = [];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git



More information about the Pkg-javascript-commits mailing list