2011-02-01 15 views
0

GoogleマップAPIバージョン3を使用しています。今私はマーカをラインとリンクして、マーカ間にパスを作成できるようにしたい。 どのような解決策ですか?GoogleマップApiバージョン3

答えて

2

2つのマーカー間のラインを作成するには この

var Polyline_Coordinates = [ 
new google.maps.LatLng(42.357778,-71.061667), // your location lattitude and longitude 
new google.maps.LatLng(40.716667,-74), 
new google.maps.LatLng(41.836944,-87.684444), 
new google.maps.LatLng(34.05,-118.25) 
]; 
var Polyline_Path = new google.maps.Polyline({ 
path: Polyline_Coordinates, 
strokeColor: "#000000", 
// color of the outline of the polyline 
strokeOpacity: 1.0, 
// between 0.0 and 1.0 
strokeWeight: 5 
// The stroke width in pixels 
}); 
Polyline_Path.setMap(map); 
を使用
関連する問題