// código original: http://code.google.com/apis/maps/documentation/examples/map-markers.html
function initialize2()
{
	if( GBrowserIsCompatible() )
	{
		var options = { 'size' : new GSize( $("#map_canvas2").width(), $("#map_canvas2").height() ) };
		var map = new GMap2( $("#map_canvas2")[0], options );
		map.setCenter(new GLatLng(-14.2350040,-51.9252800), 4);
		var maptips = new MapTips( map ); // MapTips aqui!
	
		// Add 10 markers to the map at random locations
		var bounds = map.getBounds();
		var southWest = bounds.getSouthWest();
		var northEast = bounds.getNorthEast();
		var lngSpan = northEast.lng() - southWest.lng();
		var latSpan = northEast.lat() - southWest.lat();
		for (var i = 0; i < 10; i++)
		{
			var point = new GLatLng(southWest.lat() + latSpan * Math.random(), southWest.lng() + lngSpan * Math.random());
			var marker = new GMarker(point);
			map.addOverlay( marker );
			maptips.add_tooltip( marker, "Oi, tudo bem? (" + Math.round(point.lat() * point.lng()) + ")" ); // MapTips aqui!
		}
		// criar um ponto bem no centro, com um texto grande
		var point = new GLatLng(-14.2350040,-51.9252800);
		var marker = new GMarker(point);
		map.addOverlay( marker );
		maptips.add_tooltip( marker, "Oi, tudo bem? Sou um texto enorme, que não cabe em uma linha só.." ); // MapTips aqui!
	}
}
$( function(){ setTimeout( initialize2, 500 ); } );
window.unload = GUnload;

