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 !== '0') ? (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, skipSort) { var addressAndUnitWithOptions; if (unitsArr.length === 0) { unitsArr.push({ unit: '' }); addressAndUnitWithOptions = convertUnitsArr2(config.address, unitsArr, hideMarkers); addressAndUnitWithOptions[0].isPlaceHolder = true; } else { if (!skipSort) { 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.1, }, opacity: 0.5, immersiveType: 'trees', renderer: { type: "unique-value", field: "type", uniqueValueInfos: [ { value: "Apricot", symbol: { type: "point-3d", symbolLayers: [ { type: "object", "height": 6, "anchor": "origin", "resource": { "href": "https://static.arcgis.com/arcgis/styleItems/RealisticTrees/gltf/resource/PrunusArmeniaca.glb" } } ] } }, { value: "Mountain Mahogany", symbol: { type: "point-3d", symbolLayers: [ { type: "object", "height": 2, "anchor": "origin", "resource": { "href": "https://static.arcgis.com/arcgis/styleItems/RealisticTrees/gltf/resource/CercocarpusMontanus.glb" } } ] } }, { value: "Rose", symbol: { type: "point-3d", symbolLayers: [ { type: "object", "height": 2, "anchor": "origin", "resource": { "href": "https://static.arcgis.com/arcgis/styleItems/RealisticTrees/gltf/resource/RosaGrandiflora.glb" } } ] } } ] }, isFeature: true }, { url: "https://gis-server.beans.ai/arcgis/rest/services/Hosted/Immersive_Layers/FeatureServer/1", elevationInfo: { mode: "absolute-height", offset: 0.2, }, renderer: { type: "unique-value", field: "type", uniqueValueInfos: [ { value: "Walkway", symbol: { type: "line-3d", symbolLayers: [ { type: "path", profile: "quad", material: { color: "#fcf5de" }, width: 2, // the width in m height: 0.3, // the height in m profileRotation: "heading" } ] // type: "simple-line", // width: 16, // color: "#aaaaaa" } }, { value: "Road", symbol: { type: "line-3d", symbolLayers: [ { type: "path", profile: "quad", material: { color: "#aaaaaa" }, width: 6, // the width in m height: 0.4, // the height in m profileRotation: "heading" } ] } } ] }, isFeature: true }, { url: "https://gis-server.beans.ai/arcgis/rest/services/Hosted/Immersive_Layers/FeatureServer/2", elevationInfo: { mode: "absolute-height", offset: 0.1, }, renderer: { type: "unique-value", field: "type", uniqueValueInfos: [ { value: "Lawn", symbol: { type: "simple-fill", outline: { width: 0 }, color: "rgba(178, 195, 136, 0.35)" } }, { value: "Concrete", symbol: { type: "simple-fill", outline: { width: 0 }, color: "#CCCCCC" } }, { value: "Mulch", symbol: { type: "simple-fill", outline: { width: 0 }, color: "#DBCEA2" } } ] }, isFeature: true }, { url: "https://gis-server.beans.ai/arcgis/rest/services/Hosted/Immersive_Layers/FeatureServer/2", elevationInfo: { mode: "absolute-height", offset: 0.2, }, 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, filters: config.filters, 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 BeansAtlantic = function() { }; BeansAtlantic.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.mayfairreserve.com"] = { camera: {tilt: 56.918113640610684, heading: 270.4156697633532, position: {x: -88.04802627795945, y: 43.05876738257342, z: 132.68172234203666}}, address: "11011 W North Ave, Milwaukee, WI", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#356B63', }, selectedUnitShape: { fillColor: '#4c4c4d', strokeColor: '#356B63', }, selectableUnitShape: { fillColor: '#7f948e', strokeColor: '#356B63', }, prettyLayer: 'https://gis.beans.ai/arcgis/sharing/rest/content/items/041770491a2e42389f54c3962a0e795f/resources/styles/root.json?f=pjson', rentcafeLink: 'https://mayfairreserve.securecafe.com/onlineleasing/mayfair-reserve-0/oleapplication.aspx?stepname=RentalOptions&myOlePropertyId=550249&PropLeadSource_550249=portal', poiShape: { fillOpacity: 1.0, colorCodes: [ { value: 2, color: "rgba(210, 155, 66, 1.0)" }, // GYM, PETWASH, CYCLESTORAGE { value: 3, color: "rgba(96, 164, 170, 0.4)" }, { value: 4, color: "rgba(195, 168, 207, 0.4)" }, { value: 5, color: "rgba(165, 222, 122, 1.0)" }, // SPORTS FIELDS { value: 6, color: "rgba(152, 227, 223, 1.0)" }, { value: 7, color: "rgba(238, 112, 71, 0.4)" }, { value: 8, color: "rgba(227, 223, 152, 1.0)" }, // AMENITY, GAME, LOUNGE { value: 9, color: "rgba(0, 124, 207, 0.1)" }, // GARAGE { value: 10, color: "rgba(200, 16, 46, 0.4)" }, { value: 11, color: "rgba(236, 112, 188, 0.4)" }, { value: 12, color: "rgba(206, 165, 6, 1.0)" }, { value: 13, color: "rgba(144, 87, 157, 1.0)" }, { value: 14, color: "rgba(61, 180, 245, 1.0)" }, ] }, }; config["www.stjohnslanding.com"] = { camera: {tilt: 56.59473177316998, heading: 321.85981357557773, position: {x: -81.6902952693808, y: 30.005420074998035, z: 458.94820559956133}}, address: "1408 N Orange Ave, Green Cove Springs, FL", selectedUnitShape: { fillColor: '#212529', }, selectableUnitShape: { fillColor: '#1376a3', }, locationUrl: 'g5-cl-1lsplr2cdi-atlantic-residential-green-cove-springs-fl', poiShape: { fillOpacity: 1.0 }, unitShapeConfig: (addressAndUnitWithOptionsObj) => { if (addressAndUnitWithOptionsObj.options && addressAndUnitWithOptionsObj.options.onClickData && addressAndUnitWithOptionsObj.options.onClickData.floorplan && addressAndUnitWithOptionsObj.options.onClickData.floorplan.indexOf('Townhouse') !== -1) { return { fillColor: '#123949', fillOpacity: 1.0, strokeWeight: 1.0, strokeOpacity: 1.0, strokeColor: '#ffffff' }; } return null; }, }; config["www.loriaansley.com"] = { camera: {tilt: 67.2057197941128, heading: 15.958990670001608, position: {x: -84.38729305867012, y: 33.7919905011912, z: 129.8844938809052}}, address: "1441 Peachtree NE St, Atlanta, GA", unitShape: { fillColor: '#DDE3E0', fillOpacity: 0.15, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000' }, selectedUnitShape: { fillColor: '#CDA192', }, selectableUnitShape: { fillColor: '#53666E', strokeColor: '#AC9B45', }, mobileCamera: {tilt: 67.20571979413803, heading: 15.958833482940852, position: {x: -84.3875756775082, y: 33.79212163436891, z: 129.8844938809052}}, showImmersive: true, showImmersiveLight: true, showImmersiveOnLoad: true, prettyLayer: 'https://beans.maps.arcgis.com/sharing/rest/content/items/6465974adfdb437c8423881400b8517d/resources/styles/root.json?f=pjson', rentcafeLink: 'https://loriaansley.securecafe.com/onlineleasing/loria-ansley/oleapplication.aspx?stepname=RentalOptions&myOlePropertyId=1771191&PropLeadSource_1771191=portal', immersiveConfig: [ ...commonImmersives, { url: "https://tiles.arcgis.com/tiles/ob6JNU9Q3wDJysjr/arcgis/rest/services/1441_fp1/SceneServer", opacity: 0.15, elevationInfo: { mode: "absolute-height", offset: 0.5, } }, { url: "https://tiles.arcgis.com/tiles/ob6JNU9Q3wDJysjr/arcgis/rest/services/1441_Units_1/SceneServer", elevationInfo: { mode: "absolute-height", offset: 0.5, }, immersiveType: 'units' } ], poiShape: { colorCodes: [ { value: 2, color: "rgba(205, 162, 145, 1.0)" }, { value: 3, color: "rgba(205, 162, 145, 1.0)" }, { value: 4, color: "rgba(205, 162, 145, 1.0)" }, { value: 5, color: "rgba(165, 222, 122, 1.0)" }, { value: 6, color: "rgba(152, 227, 223, 1.0)" }, { value: 7, color: "rgba(205, 162, 145, 1.0)" }, { value: 8, color: "rgba(205, 162, 145, 1.0)" }, { value: 9, color: "rgba(205, 162, 145, 1.0)" }, { value: 10, color: "rgba(205, 162, 145, 1.0)" }, { value: 11, color: "rgba(205, 162, 145, 1.0)" }, { value: 12, color: "rgba(205, 162, 145, 1.0)" }, { value: 13, color: "rgba(205, 162, 145, 1.0)" }, { value: 14, color: "rgba(205, 162, 145, 1.0)" }, ] }, backgroundImage: { src: '/mapswidget/prettymaps/1441peachtree.png', width: '3056px', height: '3436px', position: { lat: 33.7949731, lng: -84.3858072, lat2: 33.7932005, lng2: -84.3877512, } }, numbersConfig: { convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } return a; } }, unitsToExclude: [], initialPosition: { lat: 33.7939268, lng: -84.3869842, mobile: { lat: 27.92390960761993, lng: -84.3869842, } }, 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+'} ] }, bath: { name: 'Bathrooms', values: [ {type: 'all', name: 'Any'}, {type: 'min', value1: '1', name: '1BA+'}, {type: 'min', value1: '2', name: '2BA+'}, {type: 'min', value1: '3', name: '3BA+'} ] }, 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: 'range', value1: '1000', value2: '1500', name: '1000-1500'}, {type: 'min', value1: '1500', name: '1500+'} ] } }, }; config["www.indigowpb.com"] = { camera: {tilt: 48.39908208062107, heading: 24.557841729019156, position: {x: -80.07510122232512, y: 26.69298590953101, z: 186.68731984123588}}, address: "1500 Centrepark Blvd, West Palm Beach, FL", rentcafeLink: 'https://indigowpb.securecafe.com/onlineleasing/indigo-west-palm-beach/oleapplication.aspx?stepname=RentalOptions&myOlePropertyId=1220620&PropLeadSource_1220620=portal', poiShape: { fillOpacity: 1.0 }, }; config["www.flatsatwestshore.com"] = { address: "1500 Westshore Dr, Cumming, GA", }; config["www.rowemke.com"] = { camera: {tilt: 58.48493826171419, heading: 349.08013441252814, position: {x: -87.9011364423647, y: 43.05358203249509, z: 130.47351641580462}}, address: "1845 N Water St, Milwaukee, WI", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#356B63', }, selectedUnitShape: { fillColor: '#4c4c4d', strokeColor: '#356B63', }, selectableUnitShape: { fillColor: '#7f948e', strokeColor: '#356B63', }, prettyLayer: 'https://gis.beans.ai/arcgis/sharing/rest/content/items/041770491a2e42389f54c3962a0e795f/resources/styles/root.json?f=pjson', rentcafeLink: 'https://mayfairreserve.securecafe.com/onlineleasing/mayfair-reserve-0/oleapplication.aspx?stepname=RentalOptions&myOlePropertyId=550249&PropLeadSource_550249=portal', poiShape: { fillOpacity: 1.0, colorCodes: [ { value: 2, color: "rgba(210, 155, 66, 1.0)" }, // GYM, PETWASH, CYCLESTORAGE { value: 3, color: "rgba(96, 164, 170, 0.4)" }, { value: 4, color: "rgba(195, 168, 207, 0.4)" }, { value: 5, color: "rgba(165, 222, 122, 1.0)" }, // SPORTS FIELDS { value: 6, color: "rgba(152, 227, 223, 1.0)" }, { value: 7, color: "rgba(238, 112, 71, 0.4)" }, { value: 8, color: "rgba(227, 223, 152, 1.0)" }, // AMENITY, GAME, LOUNGE { value: 9, color: "rgba(0, 124, 207, 0.1)" }, // GARAGE { value: 10, color: "rgba(200, 16, 46, 0.4)" }, { value: 11, color: "rgba(236, 112, 188, 0.4)" }, { value: 12, color: "rgba(206, 165, 6, 1.0)" }, { value: 13, color: "rgba(144, 87, 157, 1.0)" }, { value: 14, color: "rgba(61, 180, 245, 1.0)" }, ] }, }; config["www.lumenchamblee.com"] = { camera: {tilt: 46.49187795859919, heading: 351.73665659564506, position: {x: -84.30149707226954, y: 33.89115652957408, z: 224.41695711482316}}, address: "2175 American Dr, Chamblee, GA", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.5, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#A6671D', }, selectableUnitShape: { fillColor: '#24453E', }, locationUrl: 'g5-cl-1nfx2llniq-atlantic-residential-atlantic-realty-partners-chamblee-ga', poiShape: { fillOpacity: 1.0 }, }; config["www.revelballpark.com"] = { camera: {tilt: 44.123461027058674, heading: 210.9489067858534, position: {x: -84.468873466206, y: 33.89569209560381, z: 235.12847942113876}}, address: "2855 Crescent Pkwy, Atlanta, GA", unitShape: { fillColor: '#D0CABD', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#223645', }, selectableUnitShape: { fillColor: '#C3B22E', }, locationUrl: 'g5-cl-1lspmvse5q-atlantic-residential-atlanta-ga', poiShape: { fillOpacity: 1.0 }, }; config["www.reserveballpark.com"] = { camera: {tilt: 36.49718696634273, heading: 5.420756606242943, position: {x: -84.46895787742838, y: 33.892128361449174, z: 339.79831133503467}}, address: "2875 Crescent Pkwy, Atlanta, GA", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.5, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#0a303e', }, selectableUnitShape: { fillColor: '#DE3517', strokeColor: '#AC9B45', }, locationUrl: 'g5-cl-1lspmsknho-atlantic-residential-atlanta-ga', poiShape: { fillOpacity: 1.0 }, }; config["www.lumenbriarcliff.com"] = { camera: {tilt: 59.823468330629794, heading: 39.85925786716388, position: {x: -84.31461334246497, y: 33.83668821866528, z: 137.31736273039132}}, address: "3070 Briarcliff NE Rd, Atlanta, GA", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.5, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#2B302E', }, selectableUnitShape: { fillColor: '#9daa9a', strokeColor: '#AC9B45', }, locationUrl: 'g5-cl-1ndz2odlsm-atlantic-residential-atlanta-ga', poiShape: { fillOpacity: 1.0 }, }; config["www.thanksgivingpark.com"] = { camera: {tilt: 66.95108915051031, heading: 344.6524223238847, position: {x: -111.89341601801671, y: 40.42806888780203, z: 88.48551955167204}}, address: "3400 Ashton Blvd, Lehi, UT", unitShape: { fillColor: '#FFFFFF', fillOpacity: 0.35, strokeWeight: 0.5, strokeOpacity: 0.5, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#A6671D', }, selectableUnitShape: { fillColor: '#24453E', }, showImmersive: true, showImmersiveLight: true, showImmersiveOnLoad: true, prettyLayer: 'https://beans.maps.arcgis.com/sharing/rest/content/items/6465974adfdb437c8423881400b8517d/resources/styles/root.json?f=pjson', rentcafeLink: 'https://loriaansley.securecafe.com/onlineleasing/loria-ansley/oleapplication.aspx?stepname=RentalOptions&myOlePropertyId=1771191&PropLeadSource_1771191=portal', immersiveConfig: [ ...commonImmersives, { url: "https://tiles.arcgis.com/tiles/ob6JNU9Q3wDJysjr/arcgis/rest/services/3400_Ashton_Blvd_Lehi_UT_units/SceneServer", elevationInfo: { mode: "absolute-height", offset: 0.5, }, immersiveType: 'units' } ], poiShape: { colorCodes: [ { value: 2, color: "rgba(205, 162, 145, 1.0)" }, { value: 3, color: "rgba(205, 162, 145, 1.0)" }, { value: 4, color: "rgba(205, 162, 145, 1.0)" }, { value: 5, color: "rgba(165, 222, 122, 1.0)" }, { value: 6, color: "rgba(152, 227, 223, 1.0)" }, { value: 7, color: "rgba(205, 162, 145, 1.0)" }, { value: 8, color: "rgba(205, 162, 145, 1.0)" }, { value: 9, color: "rgba(205, 162, 145, 1.0)" }, { value: 10, color: "rgba(205, 162, 145, 1.0)" }, { value: 11, color: "rgba(205, 162, 145, 1.0)" }, { value: 12, color: "rgba(205, 162, 145, 1.0)" }, { value: 13, color: "rgba(205, 162, 145, 1.0)" }, { value: 14, color: "rgba(205, 162, 145, 1.0)" }, ] }, numbersConfig: { size: 75, convert: (a) => { if (!a) { return a; } if (a.indexOf('-') !== -1) { a = a.substring(a.indexOf('-') + 1); } return a; } }, unitsToExclude: [], initialPosition: { lat: 33.7939268, lng: -84.3869842, mobile: { lat: 27.92390960761993, lng: -84.3869842, } } }; config["www.luccafoxvalley.com"] = { camera: {tilt: 50.55016508235591, heading: 355.30930218752565, position: {x: -88.2116762919486, y: 41.75832423874858, z: 219.95342853106558}}, address: "3955 Fox Valley Center Dr, Aurora, IL", selectedUnitShape: { fillColor: '#F27D4D', strokeColor: '#356B63', }, selectableUnitShape: { fillColor: '#2a5b6c', strokeColor: '#356B63', }, prettyLayer: 'https://gis.beans.ai/arcgis/sharing/rest/content/items/041770491a2e42389f54c3962a0e795f/resources/styles/root.json?f=pjson', rentcafeLink: 'https://luccafoxvalley.securecafe.com/onlineleasing/lucca-fox-valley/oleapplication.aspx?stepname=RentalOptions&myOlePropertyId=1814868&PropLeadSource_1814868=portal', poiShape: { fillOpacity: 1.0, colorCodes: [ { value: 2, color: "rgba(251, 216, 114, 1.0)" }, // GYM, PETWASH, CYCLESTORAGE { value: 3, color: "rgba(251, 216, 114, 1.0)" }, { value: 4, color: "rgba(251, 216, 114, 1.0)" }, { value: 5, color: "rgba(251, 216, 114, 1.0)" }, // SPORTS FIELDS { value: 6, color: "rgba(152, 227, 223, 1.0)" }, { value: 7, color: "rgba(251, 216, 114, 1.0)" }, { value: 8, color: "rgba(251, 216, 114, 1.0)" }, // AMENITY, GAME, LOUNGE { value: 9, color: "rgba(251, 216, 114, 1.0)" }, // GARAGE { value: 10, color: "rgba(251, 216, 114, 1.0)" }, { value: 11, color: "rgba(251, 216, 114, 1.0)" }, { value: 12, color: "rgba(251, 216, 114, 1.0)" }, { value: 13, color: "rgba(251, 216, 114, 1.0)" }, { value: 14, color: "rgba(251, 216, 114, 1.0)" }, ] }, unitShapeConfig: (addressAndUnitWithOptionsObj) => { if (addressAndUnitWithOptionsObj.options && addressAndUnitWithOptionsObj.options.onClickData) { var bed = addressAndUnitWithOptionsObj.options.onClickData.bed ? addressAndUnitWithOptionsObj.options.onClickData.bed : 0; if (bed === 0 || bed === '0') { return { fillColor: '#2a5b6c', fillOpacity: 1.0, strokeWeight: 1.0, strokeOpacity: 1.0, strokeColor: '#ffffff' }; } else if (bed === 1 || bed === '1') { return { fillColor: '#00263e', fillOpacity: 1.0, strokeWeight: 1.0, strokeOpacity: 1.0, strokeColor: '#ffffff' }; } else if (bed === 2 || bed === '2') { return { fillColor: '#aca39a', fillOpacity: 1.0, strokeWeight: 1.0, strokeOpacity: 1.0, strokeColor: '#ffffff' }; } } return null; }, }; config["www.evertonflats.com"] = { camera: {tilt: 59.56935601229724, heading: 62.8234575441237, position: {x: -88.20724862383075, y: 41.81423363329417, z: 228.56187619641423}}, address: "3S635 Everton Dr, Warrenville, IL", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.5, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#A16B38', }, selectableUnitShape: { fillColor: '#CEA276', strokeColor: '#AC9B45', }, locationUrl: 'g5-cl-1lspmqhmve-atlantic-residential-warrenville-il', poiShape: { fillOpacity: 1.0 }, }; config["www.brookfieldreserveapts.com"] = { camera: {tilt: 57.09215309116136, heading: 125.27451481367018, position: {x: -88.08530843501639, y: 43.036104371426475, z: 135.40762175247073}}, address: "405 Bishops Way, Brookfield, WI", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.5, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#7f392c', }, selectableUnitShape: { fillColor: '#535659', strokeColor: '#AC9B45', }, locationUrl: 'g5-cl-1lspltv2x4-atlantic-residential-brookfield-wi', poiShape: { fillOpacity: 1.0 }, }; config["www.lumendoraville.com"] = { camera: {tilt: 46.824016393574325, heading: 26.581594291026068, position: {x: -84.28232789024561, y: 33.91791631571872, z: 248.81965160369873}}, address: "4256 Tilly Mill Rd, Atlanta, GA", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.5, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#646662', }, selectableUnitShape: { fillColor: '#AC9B45', strokeColor: '#AC9B45', }, locationUrl: 'g5-cl-1mgfd18hgz-atlantic-residential-atlanta-ga', poiShape: { fillOpacity: 1.0 }, }; config["www.lumenfoxvalley.com"] = { camera: {tilt: 60.806042111589235, heading: 328.6901376194994, position: {x: -88.20627366168112, y: 41.755062221851325, z: 213.70459317136556}}, address: "4450 Fox Valley Center Dr, Aurora, IL", unitShape: { fillColor: '#D8D7D4', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#356B63', }, selectedUnitShape: { fillColor: '#F27D4D', strokeColor: '#356B63', }, selectableUnitShape: { fillColor: '#8ACFC5', strokeColor: '#356B63', }, prettyLayer: 'https://gis.beans.ai/arcgis/sharing/rest/content/items/041770491a2e42389f54c3962a0e795f/resources/styles/root.json?f=pjson', rentcafeLink: 'https://lumenfoxvalley.securecafe.com/onlineleasing/lumen-fox-valley/oleapplication.aspx?stepname=RentalOptions&myOlePropertyId=1569511&PropLeadSource_1569511=portal', poiShape: { fillOpacity: 1.0, colorCodes: [ { value: 2, color: "rgba(210, 155, 66, 1.0)" }, // GYM, PETWASH, CYCLESTORAGE { value: 3, color: "rgba(96, 164, 170, 0.4)" }, { value: 4, color: "rgba(195, 168, 207, 0.4)" }, { value: 5, color: "rgba(165, 222, 122, 1.0)" }, // SPORTS FIELDS { value: 6, color: "rgba(152, 227, 223, 1.0)" }, { value: 7, color: "rgba(238, 112, 71, 0.4)" }, { value: 8, color: "rgba(227, 223, 152, 1.0)" }, // AMENITY, GAME, LOUNGE { value: 9, color: "rgba(0, 124, 207, 0.1)" }, // GARAGE { value: 10, color: "rgba(200, 16, 46, 0.4)" }, { value: 11, color: "rgba(236, 112, 188, 0.4)" }, { value: 12, color: "rgba(206, 165, 6, 1.0)" }, { value: 13, color: "rgba(144, 87, 157, 1.0)" }, { value: 14, color: "rgba(61, 180, 245, 1.0)" }, ] }, }; config["www.reserveatwauwatosa.com"] = { camera: {tilt: 52.832234496516584, heading: 336.65294730599163, position: {x: -87.98745279391963, y: 43.042437279474846, z: 224.35755000635982}}, address: "6100 W State St, Wauwatosa, WI", unitShape: { fillColor: '#D0CABD', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#025682', }, selectableUnitShape: { fillColor: '#b1c107', }, locationUrl: 'g5-cl-1lspoiuldb-atlantic-residential-milwaukee-wi', poiShape: { fillOpacity: 1.0 }, }; config["www.sciochicago.com"] = { camera: {tilt: 49.629288663005084, heading: 64.79001893320178, position: {x: -87.6686208499424, y: 41.869429827562946, z: 242.32843304984272}}, address: "901 S Ashland Ave, Chicago, IL", unitShape: { fillColor: '#a9cbc1', fillOpacity: 0.2, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000', }, selectedUnitShape: { fillColor: '#1d262a', }, selectableUnitShape: { fillColor: '#f15a2b', }, locationUrl: 'g5-cl-1lspjnkkv8-atlantic-residential-chicago-il', poiShape: { fillOpacity: 1.0 }, }; if (config[canonicalUrl]) { return {...baseConfig, ...config[canonicalUrl]}; } return baseConfig; } BeansAtlantic.prototype.checkAndGetData = function(addressFromRequest) { var so = this; if (beansUrlParameter('getData') === 'true' || window.location.hash === '#/getData') { } } BeansAtlantic.prototype.render = function(be1, urlFromRequest, renderType) { var so = this; var config = so.getConfigFromUrl(urlFromRequest); var address = config.address; var renderFn = function(config, unitsArr) { var addressAndUnitWithOptions = convertUnitsArr(config, unitsArr, true); var displayOptions = getDisplayOptions( config, { fillColor: '#EAD6C3', fillOpacity: 0.5, strokeWeight: 0.5, strokeOpacity: 0.2, strokeColor: '#000000' }, // Default color { fillColor: '#CDA349', }, // Selected color { fillColor: '#3F1F08', } // Selectable color ); if (!renderType || renderType.toLowerCase() === '3d') { be1.render( "body-inner-1", "8ae1deef5ff14e8:6365333662366565333139343432376138633830", 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, showImmersiveBalloons: config.showImmersiveBalloons, 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", "8ae1deef5ff14e8:6365333662366565333139343432376138633830", 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 } ); } }; if (config.locationUrl) { var json = { "operationName": "ApartmentComplex", "variables": { "locationUrn": config.locationUrl, "moveInDate": "", "unitsLimit": 9 }, "query": "query ApartmentComplex($floorplanId: Int, $beds: [Int!], $baths: [Float!], $sqft: Int, $startRate: Int, $endRate: Int, $floorplanGroupId: [Int!], $amenities: [Int!], $locationUrn: String!, $moveInDate: String!, $unitsLimit: Int, $dateFlexibility: Int) {\n apartmentComplex(locationUrn: $locationUrn) {\n id\n showUnits\n showNumberOfAvailableUnits\n showLeaseTerms\n showBestValue\n floorplanGroupDescription\n pricingDisclaimer\n hasAllowableMoveInDays\n hasApartmentSpecials\n hasFloorplanSpecials\n singularUnitLabel\n firstAvailableMoveInDate\n lastAvailableMoveInDate\n availabilityInDays\n brochurePdfLabel\n virtualTourLabel\n floorplans(id: $floorplanId, beds: $beds, baths: $baths, sqft: $sqft, startRate: $startRate, endRate: $endRate, floorplanGroupId: $floorplanGroupId, amenities: $amenities, moveInDate: $moveInDate, dateFlexibility: $dateFlexibility) {\n id\n altId\n externalIds\n name\n totalAvailableUnits\n unitsAvailableByFilters(moveInDate: $moveInDate, dateFlexibility: $dateFlexibility, amenities: $amenities, minPrice: $startRate, maxPrice: $endRate, limit: $unitsLimit)\n allowableMoveInDays\n beds\n baths\n sqft\n sqftDisplay\n rateDisplay\n startingRate\n endingRate\n imageUrl\n imageUrls\n locationCode\n virtualImageUrl\n depositDisplay\n floorplanGroupIds\n brochurePdf\n hasSpecials\n floorplanSpecials {\n id\n name\n __typename\n }\n floorplanAmenities {\n id\n name\n __typename\n }\n floorplanCta {\n name\n url\n actionType\n redirectUrl\n redirectUrlActionType\n ownerType\n vendorKey\n redirectVendorKey\n isExternal\n __typename\n }\n __typename\n }\n floorplanFilters {\n beds\n baths\n sqftMax\n sqftMin\n lastAvailableDate\n floorplanGroups {\n id\n description\n __typename\n }\n amenities {\n id\n name\n __typename\n }\n __typename\n }\n __typename\n }\n}\n" }; 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://www.beans.ai/mapswidget/client/graphql.php?property_id=' + config.canonicalUrl + '&location=' + config.locationUrl + '&force=' + (beansUrlParameter('force') ? beansUrlParameter('force') : '')); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify(json)); xhr.onreadystatechange = function() { if (xhr.readyState !== DONE || xhr.status !== OK) { return; } var json; if (xhr.responseText) { json = JSON.parse(xhr.responseText); } else { json = {}; } if (json.data && json.data.apartmentComplex && json.data.apartmentComplex.floorplans) { var floorplans = []; for (var i = 0; i < json.data.apartmentComplex.floorplans.length; i++) { floorplans.push(json.data.apartmentComplex.floorplans[i]); } var unitsArr = []; var proms = []; for (var i = 0; i < floorplans.length; i++) { var floorplan = floorplans[i]; proms.push(new Promise(function (resolve, reject) { var jsonI = { "operationName": "Units", "variables": { "locationUrn": config.locationUrl, "floorplanId": floorplan.id, "moveInDate": "", "limit": 9 }, "query": "query Units($floorplanId: Int!, $limit: Int, $moveInDate: String, $locationUrn: String, $altId: String, $amenities: [Int!], $id: Int, $dateFlexibility: Int, $minPrice: Float, $maxPrice: Float) {\n units(floorplanId: $floorplanId, limit: $limit, moveInDate: $moveInDate, locationUrn: $locationUrn, altId: $altId, amenities: $amenities, id: $id, dateFlexibility: $dateFlexibility, minPrice: $minPrice, maxPrice: $maxPrice) {\n id\n externalId\n parentExternalId\n name\n displayName\n building\n sqftDisplay\n availabilityDate\n specials {\n id\n name\n term\n amount\n __typename\n }\n lastAvailableMoveInDate\n prices {\n id\n priceType\n formattedPrice\n value\n __typename\n }\n amenities {\n id\n name\n __typename\n }\n callToActions {\n name\n url\n actionType\n redirectUrl\n redirectUrlActionType\n ownerType\n vendorKey\n redirectVendorKey\n isExternal\n __typename\n }\n __typename\n }\n}\n" } var xhrI = new XMLHttpRequest(); xhrI.open('GET', 'https://www.beans.ai/mapswidget/client/graphqlfp.php?property_id=' + config.canonicalUrl + '&location=' + config.locationUrl + '&floorplan_id=' + floorplan.id + '&force=' + (beansUrlParameter('force') ? beansUrlParameter('force') : '')); // xhrI.open('POST', 'https://inventory.g5marketingcloud.com/graphql'); xhrI.setRequestHeader('Content-Type', 'application/json'); xhrI.send(JSON.stringify(jsonI)); xhrI.onreadystatechange = function(floorplan) { return function() { if (xhrI.readyState !== DONE || xhrI.status !== OK) { return; } var jsonI; if (xhrI.responseText) { jsonI = JSON.parse(xhrI.responseText); } else { jsonI = {}; } if (jsonI.data && jsonI.data.units) { for (var i = 0; i < jsonI.data.units.length; i++) { var unitObj = jsonI.data.units[i]; var lnk = unitObj.callToActions && unitObj.callToActions.length ? unitObj.callToActions[0].url : ''; lnk = lnk.replace('{widget.moveInDate.YYYY-MM-DD}', unitObj.availabilityDate ? unitObj.availabilityDate : ''); unitsArr.push({ unit: unitObj.name, bed: floorplan.beds, bath: floorplan.baths, floorplan: floorplan.name, sqft: unitObj.sqftDisplay ? Number(unitObj.sqftDisplay.replace(/[^0-9\.]/, '')) : floorplan.sqft, rent: unitObj.prices && unitObj.prices.length ? unitObj.prices[0].value : 0, availability: unitObj.availabilityDate ? unitObj.availabilityDate : '', link: lnk, floorplanImg: floorplan.imageUrl }); } } resolve(); // floorplans.splice(0, 1); // recurse(floorplans, unitsArr, callback); }; }(floorplan); })); } Promise.all(proms).then((values) => { renderFn(config, unitsArr); }); } else { renderFn(config, []); } }; } else { fetch('https://www.beans.ai/mapswidget/client/atlantic-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++) { if (!x[j].units || x[j].units.length === 0) { continue; } for (var k = 0; k < x[j].units.length; k++) { var av = x[j].units[k].available; if (av.indexOf('/') !== -1) { var m = String(av.split('/')[0]).padStart(2, '0'); var d = String(av.split('/')[1]).padStart(2, '0'); var y = av.split('/')[2]; av = y + '-' + m + '-' + d; } var unit = x[j].units[k]['unit']; var beds = x[j].beds ? x[j].beds : 0; var baths = x[j].baths ? x[j].baths : 0; var sqft = x[j].units[k]['area']; var rent = x[j].units[k]['rent']; var floorplan = x[j].name; var floorplanImg = x[j].img ? x[j].img : ''; var avail = av; var link = config.rentcafeLink + '&FloorPlanID=' + x[j].id + '&UnitID=' + x[j].units[k].id + '&MoveInDate=' + x[j].units[k].available; unitsArr.push({ unit: unit, bed: beds, bath: baths, sqft: sqft, rent: rent, floorplan: floorplan, link: link, floorplanImg: floorplanImg, availability: avail}); } } } } renderFn(config, unitsArr); }); } }