integration/v2/js/main.js
changeset 160 7f141426ccbf
parent 155 551ae48cdf0b
child 164 09ad16c9fee5
--- a/integration/v2/js/main.js	Wed Jun 26 11:25:08 2013 +0200
+++ b/integration/v2/js/main.js	Wed Jun 26 12:02:06 2013 +0200
@@ -121,6 +121,25 @@
 	}
 //map
 	if($('#map').length){
-		var map = L.map('map').setView([51.505, -0.09], 13);
+		initmap()
 	}
+function initmap() {
+	// set up the map
+	map = new L.Map('map');
+
+	// create the tile layer with correct attribution
+	var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
+	var osm = new L.TileLayer(osmUrl, {minZoom: 3, maxZoom: 20});		
+
+	// start the map in South-East England
+	map.setView(new L.LatLng(48.833, 2.333),4);
+	map.addLayer(osm);
+
+	// markers
+	var marker1 = L.marker([48.833, 2.333]).addTo(map);
+	marker1.bindPopup("Beaux-Arts de Paris");
+	var marker2 = L.marker([47.233,-1.583]).addTo(map);
+	marker2.bindPopup("Beaux-Arts de Nantes");
+}
+
 });//ready