var map; 
function load(){ 
var latlng=new GLatLng(35.682956, 139.771810);

//地図を作成
map = new GMap2( document.getElementById("mapArea")); 
map.setCenter( latlng, 17 );
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());

//オリジナルマーカーの画像を作成
var myIcon = new GIcon();
myIcon.image = "http://www.bellesalle.co.jp/common/images/bellesalle.png";
myIcon.iconSize = new GSize(52, 50);
myIcon.iconAnchor = new GPoint(20, 10);
myIcon.infoWindowAnchor = new GPoint(26, 0);
myIcon.printImage = "http://www.bellesalle.co.jp/common/images/bellesalle.png";

//ラインを地図に追加
var points01 = [];
points01[0] = new GLatLng(35.683117, 139.772125);
points01[1] = new GLatLng(35.683056, 139.772095);
var polyline01 = new GPolyline(points01, "#ff0000", 5, 1);
map.addOverlay(polyline01);

var points02 = [];
points02[0] = new GLatLng(35.681698, 139.769424);
points02[1] = new GLatLng(35.681541, 139.770020);
points02[2] = new GLatLng(35.681686, 139.770142);
points02[3] = new GLatLng(35.681866, 139.770279);
points02[4] = new GLatLng(35.682346, 139.770584);
points02[5] = new GLatLng(35.682869, 139.770844);
points02[6] = new GLatLng(35.683380, 139.771088);
points02[7] = new GLatLng(35.683277, 139.771347);
points02[8] = new GLatLng(35.683113, 139.771774);
var polyline02 = new GPolyline(points02, "#0000ff", 5, 1);
map.addOverlay(polyline02);
	  
//マーカーを地図に追加
var marker= new GMarker(new GLatLng(35.682956,139.771810),{title:"ベルサール八重洲", icon: myIcon});
GEvent.addListener(marker,"click",function(){
	//マーカーがクリックされたら、ポップアップを表示する
	marker.openInfoWindowHtml("<div style='text-align:left;'><b>ベルサール八重洲</b><br>八重洲ファースト　フィナンシャルビル2F・3F</div>");
});
map.addOverlay(marker);
      
//マーカーに擬似的にクリックされたイベントを発生させる
GEvent.trigger(marker,"click");
}

window.onload=load;
window.onunload=GUnload;
