Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1646 Rev 1664
Line 184... Line 184...
184
	var marqueur = new L.Marker(latlng, {
184
	var marqueur = new L.Marker(latlng, {
185
		title : structure.nom
185
		title : structure.nom
186
	});
186
	});
187
	marqueur.on('click', surClickMarqueur);
187
	marqueur.on('click', surClickMarqueur);
188
	coucheStructures.addLayer(marqueur);
188
	coucheStructures.addLayer(marqueur);
-
 
189
 
189
}
190
}
Line 190... Line 191...
190
 
191
 
191
function surClickMarqueur(event) {
192
function surClickMarqueur(event) {
192
	var latlng = event.target.getLatLng();
193
	var latlng = event.target.getLatLng();
193
	var collections = new Array();
194
	var collections = new Array();
194
	var structure = null;
195
	var structure = null;
195
	for (var index = 0; index < structures.length; index ++) {
196
	for (var index = 0; index < structures.length; index ++) {
196
		if (structures[index].latitude == latlng.lat && structures[index].longitude == latlng.lng) {
197
		if (structures[index].latitude == latlng.lat && structures[index].longitude == latlng.lng) {
197
			collections = collections.concat(structures[index].collections);
198
			collections = collections.concat(structures[index].collections);
198
			if (structure == null) {
199
			structure = structures[index];
199
				structure = structures[index];
200
			afficherCollections(structure, collections);
200
			}
201
			break;
201
		}
202
		}
202
	}
-
 
203
	afficherCollections(structure, collections);
203
	}
Line 204... Line 204...
204
}
204
}
205
 
205
 
206
function afficherCollections(structure, collections) {
206
function afficherCollections(structure, collections) {