Subversion Repositories Applications.bazar

Rev

Rev 471 | Rev 476 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 471 Rev 475
Line 59... Line 59...
59
		var optionsGoogleMapsv3 = {
59
		var optionsGoogleMapsv3 = {
60
			// On centre la carte sur le languedoc roussillon
60
			// On centre la carte sur le languedoc roussillon
61
			center: new google.maps.LatLng(43.84245116699036, 3.768310546875),
61
			center: new google.maps.LatLng(43.84245116699036, 3.768310546875),
62
			zoom: 7,
62
			zoom: 7,
63
			mapTypeId: google.maps.MapTypeId.G_HYBRID_MAP,
63
			mapTypeId: google.maps.MapTypeId.G_HYBRID_MAP,
-
 
64
			mapTypeId: "OSM",
-
 
65
			mapTypeControlOptions: {
-
 
66
			mapTypeIds: ["OSM", 
-
 
67
				google.maps.MapTypeId.ROADMAP,
-
 
68
				google.maps.MapTypeId.HYBRID,
-
 
69
				google.maps.MapTypeId.SATELLITE,
-
 
70
				google.maps.MapTypeId.TERRAIN]
-
 
71
			},
64
			mapTypeControl: true,
72
			mapTypeControl: true,
65
			scaleControl: true
73
			scaleControl: true
66
		};
74
		};
67
	    map = new google.maps.Map(document.getElementById("map"), optionsGoogleMapsv3);
75
	    map = new google.maps.Map(document.getElementById("map"), optionsGoogleMapsv3);
-
 
76
		map.mapTypes.set("OSM", new google.maps.ImageMapType({
-
 
77
 			getTileUrl: function(coord, zoom) {
-
 
78
 				return "http://osm.tela-botanica.org/tile/" + // cache de tuiles avec nginx
-
 
79
 				zoom + "/" + coord.x + "/" + coord.y + ".png";
-
 
80
 			},
-
 
81
 			tileSize: new google.maps.Size(256, 256),
-
 
82
 			isPng: true,
-
 
83
 			alt: "OpenStreetMap",
-
 
84
 			name: "OSM",
-
 
85
			maxZoom: 19
-
 
86
		}));
Line 68... Line 87...
68
 
87
 
69
	    google.maps.event.addListener(map, "click", function(event) {
88
	    google.maps.event.addListener(map, "click", function(event) {
70
			if (marker != null) {
89
			if (marker != null) {
71
				marker.setMap(null);
90
				marker.setMap(null);