Newsgroup: it.comp.lang.javascript
Titolo: percorso su mappa google

Salve a tutti, non riesco a capire perchè questo funziona:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Simple Icons</title>
<link 
href="
http://code.google.com/apis/maps/documentation/javascript/examples/default.css
" 
rel="stylesheet" type="text/css" />
<script type="text/javascript" 
src="
http://maps.google.com/maps/api/js?sensor=false
"></script>
<script type="text/javascript">
function initialize() {
  var myLatLng = new google.maps.LatLng(43.76983969543108, 
11.105903685092926);
  var myOptions = {
    zoom: 16,
    center: myLatLng,
//    mapTypeId: google.maps.MapTypeId.TERRAIN
 mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"),
      myOptions);
  var flightPlanCoordinates = [
    new google.maps.LatLng(43.76983969543108, 11.105903685092926),
    new google.maps.LatLng(43.77018736595358, 11.10518217086792),
    new google.maps.LatLng(43.770423664542285, 11.105042695999145),
    new google.maps.LatLng(43.7716981113262, 11.106201410293579)
// new google.maps.LatLng(43.771907288447004, 11.10120713710785)
  ];
  var flightPath = new google.maps.Polyline({
    path: flightPlanCoordinates,
    strokeColor: "#FF0000",
    strokeOpacity: 1.0,
    strokeWeight: 2
  });
  flightPath.setMap(map);
}
</script>
</head>
<body onLoad="initialize()">
  <div id="map_canvas"></div>
</body>
</html>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
e questo dove ho agginto la linea
new google.maps.LatLng(43.771907288447004, 11.10120713710785)
per allungare il percorso non funziona?
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Simple Icons</title>
<link 
href="
http://code.google.com/apis/maps/documentation/javascript/examples/default.css
" 
rel="stylesheet" type="text/css" />
<script type="text/javascript" 
src="
http://maps.google.com/maps/api/js?sensor=false
"></script>
<script type="text/javascript">
function initialize() {
  var myLatLng = new google.maps.LatLng(43.76983969543108, 
11.105903685092926);
  var myOptions = {
    zoom: 16,
    center: myLatLng,
//    mapTypeId: google.maps.MapTypeId.TERRAIN
 mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"),
      myOptions);
  var flightPlanCoordinates = [
    new google.maps.LatLng(43.76983969543108, 11.105903685092926),
    new google.maps.LatLng(43.77018736595358, 11.10518217086792),
    new google.maps.LatLng(43.770423664542285, 11.105042695999145),
    new google.maps.LatLng(43.7716981113262, 11.106201410293579)
   new google.maps.LatLng(43.771907288447004, 11.10120713710785)
  ];
  var flightPath = new google.maps.Polyline({
    path: flightPlanCoordinates,
    strokeColor: "#FF0000",
    strokeOpacity: 1.0,
    strokeWeight: 2
  });
  flightPath.setMap(map);
}
</script>
</head>
<body onLoad="initialize()">
  <div id="map_canvas"></div>
</body>
</html>
Grazie a chi vorrà farmelo capire
Leonardo

 [cuttone2]

 ha scritto nel messaggio 
news:4cf9f44f$0$11083$4faf...@reader1.news.tin.it...

Cavolo! Che minchiata! Ad una cert'ora è meglio che stacchi.
CMQ grazie
Leonardo