var beansUrlParameter = function(sParam) { var sPageURL = window.location.search.substring(1), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); } } } var getBaseConfig = function(urlFromRequest) { return { address: '', useGroundElevation: false, elevation: 0, canonicalUrl: urlFromRequest }; } var convertUnitsArr2 = function(address, unitsArr, hideMarkers) { var convertedArr = []; for (var i = 0; i < unitsArr.length; i++) { var bedText = unitsArr[i].bed ? (unitsArr[i].bed + ' Bed') : 'Studio'; var td = new Date().toISOString().substring(0, 10); var as = (unitsArr[i].availability ? ('on ' + unitsArr[i].availability) : 'Now'); if (unitsArr[i].availability && unitsArr[i].availability <= td) { as = 'Now'; } var onPreviewData; if (unitsArr.floorplanImg) { onPreviewData = [ { value: bedText + ' / ' + unitsArr[i].bath + ' Bath / ' + (unitsArr[i].sqft ? unitsArr[i].sqft.toLocaleString() : '0') + ' sq. ft.' }, { value: 'img:' + unitsArr[i].floorplanImg }, { value: '$' + (unitsArr[i].rent ? unitsArr[i].rent.toLocaleString() : '0') + '/ mo' }, { value: 'Available ' + as } ]; } else { onPreviewData = [ { value: bedText + ' / ' + unitsArr[i].bath + ' Bath / ' + (unitsArr[i].sqft ? unitsArr[i].sqft.toLocaleString() : '0') + ' sq. ft.' }, { value: '$' + (unitsArr[i].rent ? unitsArr[i].rent.toLocaleString() : '0') + '/ mo' }, { value: 'Available ' + as } ]; } convertedArr.push({ address: address, unit: unitsArr[i].unit, options: { markers: { display: hideMarkers ? false : true }, poi: [ { name: "ALL", display: false }, { name: "CLUBHOUSE", display: true }, { name: "SWIMMINGPOOL", display: true }, { name: "OFFICE", display: true }, { name: "GYM", display: true }, { name: "MAILROOM", display: true }, { name: "LAUNDRY", display: true }, { name: "PLAYGROUND", display: true } ], onPreviewData: onPreviewData, onClickData: { name: unitsArr[i].unit ? unitsArr[i].unit.replaceAll('||', ' - ') : '', bed: unitsArr[i].bed, bath: unitsArr[i].bath, sqft: unitsArr[i].sqft, rent: unitsArr[i].rent, floorplanImg: unitsArr[i].floorplanImg, availability: unitsArr[i].availability, link: unitsArr[i].link ? unitsArr[i].link.replaceAll('&', '&') : '' } } }); } return convertedArr; } var convertUnitsArr = function(config, unitsArr, hideMarkers) { var addressAndUnitWithOptions; if (unitsArr.length === 0) { unitsArr.push({ unit: '' }); addressAndUnitWithOptions = convertUnitsArr2(config.address, unitsArr, hideMarkers); addressAndUnitWithOptions[0].isPlaceHolder = true; } else { unitsArr.sort((a, b) => { var aa = a.unit ? a.unit : ''; var bb = b.unit ? b.unit : ''; return aa.localeCompare(bb); }); addressAndUnitWithOptions = convertUnitsArr2(config.address, unitsArr, hideMarkers); } if (config.unitShapeConfig) { for (var i = 0; i < addressAndUnitWithOptions.length; i++) { addressAndUnitWithOptions[i].options.unitShape = config.unitShapeConfig(addressAndUnitWithOptions[i]); } } if (config.poi) { for (var i = 0; i < addressAndUnitWithOptions.length; i++) { for (var j = 0; j < config.poi.length; j++) { addressAndUnitWithOptions[i].options.poi.push(config.poi[j]); } } } return addressAndUnitWithOptions; } var commonImmersives = [ { url: "https://gis-server.beans.ai/arcgis/rest/services/Hosted/Immersive_Layers/FeatureServer/0", elevationInfo: { mode: "absolute-height", offset: 0.5, }, renderer: { type: "unique-value", field: "type", uniqueValueInfos: [ { value: "Apricot", symbol: { type: "web-style", name: "Prunus", styleName: "EsriRealisticTreesStyle" } }, { value: "Mountain Mahogany", symbol: { type: "web-style", name: "Cercocarpus", styleName: "EsriRealisticTreesStyle" } }, { value: "Rose", symbol: { type: "web-style", name: "Rosa", styleName: "EsriRealisticTreesStyle" } } ] }, isFeature: true }, { url: "https://gis-server.beans.ai/arcgis/rest/services/Hosted/Immersive_Layers/FeatureServer/1", elevationInfo: { mode: "absolute-height", offset: 0.5, }, renderer: { type: "unique-value", field: "type", uniqueValueInfos: [ { value: "Walkway", symbol: { type: "simple-line", width: 4, color: "#fcf5de" } }, { value: "Road", symbol: { type: "simple-line", width: 16, color: "#eeeeee" } } ] }, isFeature: true }, { url: "https://gis-server.beans.ai/arcgis/rest/services/Hosted/Immersive_Layers/FeatureServer/2", elevationInfo: { mode: "absolute-height", offset: 0.5, }, renderer: { type: "unique-value", field: "type", uniqueValueInfos: [ { value: "Lawn", symbol: { type: "simple-fill", outline: { width: 0 }, color: "#b2c388" } } ] }, isFeature: true }, { url: "https://gis-server.beans.ai/arcgis/rest/services/Hosted/Immersive_Layers/FeatureServer/2", elevationInfo: { mode: "absolute-height", offset: 1.0, }, renderer: { type: "unique-value", field: "type", uniqueValueInfos: [ { value: "Water", symbol: { type: "simple-fill", outline: { width: 0 }, color: "#a5c2d1" } } ] }, isFeature: true }, ]; var getDisplayOptions = function( config, unitShape_, // Default shape selectedUnitShape_, // Selected shape selectableUnitShape_, // Selectable shape hoverUnitShape_ ) { return { propertyAddress: config.address, offsetGroundElevation: config.elevation, useGroundElevation: config.useGroundElevation, showUnitList: true, showUnitShape: true, showDirections: false, showPath: false, camera: config.camera, mobileCamera: config.mobileCamera, renameAmenities: config.renameAmenities ? config.renameAmenities : null, shadowModeUnitShape: config.shadowModeUnitShape ? config.shadowModeUnitShape : { fillColor: '#ffffff', fillOpacity: 1.0, }, neighborModeUnitShape: config.neighborModeUnitShape ? config.neighborModeUnitShape : { fillColor: '#D8D7D4', fillOpacity: 1.0, }, unitShape: config.unitShape ? config.unitShape : { fillColor: '#DDE3E0', fillOpacity: 1.0, strokeWeight: 1.0, strokeOpacity: 0.5, strokeColor: '#000000', ...unitShape_ }, selectedUnitShape: config.selectedUnitShape ? config.selectedUnitShape : { fillColor: '#A6671D', fillOpacity: 1.0, strokeWeight: 1.0, strokeOpacity: 1.0, strokeColor: '#ffffff', ...selectedUnitShape_ }, selectableUnitShape: config.selectableUnitShape ? config.selectableUnitShape : { fillColor: '#24453E', fillOpacity: 1.0, strokeWeight: 1.0, strokeOpacity: 1.0, strokeColor: '#ffffff', ...selectableUnitShape_ }, satelliteModeUnitShape: config.satelliteModeUnitShape ? config.satelliteModeUnitShape : { fillColor: '#ffffff', fillOpacity: 1.0, }, neighborShape: config.neighborShape, immersiveModeUnitShape: config.immersiveModeUnitShape, poiShape: config.poiShape, hoverUnitShape: hoverUnitShape_ ? hoverUnitShape_ : null, // mobileUnitShape: { // fillColor: '#ffffff', // fillOpacity: 0.2, // strokeWeight: 0.5, // strokeOpacity: 0.2, // strokeColor: '#000000', // } }; } var BeansTrilogy = function() { }; BeansTrilogy.prototype.getConfigFromUrl = function(urlFromRequest) { var canonicalUrl = urlFromRequest ? urlFromRequest : window.location.hostname; if (canonicalUrl === 'www.livetrilogy.com') { if (window.location.href.indexOf('/the-hallon-ii/') !== -1) { canonicalUrl = 'www.thehallon8490.com'; } if (window.location.href.indexOf('/the-hallon-i/') !== -1) { canonicalUrl = 'www.thehallon8594.com'; } } if (beansUrlParameter('canonicalUrl')) { canonicalUrl = beansUrlParameter('canonicalUrl'); } var baseConfig = getBaseConfig(canonicalUrl); var config = {}; config["www.livemirada.com"] = { camera: {tilt: 52.942206349421475, heading: 124.08795068492267, position: {x: -83.01883798597497, y: 40.14379697935293, z: 177.5535047147423}}, address: "1 Mirada N Dr, Lewis Center, OH", backgroundImage: { src: '/mapswidget/prettymaps/1mirada.png', width: '2368px', height: '4072px', position: { lat: 40.144196095049445, lng: -83.0177031983588, lat2: 40.140854796225575, lng2: -83.01508356104106, } }, numbersConfig: { size: 30, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } a = a.replace(/[A-Z]/g, ''); a = a.replaceAll('_', '\n'); return a; } }, unitsToExclude: ['FITNESS', 'CLUB', 'BUSINESS', 'PUTTING', 'HOT', 'STORAGE', 'POOL', 'COURT', 'OFFICE', 'TENNIS', 'BBQ', 'TRASH', 'CAR', 'MAIL', 'DOG', 'VOLLEY'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.riversetapts.com"] = { camera: {tilt: 53.77316477649422, heading: 268.85311877762797, position: {x: -90.04613286588634, y: 35.17443625234269, z: 521.7519595250487}}, address: "100 Riverset Ln, Memphis, TN", backgroundImage: { src: '/mapswidget/prettymaps/100riverset.png', width: '1192px', height: '2454px', position: { lat: 35.17745806040488, lng: -90.05540718453583, lat2: 35.171093626506514, lng2: -90.05153906387355, } }, numbersConfig: { size: 10, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } a = a.replaceAll('_', '\n'); return a; } }, unitsToExclude: ['FITNESS', 'CLUB', 'BUSINESS', 'PUTTING', 'HOT', 'STORAGE', 'POOL', 'COURT', 'OFFICE', 'TENNIS', 'BBQ', 'TRASH', 'CAR', 'MAIL'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.villasatmainstreet.com"] = { camera: {tilt: 40.81485762253729, heading: 150.13696836588016, position: {x: -83.7494395812328, y: 42.254134390389325, z: 444.4794311756268}}, address: "101 Lake Village Dr, Ann Arbor, MI", backgroundImage: { src: '/mapswidget/prettymaps/101lakevillage.png', width: '1722px', height: '1300px', position: { // lng: -83.7444455, // lat: 42.2522223, // lng2: -83.7499099, // lat2: 42.2491366 lat: 42.25220600185376, lng: -83.7499989412723, lat2: 42.24912721216406, lng2: -83.74441201245193, } }, rotate: 1.97, numbersConfig: { size: 11, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM', 'DOG', 'GYM', 'FITNESS', 'COFFEE', 'BUSINESS', 'GAZEBO', 'CARPORT', 'MAIL', 'PATIO', 'PACKAGE', 'CLUB', 'MAINTENANCE', 'FIRE'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.livecentralpark.com"] = { camera: {tilt: 36.301549983612375, heading: 3.016809229200494, position: {x: -83.01407459472539, y: 40.11810764085087, z: 320.7608755622059}}, address: "105 Radio City Blvd, Columbus, OH", backgroundImage: { src: '/mapswidget/prettymaps/105radiocity.png', width: '3654px', height: '2067px', position: { lat: 40.12152814141454, lng: -83.01642974305957, lat2: 40.11949575004621, lng2: -83.01184765300425, } }, rotate: -2.89, numbersConfig: { size: 20, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(0, a.indexOf('-')); } a = a.replace(/[A-Z]/g, ""); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM', 'DOG', 'GYM', 'FITNESS', 'COFFEE', 'BUSINESS', 'GAZEBO', 'CARPORT', 'MAIL', 'PATIO', 'PACKAGE', 'CLUB', 'MAINTENANCE', 'FIRE'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.reflectioncoveapts.com"] = { camera: {tilt: 35.610656504834196, heading: 0.4464130364564229, position: {x: -90.48367623643614, y: 38.59069196918912, z: 365.77662085182965}}, address: "13992 Reflection Dr, Manchester, MO", backgroundImage: { src: '/mapswidget/prettymaps/13992reflection.png', width: '2344px', height: '1086px', position: { lat: 38.594163863752464, lng: -90.4867788199893, lat2: 38.59231269109612, lng2: -90.48137769011937, } }, rotate: 0, numbersConfig: { size: 14, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } a = a.replaceAll('_', ' '); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM', 'DOG', 'GYM', 'FITNESS', 'COFFEE', 'BUSINESS', 'GAZEBO', 'CARPORT', 'MAIL', 'PATIO', 'PACKAGE', 'CLUB', 'MAINTENANCE', 'FIRE', 'COURTYARD', 'LOBBY', 'GUEST', 'SUN', 'HEARTH'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.residencesatthestreets.com"] = { camera: {tilt: 39.05342458823349, heading: 301.06229737855597, position: {x: -90.4919718120275, y: 38.76413053345761, z: 272.2339760120958}}, address: "1650 Beale St, Saint Charles, MO", }; config["www.park205.com"] = { camera: {tilt: 46.59094437300344, heading: 270.39309897389666, position: {x: -87.8219375504019, y: 42.01043248037349, z: 166.3755940143019}}, address: "205 Touhy Ave, Park Ridge, IL", backgroundImage: { src: '/mapswidget/prettymaps/205wtouhy.png', width: '771px', height: '1617px', position: { lat: 42.01135651503581, lng: -87.82465656548487, lat2: 42.00952403741741, lng2: -87.82338350765048, } }, rotate: 0, numbersConfig: { size: 20, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(0, a.indexOf('-')); } a = a.replaceAll('_', ' '); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM', 'DOG', 'GYM', 'FITNESS', 'COFFEE', 'BUSINESS', 'GAZEBO', 'CARPORT', 'MAIL', 'PATIO', 'PACKAGE', 'CLUB', 'MAINTENANCE', 'FIRE', 'COURTYARD', 'LOBBY', 'GUEST', 'SUN', 'HEARTH'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.parklaureateapts.com"] = { camera: {tilt: 52.39030959913331, heading: 296.7243078334443, position: {x: -85.59503803793123, y: 38.214075291867616, z: 472.1159800682217}}, address: "2050 Stony Brook Dr, Louisville, KY", numbersConfig: { size: 24 }, unitsToExclude: ['LOUNGE', 'POOL', 'LOBBY', 'TENNIS', 'GRILL', 'GYM', 'TRASH', 'GARAGE', 'MAIL'], backgroundImage: { src: '/mapswidget/prettymaps/2050stony.png', width: '4848px', height: '3428px', position: { lat: 38.218343618316574, lng: -85.60517638731139, lat2: 38.21473684525431, lng2: -85.59874149294312 } }, initialPosition: { lat: 38.21671660430653, lng: -85.60193320376236 }, }; config["www.nocablu.com"] = { camera: {tilt: 51.016857888798704, heading: 144.97711526949558, position: {x: -87.69862037183648, y: 41.9248927783249, z: 87.43719067052007}}, address: "2340 N California Ave, Chicago, IL", }; config["www.livewestlyn.com"] = { camera: {tilt: 57.61595333668464, heading: 235.22501332187954, position: {x: -93.07363049052593, y: 44.90105430544104, z: 99.30926310736686}}, address: "240 Thompson E Ave, West St Paul, MN", backgroundImage: { src: '/mapswidget/prettymaps/240thompson.png', width: '1632px', height: '1630px', position: { lat: 44.90158407293216, lng: -93.07654057804959, lat2: 44.89979864751276, lng2: -93.07356954325941, } }, rotate: 0, numbersConfig: { size: 20, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(0, a.indexOf('-')); } a = a.replaceAll('_', ' '); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM', 'DOG', 'GYM', 'FITNESS', 'COFFEE', 'BUSINESS', 'GAZEBO', 'CARPORT', 'MAIL', 'PATIO', 'PACKAGE', 'CLUB', 'MAINTENANCE', 'FIRE'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.azaleatampa.com"] = { camera: {tilt: 56.67967274502346, heading: 180.05656610186492, position: {x: -82.3629241031482, y: 27.926852136325838, z: 240.91029806807637}}, address: "2633 Azalea Garden Pl, Tampa, FL", backgroundImage: { src: '/mapswidget/prettymaps/2633azalea.png', width: '3316px', height: '2267px', position: { lat: 27.925191685960547, lng: -82.36475651698458, lat2: 27.92248524473886, lng2: -82.36028578321946, } }, numbersConfig: { size: 16, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, filters: { bed: { name: 'Bedrooms', values: [ {type: 'all', name: 'Any'}, {type: 'range', value1: '0', value2: '1', name: 'Studio'}, {type: 'range', value1: '1', value2: '2', name: '1BR'}, {type: 'range', value1: '2', value2: '3', name: '2BR'}, {type: 'min', value1: '3', name: '3BR+'} ] }, rent: { name: 'Rent', values: [ {type: 'all', name: 'Any'}, {type: 'range', value1: '0', value2: '1500', name: 'Less than $1,500'}, {type: 'min', value1: '1500', name: '$1,500+'} ] }, sqft: { name: 'Area', values: [ {type: 'all', name: 'Any'}, {type: 'range', value1: '0', value2: '500', name: '0-500'}, {type: 'range', value1: '500', value2: '1000', name: '500-1000'}, {type: 'min', value1: '1000', name: '1000+'} ] } }, }; config["www.villasatnorthstar.com"] = { camera: {tilt: 50.295952502572355, heading: 40.25808782339294, position: {x: -83.70852227500197, y: 42.314127228952394, z: 476.76731388270855}}, address: "2820 Windwood Dr, Ann Arbor, MI", }; config["www.thebohen.com"] = { camera: {tilt: 54.754837024320786, heading: 324.446941506331, position: {x: -93.29670606563234, y: 44.94978783182021, z: 83.79477642010897}}, address: "2851 Hennepin Ave, Minneapolis, MN", backgroundImage: { src: '/mapswidget/prettymaps/2851hennepin.png', width: '2928px', height: '1288px', position: { lat: 44.95086474775219, lng: -93.2984103554245, lat2: 44.9503621231023, lng2: -93.2968738984809, } }, numbersConfig: { size: 32, convert: (a) => { if (!a) { return a; } if (a === 'MAILROOM') { return 'MAIL'; } if (a === 'SEATING_AREA') { return 'SEATING'; } if (a === 'CLUBHOUSE') { return 'CLUB'; } if (a === 'ROOFTOP_TERRACE') { return 'TERRACE'; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } a = a.replaceAll('_', '\n'); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.pointeatstjoseph.com"] = { camera: {tilt: 57.62466189854316, heading: 245.633765168896, position: {x: -86.2444793787662, y: 41.680880910114595, z: 154.1817802777514}}, address: "307 E Lasalle Ave, South Bend, IN", backgroundImage: { src: '/mapswidget/prettymaps/307elaselle.png', width: '3276px', height: '2464px', position: { lat: 41.681100308760185, lng: -86.24937054484012, lat2: 41.67906151527186, lng2: -86.24566862227226, } }, numbersConfig: { size: 24, convert: (a) => { if (!a) { return a; } if (a === 'CLUBHOUSE') { return 'CLUB'; } if (a === 'FITNESS_CENTER') { return 'GYM'; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } a = a.replaceAll('_', '\n'); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.liveatwaterchase.com"] = { camera: {tilt: 37.374191965111905, heading: 267.3312921702587, position: {x: -85.71565360474234, y: 42.909548558834295, z: 558.2194613991305}}, address: "3100 Waterchase SW Way, Wyoming, MI", backgroundImage: { src: '/mapswidget/prettymaps/3100waterchase.png', width: '1198px', height: '2614px', position: { lat: 42.91162653314104, lng: -85.72269032134093, lat2: 42.906530081896435, lng2: -85.71953571031818, } }, numbersConfig: { size: 10, convert: (a) => { if (!a) { return a; } if (a === 'CLUBHOUSE') { return 'CLUB'; } if (a === 'FITNESS_CENTER') { return 'GYM'; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } a = a.replaceAll('_', '\n'); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.bradfordateaston.com"] = { camera: {tilt: 30.280804543446912, heading: 208.582602166817, position: {x: -82.90828533001361, y: 40.06629911479626, z: 915.5455435169861}}, address: "4150 Silver Springs Ln, Columbus, OH", backgroundImage: { src: '/mapswidget/prettymaps/4150silversprings.png', width: '2716px', height: '1212px', position: { lat: 40.063752679538094, lng: -82.9161753974101, lat2: 40.06129296050495, lng2: -82.90890777284866, } }, rotate: 3, numbersConfig: { size: 9, convert: (a) => { if (!a) { return a; } a = a.replace(/[A-Z-]/g, ""); return a; } }, unitsToExclude: ['OFFICE', 'OUTDOOR', 'GRILL', 'WFH', 'GYM', 'SAUNA', 'SPIN', 'SPA', 'GARAGE', 'LOUNGE', 'GAME', 'POOL', 'CABANA', 'TRASH', 'BATHROOM', 'DOG', 'GYM', 'FITNESS', 'COFFEE', 'BUSINESS', 'GAZEBO'], initialPosition: { lat: 27.92390960761993, lng: -82.36294157819287, mobile: { lat: 27.92390960761993, lng: -82.36294157819287, } }, }; config["www.theviewoncollins.com"] = { camera: {tilt: 56.518029053083126, heading: 0.2638372908104707, position: {x: -84.50032378892251, y: 42.68496884975563, z: 237.29650565888733}}, address: "4540 Collins Rd, Lansing, MI", }; config["www.thecommonsatrivertown.com"] = { camera: {tilt: 48.85842112793913, heading: 65.42504233542711, position: {x: -85.7465868692867, y: 42.87808489776622, z: 464.8374658469111}}, address: "4702 Rivertown Commons SW Dr, Grandville, MI", }; config["www.crescentcentre.com"] = { camera: {tilt: 68.29203075347031, heading: 98.51425574131216, position: {x: -85.75944326801958, y: 38.247842556381805, z: 118.89844116196036}}, address: "657 S 3rd St, Lousville, KY", }; config["www.lodgeatoverland.com"] = { camera: {tilt: 56.24300772096744, heading: 134.09506388744686, position: {x: -92.5054255815715, y: 44.09806507515425, z: 288.6703298864886}}, address: "6635 Lodge View Rd, Rochester, MN", }; config["www.livevelovillage.com"] = { camera: {tilt: 46.41066137184357, heading: 318.5239573685518, position: {x: -88.01735202311156, y: 42.91218577940576, z: 300.6731743067503}}, address: "7235 S Ballpark Dr, Franklin, WI", unitShape: { fillColor: '#D0CABD', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#212529', }, selectableUnitShape: { fillColor: '#1376a3', }, }; config["www.theaurilla.com"] = { camera: {tilt: 59.26678446992486, heading: 270.72379240842463, position: {x: -92.95764903361086, y: 44.83823645239517, z: 132.22005277406424}}, address: "7689 Hardwood S Ave, Cottage Grove, MN", mobileCamera: {tilt: 0.4999793574397971, heading: 17.97122629868964, position: {x: -92.96036385142429, y: 44.83828554565843, z: 263.38155778776854}}, }; config["www.waterfordliving.com"] = { camera: {tilt: 39.35973625518272, heading: 146.68515482770476, position: {x: -89.7955675002388, y: 35.03614236995581, z: 453.45562586560845}}, address: "8037 Waterford Cir, Memphis, TN", }; config["www.thehallon.com"] = { camera: {tilt: 63.28582479610514, heading: 350.4160288505781, position: {x: -93.38659626519075, y: 44.92370423256684, z: 152.7963491724804}}, address: "8460 Excelsior Blvd, Hopkins, MN", }; config["www.thehallon8490.com"] = { camera: {tilt: 53.41897484069985, heading: 335.08785969968676, position: {x: -93.38537609801305, y: 44.92473841965207, z: 137.84896716848016}}, address: "8490 Excelsior Blvd, Hopkins, MN", }; config["www.thehallon8594.com"] = { camera: {tilt: 51.21870300937769, heading: 344.32132453302194, position: {x: -93.38700194166634, y: 44.92451685167442, z: 135.93082429096103}}, address: "8594 Excelsior Blvd, Hopkins, MN", }; config["www.villasatbaileyranch.com"] = { camera: {tilt: 55.10601146796335, heading: 126.32589160953981, position: {x: -95.86865245086744, y: 36.282593617592134, z: 294.1148732798174}}, address: "8751 N 97th East Ave, Owasso, OK", }; config["www.kenyonsquareliving.com"] = { camera: {tilt: 63.864224446068846, heading: 155.57634080470947, position: {x: -82.97095209783137, y: 40.13805743314267, z: 111.25716891698539}}, address: "9220 Worthington Rd, Westerville, OH", }; config["www.optimaoldorchardwoods.com"] = { camera: {tilt: 60.25815554873217, heading: 182.33582306060515, position: {x: -87.7600516061663, y: 42.06012928560808, z: 173.70673177298158}}, address: "9739 Woods Dr, Skokie, IL", }; if (!config[canonicalUrl].canonicalUrl) { config[canonicalUrl].canonicalUrl = canonicalUrl; } if (config[canonicalUrl]) { return {...baseConfig, ...config[canonicalUrl]}; } return baseConfig; } BeansTrilogy.prototype.getFloorPlans = function(callback) { var so = this; var canonicalUrl = so.getConfigFromUrl().canonicalUrl; var queryUrl = canonicalUrl; if (canonicalUrl === 'www.thehallon8594.com') { queryUrl = 'www.livetrilogy.com/the-hallon-i'; } if (canonicalUrl === 'www.thehallon8490.com') { queryUrl = 'www.livetrilogy.com/the-hallon-ii'; } var DONE = 4; // readyState 4 means the request is done. var OK = 200; // status 200 is a successful return. var xhr = new XMLHttpRequest(); xhr.open('GET', 'https://' + queryUrl + '/floorplans', false); xhr.send(); if (xhr.readyState !== DONE || xhr.status !== OK) { return; } var c = xhr.responseText.split('\n'); var floorplansData = []; var imgs = []; var lastKnownImage = ''; for (var i in c) { var j = c[i]; if (j.indexOf('Floor Plan') === -1 && j.indexOf('Floorplan') === -1 && j.indexOf('card-img-top') === -1 && j.indexOf('floorplan-action-button') === -1) { continue; } var y = /.*Floor Plan.*?card-img-top.*?src="(.*?)".*/.exec(j); if (y) { lastKnownImage = y[1]; } if (!y) { y = /.*src="(.*?)".*?card-img-top.*?Floor Plan.*/.exec(j); if (y) { lastKnownImage = y[1]; } } if (!y) { y = /.*src="(.*?)".*?card-img-top.*/.exec(j); if (y) { lastKnownImage = y[1]; } } if (!y) { y = /.*data-selenium-id="Floorplan.*?data-src="(http.*?)".*/.exec(j); if (y) { lastKnownImage = y[1]; } } var y = /.*a href="(.*?)".*floorplan-action-button.*/.exec(j); if (y) { floorplansData.push( { url: y[1], img: lastKnownImage, units: [] } ); lastKnownImage = ''; } } var d = c.join(''); var y = /.*(."@context":.*?)}<\/script>.*/.exec(d); if (y) { var z = '{' + y[1] + '}'; var jo = JSON.parse(z); for (var h = 0; h < jo['accommodationFloorPlan'].length; h++) { floorplansData[h].beds = jo['accommodationFloorPlan'][h]['numberOfBedrooms']; floorplansData[h].baths = jo['accommodationFloorPlan'][h]['numberOfFullBathrooms']; } } for (var i = 0; i < floorplansData.length; i++) { if (floorplansData[i].url.startsWith('https://')) { continue; } var xhr = new XMLHttpRequest(); xhr.open('GET', floorplansData[i].url, false); xhr.send(); if (xhr.readyState !== DONE || xhr.status !== OK) { continue; } var c = xhr.responseText.split('\n'); var z = []; for (var k in c) { var j = c[k]; if (j.indexOf('"url":') !== -1) { mainUrl = j.replaceAll('"url": "', '').replaceAll('"', '').trim(); } if (j.indexOf('applyGAClick') === -1) { continue; } var y = /.*type="button".*?id="(.*?)".*?applyGAClick.(.*?)." href=['"](.*?)['"].*/.exec(j); if (y) { floorplansData[i].units.push({ unit: y[1], data: y[2], link: y[3] }); } } } var data = new FormData(); data.append('url', canonicalUrl); data.append('unit', JSON.stringify(floorplansData)); var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://www.beans.ai/mapswidget/client/trilogy'); xhr.send(data); } BeansTrilogy.prototype.checkAndGetData = function() { var so = this; if (beansUrlParameter('getData') === 'true') { so.getFloorPlans(); } } BeansTrilogy.prototype.render = function(be1, urlFromRequest, renderType) { var so = this; var config = so.getConfigFromUrl(urlFromRequest); var address = config.address; if (beansUrlParameter('getData') === 'true') { so.getFloorPlans(); return; } fetch('https://www.beans.ai/mapswidget/client/trilogy-data.json') .then(response => response.json()) .then(json => { var unitsArr = []; for (var i in json) { if (i.indexOf(config.canonicalUrl) !== -1) { var x = JSON.parse(json[i]); for (var j = 0; j < x.length; j++) { for (var k = 0; k < x[j].units.length; k++) { var unit = x[j].units[k]['unit']; var unitData = x[j].units[k]['data']; var y = /.*'(.*)', '(.*)', '(.*)', '(.*)', '(.*)', '(.*)'.*/.exec(unitData); var beds = x[j].beds ? x[j].beds : 0; var baths = x[j].baths ? x[j].baths : 0; var sqft = 0; var rent = 0; floorplanImg = x[j].img ? x[j].img : ''; if (y) { sqft = Number(y[3]); rent = Number(y[4]); } if (config.address === '1 Oakbrook Ct, Bloomington, IL') { if (x[j].url.startsWith('/floorplans/oakbrook')) { unit = 'O' + unit; } else { unit = 'B' + unit; } } if (config.address === '9220 Worthington Rd, Westerville, OH') { if (unit.indexOf('K') !== -1) { unit = unit.substring(unit.indexOf('K') + 1) + '-' + unit.substring(0, unit.indexOf('K')); } } var avail = ''; if (x[j].units[k]['link']) { var l = x[j].units[k]['link']; var y = /.*MoveInDate=([0-9/]+).*/.exec(l); if (y) { avail = y[1]; } } unitsArr.push({ unit: unit, bed: beds, bath: baths, sqft: sqft, rent: rent, link: x[j].units[k]['link'] ,floorplanImg: floorplanImg, availability: avail}); } } } } var addressAndUnitWithOptions = convertUnitsArr(config, unitsArr, true); config = { ...config, poiShape: { fillOpacity: 1.0 }, mobileUnitShape: { fillColor: '#ffffff', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', } }; var displayOptions = getDisplayOptions( config, { fillColor: '#FFFFFF', fillOpacity: 1.0, strokeWeight: 0.2, strokeOpacity: 1.0, strokeColor: '#000000', }, // Default color { fillColor: '#CDA349', }, // Selected color { fillColor: '#3F1F08', } // Selectable color ); displayOptions = { ...displayOptions, filters: config.filters ? config.filters : { bed: { name: 'Bedrooms', values: [ {type: 'all', name: 'Any'}, {type: 'range', value1: '1', value2: '2', name: '1BR'}, {type: 'range', value1: '2', value2: '3', name: '2BR'}, {type: 'min', value1: '3', name: '3BR+'} ] }, rent: { name: 'Rent', values: [ {type: 'all', name: 'Any'}, {type: 'range', value1: '0', value2: '1500', name: 'Less than $1,500'}, {type: 'min', value1: '1500', name: '$1,500+'} ] }, sqft: { name: 'Area', values: [ {type: 'all', name: 'Any'}, {type: 'range', value1: '0', value2: '500', name: '0-500'}, {type: 'range', value1: '500', value2: '1000', name: '500-1000'}, {type: 'min', value1: '1000', name: '1000+'} ] } } }; if (!renderType || renderType.toLowerCase() === '3d') { be1.render( "body-inner-1", "bf7e8662c3524dd:6164366434383862653234313432656139643166", addressAndUnitWithOptions, { hideNavigateButton: true, hideMyLocationButton: true }, { beansMapType: 'ESRI', initialMap: 'STREET', prettyLayer: config.prettyLayer ? config.prettyLayer : '', // "https://basemaps.arcgis.com/arcgis/rest/services/OpenStreetMap_v2/VectorTileServer" modernButtons: true, modernBeansCard: displayOptions.hideBeansCard ? false : true, outsideButtons: true, showCompass: true, showFullScreenMode: false, showNeighbors: false, showPOIButton: true, showSeparateFacilitiesCard: true, immersiveConfig: config.immersiveConfig, showImmersive: config.showImmersive, showImmersiveLight: config.showImmersiveLight, showImmersiveOnLoad: config.showImmersiveOnLoad, overrideBaseHeightFn: config.overrideBaseHeightFn, overrideHeight: config.overrideHeight ? config.overrideHeight : 0, overrideHeightFn: config.overrideHeightFn, renameAmenities: config.renameAmenities ? config.renameAmenities : null, poiShape: config.poiShape, initialTilt: 30, initialZ: 400, initialHeading: 270, initialPosition: { address: address }, show2DButton: true, event2D: () => { document.getElementById('body-inner-2').style.visibility = 'visible'; document.getElementById('body-inner-1').style.visibility = 'hidden'; }, ...displayOptions } ); } else { if (displayOptions.unitShape) { displayOptions.unitShape.fillOpacity = 1.0; } be1.render( "body-inner-2", "bf7e8662c3524dd:6164366434383862653234313432656139643166", addressAndUnitWithOptions, { hideNavigateButton: true, hideMyLocationButton: true }, { initialMap: "STREET", modernBeansCard: displayOptions.hideBeansCard ? false : true, hideFloorSelector: false, hideRotateControl: true, hideSatelliteButton: true, hideShadow: true, outsideButtons: true, modernButtons: true, showNeighbors: false, showPOIButton: false, showSeparateFacilitiesCard: true, showNumbers: true, numbersConfig: config.numbersConfig, showBuildingShape: config.showBuildingShape, backgroundImage: config.backgroundImage, show3DButton: true, event3D: () => { document.getElementById('body-inner-2').style.visibility = 'hidden'; document.getElementById('body-inner-1').style.visibility = 'visible'; }, unitsToExclude: config.unitsToExclude, ...displayOptions } ); } }); }