I can not see the line on the map, the code is apparently correct, it does not break on any line, when I see it on the console.
function initialize() {
var latlng = new google.maps.LatLng(latitudes, longitudes);
var options = {
zoom: 12,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("mapa"), options);
geocoder = new google.maps.Geocoder();
if (coord.length > 1) {
for (var i = 0; i < coord.length; i++) {
var location = coord[i].split(",");
pontos[i] = new google.maps.LatLng(location[0], location[1]);
}
var flightPath = new google.maps.Polyline({
path: pontos,
strokeColor: '#FF0000',
strokeOpacity: 1.0,
strokeWeight: 3,
map: map,
});
flightPath.setMap(map);
}
}
initialize();