173,22 → 173,13 |
|
function initialiserGoogleMap(){ |
// Carte |
var latLng = new google.maps.LatLng(43.29545, 5.37458); |
if (VILLE == 'Montpellier') { |
var latLng = new google.maps.LatLng(48.8543, 2.3483);// Paris |
if (VILLE == 'Marseille') { |
latLng = new google.maps.LatLng(43.29545, 5.37458); |
} else if (VILLE == 'Montpellier') { |
latLng = new google.maps.LatLng(43.61077, 3.87672); |
} else { |
//console.log('Ville:'+VILLE); |
} |
|
// Tentative de geocalisation |
if (navigator.geolocation) { |
navigator.geolocation.getCurrentPosition(function(position) { |
var latitude = position.coords.latitude; |
var longitude = position.coords.longitude; |
latLng = new google.maps.LatLng(latitude, longitude); |
}); |
} |
|
var options = { |
zoom: 16, |
center: latLng, |
227,7 → 218,17 |
}); |
|
deplacerMarker(latLng); |
|
// Tentative de geocalisation |
if (navigator.geolocation) { |
navigator.geolocation.getCurrentPosition(function(position) { |
var latitude = position.coords.latitude; |
var longitude = position.coords.longitude; |
latLng = new google.maps.LatLng(latitude, longitude); |
deplacerMarker(latLng); |
}); |
} |
} |
|
$(document).ready(function() { |
|