Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1130 Rev 1187
Line 171... Line 171...
171
var marker;
171
var marker;
172
var latLng;
172
var latLng;
Line 173... Line 173...
173
 
173
 
174
function initialiserGoogleMap(){
174
function initialiserGoogleMap(){
-
 
175
	// Carte
-
 
176
	var latLng = new google.maps.LatLng(48.8543, 2.3483);// Paris
175
	// Carte
177
	if (VILLE == 'Marseille') {
176
	var latLng = new google.maps.LatLng(43.29545, 5.37458);
178
		latLng = new google.maps.LatLng(43.29545, 5.37458);
177
	if (VILLE == 'Montpellier') {
179
	} else if (VILLE == 'Montpellier') {
178
		latLng = new google.maps.LatLng(43.61077, 3.87672);
-
 
179
	} else {
-
 
180
		//console.log('Ville:'+VILLE);
180
		latLng = new google.maps.LatLng(43.61077, 3.87672);
Line 181... Line -...
181
	}
-
 
182
	
-
 
183
	// Tentative de geocalisation
-
 
184
	if (navigator.geolocation) {
-
 
185
		navigator.geolocation.getCurrentPosition(function(position) {
-
 
186
			var latitude = position.coords.latitude;
-
 
187
			var longitude = position.coords.longitude;
-
 
188
			latLng = new google.maps.LatLng(latitude, longitude);
-
 
189
		});
-
 
190
	}
181
	}
191
 
182
	
192
	var options = {
183
	var options = {
193
		zoom: 16,
184
		zoom: 16,
194
		center: latLng,
185
		center: latLng,
Line 225... Line 216...
225
		icon: GOOGLE_MAP_MARQUEUR_URL,
216
		icon: GOOGLE_MAP_MARQUEUR_URL,
226
		position: latLng
217
		position: latLng
227
	});
218
	});
Line 228... Line 219...
228
	
219
	
-
 
220
	deplacerMarker(latLng);
-
 
221
	
-
 
222
	// Tentative de geocalisation
-
 
223
	if (navigator.geolocation) {
-
 
224
		navigator.geolocation.getCurrentPosition(function(position) {
-
 
225
			var latitude = position.coords.latitude;
-
 
226
			var longitude = position.coords.longitude;
-
 
227
			latLng = new google.maps.LatLng(latitude, longitude);
-
 
228
			deplacerMarker(latLng);
-
 
229
		});
229
	deplacerMarker(latLng);
230
	}
Line 230... Line 231...
230
}
231
}
Line 231... Line 232...
231
 
232