this is my problem. From rails I call a function:
<body onload="initialize(<%= @segnalazione.id %>,<%= @segnalazione.dove %>); ">
where @segnalazione.dove is like "(lat, lng)".
On the called function, the map is not loaded because half cood is loaded. If I run "alert(coord);" I get only "lng". Why?
function initialize(id,coord) {
var myOptions = {
zoom: 11,
center: coord,mapTypeId:google.maps.MapTypeId.ROADMAP,draggableCursor:'pointer'
}
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);