Uname: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
Software: Apache
PHP version: 5.6.40 [ PHP INFO ] PHP os: Linux
Server Ip: 217.160.0.194
Your Ip: 216.73.216.203
User: u72294154 (9179942) | Group: ftpusers (600)
Safe Mode: OFF
Disable Function:
NONE

name : inmuebles-mapa.js
function createMarker(data) {
    //console.log(data);
    position = new google.maps.LatLng(data.latitud, data.longitud);
    titulo = '<style>.infoBox { width: 300px; height: 200px; overflow-y: hidden !important; }</style><h3 style="width:242px; margin-top:10px; position:relative; display:none;"><a href="' + data.url + '" style="font-weight: 600;font-size: 20px;line-height: 22px;text-align: center;letter-spacing: -1px;">' + data.titulo + '</a></h3>';
    imagen = (data.imagen) ? '<a href="' + data.url + '" class="img" target="blank" style="background:red;"><img src="' + data.imagen + '" width="100%" height="" style="border-radius:4px; position:absolute; top:33px;"/></a>' : '';
    boxContent = '<div class="infobox-content clearfix bg-white mb-0">' + imagen + titulo +'</div><span class="infobox-inf"></span>' + getInfo(data);
    myMarker = new google.maps.Marker({
        position: position,
        map: map,
        shape: shape,
        html: boxContent,
        icon: '/img/frontend/marker-inmueble.png',
    });

    if (data.box === undefined) {
        google.maps.event.addListener(myMarker, 'click',
            function() {
                ib.setContent(this.html);
                ib.open(map, this);
                geolocation = this.position;
            }
        );
    }


    markersArray.push(myMarker);
    latlngArray.push(position);


    google.maps.event.addListener(map, 'click', function(){
            ib.close(map, myMarker);
        });

    // Agrupar propiedades
   /* markerCluster.addMarker(myMarker);*/ 
}

function getInfo(data) {
    info = '';

        //info = info + ((data.habitaciones) ? data.habitaciones + ' Habs' : '');
        //info = info + ((data.habitaciones && data.superficie_util) ? ' / ' : '');
        //info = info + ((data.superficie_util) ? data.superficie_util + 'm<sup>2</sup>' : '');
        var gestion;
        if(data.gestion === '1') {
            gestion == 'Venta';
        }else {
            gestion == 'Alquiler';
        }

        info = info + ((data.referencia) ? '<div class="bg-black pl-3 pb-3" style="z-index:100000;"><label class="label-property-detail ref mt-0">'+data.referencia+'</label></div>' : '');
        

    // Habitaciones, baños, superficie
     info = info + ((data.habitaciones) ? '<div class="" style="position:absolute; bottom: 10px; width: 100%;"><ul class="row" style="width: 100%; margin: 0px;"><li class="text-center col-lg-4 p-0"><span class="detail text-white" style="font-size:16px;"> '+ data.habitaciones +' Habs</span></li><li class="text-center col-lg-4 p-0"><span class="detail text-white" style="font-size:16px;"> '+ data.banos +' Baños</span></li><li class="text-center col-lg-4 p-0"><span class="detail text-white" style="font-size:16px;"> '+ data.superficie_util +' m<sup>2</sup></span></li></ul></div>' : '');

    //Precio
    info = info + ((data.precio) ? '<div class="precio pl-3 pr-3" style="font-weight: 800;font-size: 30px;line-height: 30px;text-align: left;color: #FFFFFF; padding-top:5px; padding-bottom:5px; margin-bottom:45px; position:absolute; z-index:200; background:#444444; border-radius:3px; bottom:-10px; left: 7px; opacity:0.8;">' + data.precio + '</div>' : '');

    return ((info) ? '<div class="info">' + info + '</div>' : '');
}

$(document).ready(function() {
    //GMaps
    if ($('.listado-mapa-gmaps').length > 0) {
        cargar_mapa();
    }
});
© 2026 GrazzMean