1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| function initialisation() {
$.ajax({
type: "Get",
url: "Dao/ScanK7.cs/Longitude",
data: "longitude=Lng",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var listeDeLongitude = [];
for (var i = 0; i < data.length; i++) {
listeDeLongitude = data[i];
}
}
});
$.ajax({
type: "Get",
url: "Dao/ScanK7.cs/Latitude",
data: "Latitude=Lat",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var listeDeLatitude = [];
for (var i = 0; i < data.length; i++) {
listeDeLatitude = data[i];
}
}
});
var latlng = new google.maps.LatLng(45.3370518, 1.9005528);
var options = {
center: latlng,
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var carte = new google.maps.Map(document.getElementById("map"), options);
// liste des marqueurs à afficher
var listeDeMarqueurs = [];
// recuperer les marqueurs
// afficher la liste de marqueurs
for(var marqueur in listeDeMarqueurs ){
new google.maps.Marker({
position: listeDeMarqueurs[marqueur],
map: carte
});
} |
Partager