<!-- Para crear un boton con las referencias en el mapa principal -->

var timer;

function showLayerbox() {
 var button = document.getElementById("more_inner"); 
 button.className="highlight";
 
 var layerbox = document.getElementById("box");
 // Left size of more control
 var offsetX = 230;
 // Top size of more control plus more button height
 var offsetY = 7 + 18;

 var lpos = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(offsetX, offsetY));

 lpos.apply(layerbox);
 if(window.timer) clearTimeout(timer);
 layerbox.style.display = "block";
}


function setClose(e) {
 if(!e) e = window.event;
 var layerbox = document.getElementById("box");
 var button = document.getElementById("more_inner"); 

 timer = window.setTimeout(function(){layerbox.style.display = "none"; button.className=""; }, 400);
 }

function MoreControl() {};
MoreControl.prototype = new GControl();
MoreControl.prototype.initialize = function(map) {

 var more = document.createElement("div");
 more.style.border = "1px solid black";
 more.title = "Ver/Ocultar";
 var inner = document.createElement("div");
 inner.id = "more_inner";
 inner.appendChild(document.createTextNode("Referencias"));
 more.appendChild(inner);
 more.onclick = showLayerbox;
 more.onmouseout = setClose;
 map.getContainer().appendChild(more);
 return more;
}


MoreControl.prototype.getDefaultPosition = function() {
 return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(230, 7));
}

<!-- Fin boton referencias -->


<!-- Para cerrar una ventana automaticamente -->

function cierraVentana()
{
 var timer;
 timer = setTimeout(function(){window.close();},200);
}

<!-- Fin cerrar ventana -->

<!-- Boton para volver a la posicion inicial -->

//utiliza el .css situado en googlemapsInmuebles.

function MDControlBotonVolver(center) { }

MDControlBotonVolver.prototype = new GControl();
MDControlBotonVolver.prototype.initialize = function(map) {

var botonVolver=document.createElement("div");
 botonVolver.className= "MDbuttons";
 botonVolver.title= "Volver a la posición Inicial";
 botonVolver.appendChild(document.createTextNode(TXT_VOLVER));

 GEvent.addDomListener(botonVolver, "click", function() {
 map.panTo(center);
 botonVolver.className="MDbuttonsHighlight";
 });

 GEvent.addDomListener(botonVolver, "mouseout", function() {
 botonVolver.className="MDbuttons";
 });

 map.getContainer().appendChild(botonVolver);

 return botonVolver;
 }

 MDControlBotonVolver.prototype.getDefaultPosition = function() {
 return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7,50));
}

<!-- Fin boton volver -->




