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 BeansHaley = function() { }; BeansHaley.prototype.getConfigFromUrl = function(urlFromRequest) { var canonicalUrl = urlFromRequest ? urlFromRequest : window.location.hostname; if (beansUrlParameter('canonicalUrl')) { canonicalUrl = beansUrlParameter('canonicalUrl'); } var baseConfig = getBaseConfig(canonicalUrl); var config = {}; config["www.liveathiddenponds.com"] = { address: "1 Creekside Dr, Gas City, IN", }; config["www.stevenscreekcommons.com"] = { camera: {tilt: 55.00813125835803, heading: 241.0903790684398, position: {x: -82.03726064861065, y: 33.52117628657482, z: 269.44827638193965}}, address: "100 Bon Air Dr, Augusta, GA", }; config["www.emberwood-apts.com"] = { camera: {tilt: 54.304539556438236, heading: 141.59192549459863, position: {x: -92.05550362887857, y: 30.150944480368995, z: 245.42205273732543}}, address: "100 S Meyers Dr, Lafayette, LA", }; config["www.fairwayestateswy.com"] = { address: "1020 Country Club Rd, Gillette, WY", }; config["www.deerwoodapts.com"] = { camera: {tilt: 61.60448300533145, heading: 185.4725104617139, position: {x: -94.72918526691448, y: 31.28894174975541, z: 197.46920408681035}}, address: "110 Champions Dr, Lufkin, TX", }; config["www.hickorygroveapts.net"] = { camera: {tilt: 42.18086251900202, heading: 139.41658361038762, position: {x: -95.80207323145028, y: 36.04712871712538, z: 239.39396338444203}}, address: "1101 W Houston St, Broken Arrow, OK", }; config["www.sturbridgetownhomes.com"] = { camera: {tilt: 61.50367788154933, heading: 318.34105815421174, position: {x: -92.38066284291575, y: 34.76315374804405, z: 180.92535659763962}}, address: "1400 Old Forge Dr, Little Rock, AR", }; config["www.liveatgardenglen.com"] = { camera: {tilt: 52.542532158756636, heading: 269.902348668167, position: {x: -88.93061360578945, y: 38.300913230085996, z: 227.50488304626197}}, address: "1407 S 34th St, Mount Vernon, IL", }; config["www.meadowsatgreentree.com"] = { camera: {tilt: 47.70368762176658, heading: 80.76922809317207, position: {x: -85.77804038828236, y: 38.321510013640165, z: 311.6360881673172}}, address: "1418 Marlowe Dr, Clarksville, IN", }; config["www.cottonwoodapartmenthomes.com"] = { camera: {tilt: 51.016085768248594, heading: 283.1907292221708, position: {x: -91.02405028618557, y: 33.38234205597934, z: 259.54920781590044}}, address: "1462 S Colorado St, Greenville, MS", }; config["www.springhillaptsmo.com"] = { camera: {tilt: 51.18463967054457, heading: 341.0794188968242, position: {x: -93.45509407081417, y: 37.1245526962325, z: 216.93324813526124}}, address: "1605 E Hines St, Republic, MO", }; config["www.markschurchcommons.com"] = { camera: {tilt: 60.496020575937095, heading: 35.15883631625258, position: {x: -82.0893372778802, y: 33.476646774133634, z: 223.92861060332507}}, address: "1700 Bowdoin Dr, Augusta, GA", }; config["www.pryorcreekapts.com"] = { camera: {tilt: 38.27629195418595, heading: 178.70716379971813, position: {x: -95.3089681829093, y: 36.286622778546544, z: 270.2185982717201}}, address: "1707 S Elliott St, Pryor, OK", }; config["www.creeksidelandingapts.com"] = { camera: {tilt: 52.10293743953081, heading: 20.74430945422568, position: {x: -78.93523061783789, y: 36.05339314301026, z: 329.4702238366008}}, address: "18 Weather Hill Cir, Durham, NC", }; config["www.patriotpointetownhomes.com"] = { camera: {tilt: 53.136197819496225, heading: 81.43224101539295, position: {x: -96.87090119920711, y: 39.03909944400012, z: 265.11628195270896}}, address: "1901 Victory Ln, Junction City, KS", }; config["www.villagesquarehotsprings.com"] = { camera: {tilt: 60.050098614756955, heading: 280.60633316117986, position: {x: -93.06617857990736, y: 34.44825897671956, z: 189.7269762987271}}, address: "200 Lakeland Dr, Hot Springs National Park, AR", }; config["www.georgetownparkapartments.com"] = { camera: {tilt: 50.18892812943963, heading: 232.75850431898235, position: {x: -83.71380610211921, y: 42.81375024125678, z: 459.8997167479247}}, address: "2100 Georgetown Pkwy, Fenton, MI", }; config["www.wildwoodapthomes.com"] = { camera: {tilt: 59.55859385211743, heading: 2.151193470778534, position: {x: -83.95950572342015, y: 30.838140813269998, z: 256.49827447906137}}, address: "220 Covington Ave, Thomasville, GA", }; config["www.bristolaptslawton.com"] = { camera: {tilt: 44.38594032638241, heading: 285.7103520412534, position: {x: -98.41754175307972, y: 34.60488454419758, z: 262.21352191548795}}, address: "2202 SW B Ave, Lawton, OK", }; config["www.pembrookplaceapartments.com"] = { camera: {tilt: 57.82406787924628, heading: 347.7519900204465, position: {x: -89.00704346124445, y: 42.23149076065213, z: 377.6097849197686}}, address: "2775 Stowmarket Ave, Rockford, IL", }; config["www.liveatcuestas.com"] = { camera: {tilt: 59.610539696099124, heading: 58.17130431339004, position: {x: -106.75318602594562, y: 32.35323597692219, z: 102.87504352163523}}, address: "2800 N Roadrunner Pkwy, Las Cruces, NM", }; config["www.amberwoodkokomo.com"] = { camera: {tilt: 56.984304481428495, heading: 268.0754627063422, position: {x: -86.12992534460513, y: 40.5188614833105, z: 235.56239166017622}}, address: "2864 Amberwood Pl, Kokomo, IN", }; config["www.thereserveatlakeside.com"] = { camera: {tilt: 54.10636154196831, heading: 269.8178038097804, position: {x: -84.36299931503416, y: 42.250758738333936, z: 261.9162836112082}}, address: "2921 Woods Circle Dr, Jackson, MI", }; config["www.deercrossapartments.com"] = { camera: {tilt: 45.14456914317773, heading: 355.87989710846387, position: {x: -94.73000092271594, y: 31.289854232540666, z: 247.17887769360095}}, address: "3000 S 1st St, Lufkin, TX", }; config["www.forestlakeatoysterpoint.com"] = { camera: {tilt: 42.92651268853561, heading: 269.69984993886067, position: {x: -76.48402313322089, y: 37.09128156374785, z: 390.22963461093605}}, address: "307 Saint Thomas Dr, Newport News, VA", }; config["www.fieldcrestapt.com"] = { camera: {tilt: 53.90758668460677, heading: 287.33950208419884, position: {x: -85.39503237873843, y: 31.185532506268352, z: 273.0777888102457}}, address: "31 Trillium Cir, Dothan, AL", }; config["www.westbrookkokomo.com"] = { camera: {tilt: 49.69746815885258, heading: 0.7391398998187956, position: {x: -86.16460239209746, y: 40.4457267369859, z: 228.78235799260437}}, address: "3334 Dixon Ln, Kokomo, IN", }; config["www.cottonwoodcreekapts.net"] = { camera: {tilt: 51.016085768253056, heading: 283.19076417817234, position: {x: -91.02398675599926, y: 33.38282389251638, z: 259.54920781590044}}, address: "3601 Gene Field Rd, Saint Joseph, MO", }; config["www.threeoaksapartments.com"] = { camera: {tilt: 53.10560126604743, heading: 216.31632431452434, position: {x: -83.28620123777614, y: 30.891776634062023, z: 327.4625461809337}}, address: "3833 N Oak Street Ext, Valdosta, GA", }; config["www.villagesquarecabot.com"] = { camera: {tilt: 59.721666878178524, heading: 5.852641282249737, position: {x: -92.04484148485467, y: 34.97587146853778, z: 153.84389912057668}}, address: "400 Northport Dr, Cabot, AR", }; config["www.pheasantrunaptssidney.com"] = { address: "400 NW Lincoln Ave, Sidney, MT", }; config["www.arborcreekapartments.net"] = { camera: {tilt: 55.55675413074738, heading: 154.47706900351366, position: {x: -98.51393097854694, y: 33.87360989208291, z: 278.60061726905406}}, address: "4000 Weeks Park Ln, Wichita Falls, TX", }; config["www.villagesquaresearcy.com"] = { camera: {tilt: 58.45477899262436, heading: 181.18982913271657, position: {x: -91.73036039353832, y: 35.22512391045243, z: 130.95855129137635}}, address: "401 E Booth Rd, Searcy, AR", }; config["www.ashbrookeapts.com"] = { camera: {tilt: 50.2682050075459, heading: 271.5956269582615, position: {x: -93.57658972321127, y: 41.73480996372535, z: 198.9567626817152}}, address: "415 NE Delaware Ave, Ankeny, IA", }; config["www.forestridgeapartments.net"] = { address: "420 Munroe Falls Ave, Cuyahoga Falls, OH", }; config["www.northwoodplaceapartments.com"] = { camera: {tilt: 59.054801230674855, heading: 73.10168209205679, position: {x: -88.68585377890186, y: 32.40331106849632, z: 227.5954292975366}}, address: "4315 Highway 39 N, Meridian, MS", }; config["www.turtlelakeapts.com"] = { camera: {tilt: 49.81770591333252, heading: 250.57423014636305, position: {x: -85.7123863272181, y: 30.187795912398737, z: 427.9470023084432}}, address: "4324 W 20th St, Panama City, FL", }; config["www.willowsofcoventry.biz"] = { camera: {tilt: 60.626289309066436, heading: 166.16369391305568, position: {x: -85.2559837539381, y: 41.04739544665267, z: 285.71427442505956}}, address: "4499 Coventry Pkwy, Fort Wayne, IN", }; config["www.nantucketharbor.net"] = { camera: {tilt: 49.88815532216007, heading: 48.392955433759425, position: {x: -93.82213872375765, y: 32.484673408189686, z: 330.66591111104935}}, address: "4650 Lakeshore Dr, Shreveport, LA", }; config["www.parkwayvillas.net"] = { camera: {tilt: 56.84335392007446, heading: 324.9600503070334, position: {x: -98.56130249589644, y: 33.8524100924044, z: 207.85912896227092}}, address: "4800 Brookdale Dr, Wichita Falls, TX", }; config["www.residencesatbelleville.com"] = { camera: {tilt: 58.13161616311206, heading: 269.03807312272954, position: {x: -86.30942087000173, y: 41.657856561518614, z: 266.2888491721824}}, address: "4940 Belleville Cir, South Bend, IN", }; config["www.cambridgeapartmenthomesms.com"] = { camera: {tilt: 44.413729448842886, heading: 295.31933224518707, position: {x: -90.00179802179835, y: 32.356775904798745, z: 305.8829502966255}}, address: "520 Vine Dr, Flowood, MS", }; config["www.woodbrookapt.com"] = { camera: {tilt: 48.95630278337334, heading: 188.86352969608393, position: {x: -86.24209188365687, y: 39.851260517941235, z: 348.6956714326516}}, address: "5302 Woodbrook Dr, Indianapolis, IN", }; config["www.thepointe-elpaso.com"] = { camera: {tilt: 58.20887584065065, heading: 241.5127080212764, position: {x: -106.50496481093163, y: 31.826519790130753, z: 250.606296681799}}, address: "5525 N Stanton St, El Paso, TX", }; config["www.woodscapeapt.com"] = { camera: {tilt: 67.26521199341798, heading: 201.97393569570409, position: {x: -76.53225841302391, y: 37.15671334318897, z: 143.59328701533377}}, address: "581 Calla Ct, Newport News, VA", }; config["www.ashtonpinesshreveport.com"] = { camera: {tilt: 66.12644682435, heading: 280.54180341196206, position: {x: -93.85594448314889, y: 32.442035915771584, z: 149.96781093254685}}, address: "6000 W 70th St, Shreveport, LA", }; config["www.parkhillatfairlawn.com"] = { camera: {tilt: 57.8402130691911, heading: 340.99468626257004, position: {x: -81.61351592988416, y: 41.11185212554112, z: 166.79087764117867}}, address: "619 Park Hill Dr, Fairlawn, OH", }; config["www.bayoakapts.com"] = { camera: {tilt: 68.04448639430287, heading: 281.4067602681011, position: {x: -88.84775920425595, y: 40.48392310058509, z: 3939.739849017933}}, address: "619 W Orlando Ave, Normal, IL", poi: [ { name: 'COMMUNITY', iconUrl: "https://www.beans.ai/m/assets/community_0.png", display: true, location: { lat: 40.497980825532714, lng: -88.94852556142375 } }, { name: 'COMMUNITY', iconUrl: "https://www.beans.ai/m/assets/community_0.png", display: true, location: { lat: 40.52585147606343, lng: -88.99817286963118 } } ], }; config["www.stonegateamarillo.com"] = { camera: {tilt: 44.24437999407234, heading: 180.90922381976054, position: {x: -101.9032170614412, y: 35.14215941175696, z: 247.79085830133408}}, address: "6400 Bell St, Amarillo, TX", }; config["www.maison-bocage.com"] = { camera: {tilt: 40.04830952660823, heading: 147.72367096064718, position: {x: -92.06573036343936, y: 30.213142217445373, z: 440.6967598963529}}, address: "655 Marie Antoinette St, Lafayette, LA", }; config["www.huntingtonpointeapthomes.com"] = { camera: {tilt: 47.878384570070835, heading: 270.368855075437, position: {x: -101.91118973628794, y: 35.190546004947734, z: 170.52152897417545}}, address: "6801 Wolflin Ave, Amarillo, TX", }; config["www.ptinverness.com"] = { camera: {tilt: 55.82882777803866, heading: 88.43096244638141, position: {x: -85.2382933635541, y: 41.07160775650956, z: 201.8014329522848}}, address: "7051 Pointe Inverness Way, Fort Wayne, IN", }; config["www.liveathuntersrunapts.com"] = { camera: {tilt: 57.62765085939689, heading: 296.6557503202508, position: {x: -85.6478690949055, y: 40.51302680480546, z: 197.3780066613108}}, address: "717 Hunters Run Dr, Marion, IN", }; config["www.lagodelmarapts.com"] = { camera: {tilt: 58.38569637792741, heading: 269.37923656123644, position: {x: -99.4612984005776, y: 27.574142174244276, z: 172.3299632659182}}, address: "7550 Country Club Dr, Laredo, TX", }; config["www.parkmeadowsapts.net"] = { camera: {tilt: 52.399915569393585, heading: 273.823067362798, position: {x: -94.49021291660353, y: 38.97954832916114, z: 268.3906235154718}}, address: "7929 Sycamore Ave, Kansas City, MO", }; config["www.buffalorunwy.com"] = { address: "828 W Buffalo St, Rawlins, WY", }; config["www.villageatconwayapts.com"] = { camera: {tilt: 46.23894334985662, heading: 270.83778743879884, position: {x: -92.43486806652699, y: 35.10636059092957, z: 183.79441775660962}}, address: "867 Fendley Dr, Conway, AR", }; config["www.meadowwalkks.com"] = { camera: {tilt: 38.63794322047842, heading: 272.5185165637553, position: {x: -97.0475905829909, y: 37.09829039693354, z: 302.39430558215827}}, address: "925 W Skyline Rd, Arkansas City, KS", }; config["www.villagesquarejacksonville.com"] = { camera: {tilt: 56.78407419854022, heading: 51.45875756345606, position: {x: -92.10519062899435, y: 34.85112905004345, z: 289.2882294487208}}, address: "950 Military Rd, Jacksonville, AR", }; config["www.ambervalleyestateswy.com"] = { camera: {tilt: 62.05271969844185, heading: 165.6792884379355, position: {x: -106.3897987115455, y: 42.84102157578603, z: 89.4498251536861}}, address: "998 Badger Lane, Mills, WY", }; // config['www.lagodelmarapts.com'] = ; // config['www.turtlelakeapts.com'] = ; // config['www.georgetownparkapartments.com'] = ; // config['www.ambervalleyestateswy.com'] = ; // config['www.liveatcuestas.com'] = ; // config['www.meadowwalkks.com'] = ; // config['www.patriotpointetownhomes.com'] = ; // config['www.bristolaptslawton.com'] = ; // config['www.hickorygroveapts.net'] = ; // config['www.pryorcreekapts.com'] = ; // config['www.deerwoodapts.com'] = ; // config['www.deercrossapartments.com'] = ; // config['www.thepointe-elpaso.com'] = ; // config['www.parkwayvillas.net'] = ; // config['www.arborcreekapartments.net'] = ; // config['www.stonegateamarillo.com'] = ; // config['www.huntingtonpointeapthomes.com'] = ; // config['www.ashbrookeapts.com'] = ; // config['www.springhillaptsmo.com'] = {; // config['www.parkmeadowsapts.net'] = ; // config['www.cottonwoodcreekapts.net'] = ; // config['www.villagesquarehotsprings.com'] = ; // config['www.sturbridgetownhomes.com'] = ; // config['www.villagesquarejacksonville.com'] = ; // config['www.villagesquarecabot.com'] = ; // // MARKER // config['www.villageatconwayapts.com'] = ; // config['www.villagesquaresearcy.com'] = ; // config['www.emberwood-apts.com'] = ; // config['www.maison-bocage.com'] = ; // config['www.ashtonpinesshreveport.com'] = ; // config['www.nantucketharbor.net'] = ; // config['www.bayoakapts.com'] = ; // config['www.pembrookplaceapartments.com'] = ; // config['www.cambridgeapartmenthomesms.com'] = ; // config['www.northwoodplaceapartments.com'] = ; // config['www.cottonwoodapartmenthomes.com'] = ; // config['www.thereserveatlakeside.com'] = ; // config['www.meadowsatgreentree.com'] = ; // config['www.woodbrookapt.com'] = ; // config['www.westbrookkokomo.com'] = ; // config['www.liveathuntersrunapts.com'] = ; // config['www.amberwoodkokomo.com'] = ; // config['www.willowsofcoventry.biz'] = ; // config['www.ptinverness.com'] = ; // config['www.residencesatbelleville.com'] = ; // config['www.fieldcrestapt.com'] = ; // config['www.parkhillatfairlawn.com'] = ; // config['www.forestlakeatoysterpoint.com'] = ; // config['www.woodscapeapt.com'] = ; // config['www.creeksidelandingapts.com'] = ; // config['www.wildwoodapthomes.com'] = ; // config['www.threeoaksapartments.com'] = ; // config['www.markschurchcommons.com'] = ; // config['www.stevenscreekcommons.com'] = ; // config['www.liveatgardenglen.com'] = ; // config['www.pheasantrunaptssidney.com'] = ; // config['www.buffalorunwy.com'] = ; // config['www.fairwayestateswy.com'] = ; // config['www.hudsonplacecondos.com'] = ; // config['www.liveathiddenponds.com'] = ; // config['www.forestridgeapartments.net'] = ; if (config[canonicalUrl]) { return {...baseConfig, ...config[canonicalUrl]}; } return baseConfig; } BeansHaley.prototype.getFloorPlans = function(callback) { var so = this; var canonicalUrl = so.getConfigFromUrl().canonicalUrl; 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://' + canonicalUrl + '/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]; 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 j = 0; j < jo['accommodationFloorPlan'].length; j++) { floorplansData[j].beds = jo['accommodationFloorPlan'][j]['numberOfBedrooms']; floorplansData[j].baths = jo['accommodationFloorPlan'][j]['numberOfFullBathrooms']; } } for (var i = 0; i < floorplansData.length; i++) { 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(); } var y = /.*type="button".*?id="(.*?)".*?applyGAClick.(.*?)." href='(.*?)'.*/.exec(j); if (y) { floorplansData[i].units.push({ unit: y[1], data: y[2], link: y[3] }); } else { 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/haley'); xhr.send(data); } BeansHaley.prototype.render = function(be1, urlFromRequest) { var so = this; if (urlFromRequest && !urlFromRequest.startsWith('www')) { urlFromRequest = ''; } var config = so.getConfigFromUrl(urlFromRequest); var address = config.address; if (beansUrlParameter('getData') === 'true') { so.getFloorPlans(); return; } fetch('https://www.beans.ai/mapswidget/client/haley-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; } } 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); var displayOptions = getDisplayOptions( config, { fillColor: '#DDE3E0', fillOpacity: 0.25, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000' }, // Default color { fillColor: '#CDA192', }, // Selected color { fillColor: '#53666E', strokeColor: '#AC9B45' } // Selectable color ); be1.render( "body-inner-1", "9ea5c008b6a44fb:6237633261346266373030363436343538366439", addressAndUnitWithOptions, { hideNavigateButton: true, hideMyLocationButton: true }, { initialMap: "STREET", inlineClickData: true, hideFloorSelector: true, modernBeansCard: true, modernButtons: true, showCompass: true, showNeighbors: false, showPOIButton: true, showSeparateFacilitiesCard: true, initialTilt: 30, initialZ: 400, initialHeading: 270, initialPosition: { address: address }, ...displayOptions } ); }); }