Longitude = -51.11009713786825;
Latitude = -29.98023179459594;
var Zoom = 16;

function montamapa()
{
	if (GBrowserIsCompatible()) {
		mapa = new GMap2(document.getElementById("divMapa"));
		mapa.setUIToDefault();
		var location = new GLatLng(Latitude, Longitude);
		mapa.setCenter(location, Zoom, G_SATELLITE_MAP);
		
		
		//adiciona escala
		mapa.addControl(new GScaleControl());
		//adiciona controle de tipo de mapa
		mapa.addControl(new GMapTypeControl());
		//smooth zoom
		mapa.enableContinuousZoom();
		//zoom com a rodinha do mouse
		mapa.enableScrollWheelZoom();
		
		
		//cria icone
		var iconePaseo = new GIcon();
		iconePaseo.image = "img/logoThebeauty.png";
		iconePaseo.iconSize = new GSize(195,38);
		iconePaseo.iconAnchor = new GPoint(190, 13);
		iconePaseo.infoWindowAnchor = new GPoint(100, 2);
		
		//adiciona marcador
		var latlng = new GLatLng(Latitude, Longitude);
		var marcador = new GMarker(latlng, {title: "Paseo Zona Sul", icon: iconePaseo});

		//formata html da aba de texto
		var abatexto = "<div style='width:280px; height:215px;'><img border='0' style='margin-top:0;' src='img/foto_feira.jpg' /></div>";		
		//quando clica no icone
		GEvent.addListener(marcador, "click", function () {
			marcador.openInfoWindowHtml(abatexto);
		});
		mapa.addOverlay(marcador);
		marcador.openInfoWindowHtml(abatexto);
	} else {
		alert("Seu navegador não suporta Google Maps!");
	}
}

window.onload = function(){
	montamapa();
};


