PageSourceSearch

https://dominicanrepublicrealestate.com.do/wp-content/cache/min/1/…/js/properties-mapbox.js?ver=1791562278

js dominicanrepublicrealestate.com.do collected 2026-10-10 03:33:17 UTC 7,208 bytes, 25 lines download raw bytes

1(function($){"use strict";window.realhomes_update_mapbox=function(propertiesMapData){const mapContainer=$('#map-head');let propertiesMapBoxContainer=document.getElementById("listing-map");let priceTagClasses=$('#map-head').hasClass('dual-price')?'dual-price':'';let mapZoomLevel=parseInt(propertiesMapOptions.zoom,10);let hasCustomZoom=!Number.isNaN(mapZoomLevel);propertiesMapBoxContainer.className='mapbox-dl-map-wrap';if(typeof propertiesMapData!=="undefined"&&0<propertiesMapData.length){const mapboxAPI=propertiesMapOptions.mapboxAPI,mapboxStyle=propertiesMapOptions.mapboxStyle;let tileLayer=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'});let mapBounds=[];for(let i=0;i<propertiesMapData.length;i++){if(propertiesMapData[i].lat&&propertiesMapData[i].lng){mapBounds.push([propertiesMapData[i].lat,propertiesMapData[i].lng])}}
2var mapCenter=L.latLng(27.664827,-81.515755);if(1===mapBounds.length){mapCenter=L.latLng(mapBounds[0])}
3if(propertiesMapBoxContainer.childNodes.length!==0){mapContainer.empty().append('<div id="listing-map"></div>');propertiesMapBoxContainer=document.getElementById("listing-map");propertiesMapBoxContainer.className='mapbox-dl-map-wrap'}
4L.mapbox.accessToken=mapboxAPI;var propertiesMap=L.mapbox.map(propertiesMapBoxContainer).addLayer(L.mapbox.styleLayer(mapboxStyle));if(hasCustomZoom){if(mapBounds.length){propertiesMap.setView(L.latLngBounds(mapBounds).getCenter(),mapZoomLevel)}else{propertiesMap.setView(mapCenter,mapZoomLevel)}}else if(mapBounds.length>1){propertiesMap.fitBounds(mapBounds)}else if(mapBounds.length===1){propertiesMap.setView(L.latLng(mapBounds[0]),14)}else{propertiesMap.setView(mapCenter,12)}
5let markers;if(rhMapsData.isModern){markers=new L.MarkerClusterGroup({chunkedLoading:!0,spiderfyOnMaxZoom:!0,animate:!1})}else{markers=new L.MarkerClusterGroup()}
6for(let i=0;i<propertiesMapData.length;i++){if(propertiesMapData[i].lat&&propertiesMapData[i].lng){let propertyMapData=propertiesMapData[i],markerLatLng=L.latLng(propertyMapData.lat,propertyMapData.lng),propertyMarker,markerOptions={id:propertyMapData.id,riseOnHover:!0};if(propertyMapData.title){markerOptions.title=propertyMapData.title}
7if('pin'===propertiesMapOptions.marker_type&&propertyMapData.icon){var iconOptions={iconUrl:propertyMapData.icon,iconSize:[42,57],iconAnchor:[20,57],popupAnchor:[1,-54]};if(propertyMapData.retinaIcon){iconOptions.iconRetinaUrl=propertyMapData.retinaIcon}
8markerOptions.icon=L.icon(iconOptions);propertyMarker=L.marker(markerLatLng,markerOptions)}else{propertyMarker=new L.CircleMarker(markerLatLng,{fillColor:propertiesMapOptions.marker_color,color:propertiesMapOptions.marker_color,weight:2,fillOpacity:0.6,opacity:0.6,radius:25}).addTo(propertiesMap)}
9let popupContent="",popupContentWrapper=document.createElement("div");popupContentWrapper.className='mapboxgl-popup-content';if(propertyMapData.thumb){popupContent+='<a class="mapbox-popup-thumb-link" href="'+propertyMapData.url+'"><img class="mapbox-popup-thumb" src="'+propertyMapData.thumb+'" alt="'+propertyMapData.title+'"/></a>'}
10if(rhMapsData.isUltra){popupContent+='<div class="mapbox-detail-wrapper">';if(propertyMapData.title){popupContent+='<h5 class="mapbox-popup-title"><a class="mapbox-popup-link" href="'+propertyMapData.url+'">'+propertyMapData.title+'</a></h5>'}
11popupContent+='<div>';if(propertyMapData.propertyType){popupContent+='<span class="type">'+propertyMapData.propertyType+'</span>'}
12if(propertyMapData.price){popupContent+='<p><span class="mapbox-popup-price '+priceTagClasses+'">'+propertyMapData.price+'</span></p>'}
13popupContent+='</div>';popupContent+='</div>'}else{if(propertyMapData.title){popupContent+='<h5 class="mapbox-popup-title"><a class="mapbox-popup-link" href="'+propertyMapData.url+'">'+propertyMapData.title+'</a></h5>'}
14if(propertyMapData.price){popupContent+='<p><span class="mapbox-popup-price '+priceTagClasses+'">'+propertyMapData.price+'</span></p>'}}
15popupContentWrapper.innerHTML=popupContent;propertyMarker.popupContents=popupContentWrapper;propertyMarker.id=propertyMapData.id;propertyMarker.className='mapboxgl-wrapper';propertyMarker.bindPopup(popupContentWrapper);markers.addLayer(propertyMarker)}}
16propertiesMap.addLayer(markers);propertiesMap.scrollWheelZoom.disable();propertiesMap.on('popupopen',function(e){var px=propertiesMap.project(e.target._popup._latlng);px.y-=e.target._popup._container.clientHeight/2;propertiesMap.panTo(propertiesMap.unproject(px),{animate:!0})});function is_marker_in_cluster(marker,cluster){let length=cluster.length;for(let i=0;i<length;i++){if(cluster[i].id==marker){return!0}}
17return!1}
18function mapbox_open_popup(markerid){propertiesMap.eachLayer(function(layer){if(typeof layer._childCount!=="undefined"){let markersincluster=layer.getAllChildMarkers();if(is_marker_in_cluster(markerid,markersincluster)){layer.spiderfy();markersincluster.forEach(function(property_marker){if(property_marker.id===parseInt(markerid)){property_marker.openPopup()}})}}else{if(layer.id===parseInt(markerid)){layer.openPopup()}}})}
19function mapbox_close_popup(markerid){propertiesMap.eachLayer(function(layer){if(typeof layer._childCount!=="undefined"){var markersincluster=layer.getAllChildMarkers();if(is_marker_in_cluster(markerid,markersincluster)){layer.unspiderfy();markersincluster.forEach(function(property_marker){if(property_marker.id==parseInt(markerid)){layer.closePopup()}})}}else{if(layer.id==parseInt(markerid)){layer.closePopup();propertiesMap.closePopup()}}})}
20window.realhomesInfoboxPopupTrigger=function(){$('.rh_popup_info_map').each(function(i){let property_ID=$(this).attr('data-rh-id').replace(/[^\d.]/g,'');$(this).on('mouseenter',function(){mapbox_open_popup(property_ID)}).on('mouseleave',function(){mapbox_close_popup(property_ID)})});return!1};let RHisMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?!0:!1;if(!RHisMobile){realhomesInfoboxPopupTrigger()}}else{let fallbackLayer=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'});let fallback_lat,fallback_lng;if(undefined!==propertiesMapOptions.fallback_location&&propertiesMapOptions.fallback_location.lat&&propertiesMapOptions.fallback_location.lng){fallback_lat=propertiesMapOptions.fallback_location.lat;fallback_lng=propertiesMapOptions.fallback_location.lng}else{fallback_lat='27.664827';fallback_lng='-81.515755'}
21let fallbackMapOptions={center:[fallback_lat,fallback_lng],zoom:12};if(propertiesMapBoxContainer.childNodes.length!==0){mapContainer.empty().append('<div id="listing-map"></div>');let propertiesMapBoxContainer=document.getElementById("listing-map");propertiesMapBoxContainer.className='mapbox-dl-map-wrap'}
22let fallbackMap=L.map(propertiesMapBoxContainer,fallbackMapOptions);fallbackMap.addLayer(fallbackLayer)}
23$(".leaflet-control-zoom").parent(".leaflet-bottom").addClass("rh_leaflet_controls_zoom")}
24if(typeof propertiesMapData!=="undefined"){realhomes_update_mapbox(propertiesMapData)}
25function isset(variable){return typeof variable!==typeof undefined}})(jQuery)

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.