Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1139 Rev 1150
Line 73... Line 73...
73
}
73
}
Line 74... Line 74...
74
 
74
 
75
function getUrlVars()
75
function getUrlVars()
76
{
76
{
-
 
77
    var vars = [], hash;
77
    var vars = [], hash;
78
    if(window.location.href.indexOf('?') != -1) {
78
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
79
	    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
79
    for(var i = 0; i < hashes.length; i++)
80
	    for(var i = 0; i < hashes.length; i++)
80
    {
81
	    {
81
        hash = hashes[i].split('=');
82
	        hash = hashes[i].split('=');
82
        vars.push(hash[0]);
83
	        vars.push(hash[0]);
-
 
84
	        vars[hash[0]] = hash[1];
83
        vars[hash[0]] = hash[1];
85
	    }
84
    }
86
    }
85
    return vars;
87
    return vars;
Line 86... Line 88...
86
}
88
}
Line 278... Line 280...
278
	map.setCenter(bounds.getCenter());
280
	map.setCenter(bounds.getCenter());
279
	map.fitBounds(bounds);
281
	map.fitBounds(bounds);
280
	map.panToBounds(bounds);
282
	map.panToBounds(bounds);
281
}
283
}
Line 282... Line -...
282
 
-
 
283
function programmerRafraichissementCarteSauv() {
-
 
284
	
-
 
285
	var points = [];
-
 
286
	var bounds = new google.maps.LatLngBounds();
-
 
287
	for (var i = 0; i < stations.points.length; ++i) {
-
 
288
		var point = stations.points[i];
-
 
289
		var maLatLng = new google.maps.LatLng(point.lat, point.lng);
-
 
290
		var stationImage = attribuerImageMarqueur(point.id); 
-
 
291
		var point = new google.maps.Marker({
-
 
292
			position: maLatLng,
-
 
293
			map: map,
-
 
294
			icon: stationImage,
-
 
295
			stationInfos: point
-
 
296
		});
-
 
297
		bounds.extend(maLatLng);
-
 
298
		google.maps.event.addListener(point, 'click', surClickMarqueur);
-
 
299
		points.push(point);
-
 
300
	}
-
 
301
 
-
 
302
	if (pointsOrigine == null && boundsOrigine == null) {
-
 
303
		pointsOrigine = points;
-
 
304
		boundsOrigine = bounds;
-
 
305
	}
-
 
306
	
-
 
307
	executerMarkerClusterer(points, bounds);
-
 
308
}
-
 
309
 
284
 
310
function attribuerImageMarqueur(id, nbreMarqueur) {
285
function attribuerImageMarqueur(id, nbreMarqueur) {
311
	var marqueurImage = null;
286
	var marqueurImage = null;
312
	if (etreMarqueurCommune(id)) {
287
	if (etreMarqueurCommune(id)) {
313
		marqueurImage = new google.maps.MarkerImage(communeImageUrl, new google.maps.Size(24, 32));
288
		marqueurImage = new google.maps.MarkerImage(communeImageUrl, new google.maps.Size(24, 32));