Je suis assez nouveau sur google maps alors soyez patient!Google Maps API V3 - besoin d'aide avec plusieurs marqueurs
Mon code fonctionnait très bien jusqu'à ce que j'ai essayé d'ajouter plusieurs marqueurs, apprécierais vraiment si quelqu'un pouvait coup d'œil et voir si je manque quelque chose ...
$(function() {
var map_markers = [ [ [52.951946], [1.018124] ], [ [52.955311], [0.987997] ] ];
var options = {
zoom: 13,
center: latlng,
mapTypeControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map_canvas'), options);
//markers
for (var i = 0; i < map_markers.length; i++) {
var m = map_markers[i];
var myLatLng = new google.maps.LatLng(m[0], m[1]);
var marker = new google.maps.Marker({
position: myLatLng,
map: map
});
}
})
merci, ceci est une excellente réponse – Haroldo