/* ========================================================
 * $Id: weblinks_gmap_block.js,v 1.1 2007/08/08 04:20:56 ohwada Exp $
 * http://www.google.com/apis/maps/
 * ========================================================
 */

function weblinks_gm_b_show( gmap, point, info_arr ) 
{
	gmap.addControl( new GSmallMapControl() );
	gmap.addControl( new GMapTypeControl() );
	gmap.setCenter( new GLatLng( parseFloat( point[0] ) , parseFloat( point[1] ) ) , Math.floor( point[2] ) );
	for( i=0 ; i<info_arr.length ; i++ ){
		gmap.addOverlay( weblinks_gm_b_create_marker( info_arr[i] ) );
	}
}

function weblinks_gm_b_create_marker( info ) 
{
	var marker = new GMarker( new GLatLng( parseFloat( info[0] ) , parseFloat( info[1] ) ) );
	GEvent.addListener( marker , "click" , function() {
		marker.openInfoWindowHtml( info[2] );
	});
	return marker;
}
