Sector

All Sectors

Arts & Leisure

Featured Projects

Commercial

Education

Healthcare

Residential

Transport

Bespoke Solutions

Product Category

All Product Categories

Curtain Wall

Sliding Solutions

Doors

Windows

Unitised Curtain Wall

Louvre Systems

Passive House

Framing

Fire Resistant

' + projects[i].location + '' + '' + 'View Project'; var gps = { lat: projects[i].lat, lng: projects[i].long } const marker = new google.maps.Marker({ position: gps, map: map, info: content, icon: { path: google.maps.SymbolPath.CIRCLE, scale: 8, fillColor: '#e23828', fillOpacity: 0.75, strokeWeight: 0 }, }); markers.push(marker); bounds.extend(marker.getPosition()); google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(this.info); infoWindow.open(map, this); }); } map.fitBounds(bounds, 50); } function clearMarkers() { for (var i = 0; i < markers.length; i++) { markers[i].setMap(null); } markers = []; } function updateDropdown(dropdown, value) { $(".filter-dropdown-inner").hide(); $('.filter-dropdown').removeClass('dropdown-active'); $(".filter-dropdown").children("img").css("transform", "rotate(0deg)"); $('.' + dropdown).text(value); } function changeFilter(label, value) { filterObject[label] = value; updateFilters(); } function removeMapFilter(label) { delete filterObject[label]; if (label == 'productCategoryIDs') { $('.java-product-dropdown').hide(); $('.java-product-titles').text('Select Product'); delete filterObject['productIDs']; } updateFilters(); } function updateFilters() { var allProjects = mapObject.projects.slice(); var filteredProjects = mapObject.projects.slice(); for (var key in filterObject) { for (let i = 0; i < allProjects.length; i++) { if (allProjects[i][key].includes(filterObject[key]) == false) { for (let j = 0; j < filteredProjects.length; j++) { if (filteredProjects[j].name == allProjects[i].name) { filteredProjects.splice(j, 1); } } } } } clearMarkers(); console.log(filteredProjects); if (filteredProjects.length > 0) { $('.java-map-warning').hide(); addMarkers(filteredProjects); } else { $('.java-map-warning').show(); $('.java-map-warning').text('No Projects match these filters'); addMarkers(mapObject.projects); } } function selectedProductCategory(catID) { $('.java-product-dropdown').hide(); $('.java-product-dropdown').each(function(index) { if (catID == $(this).data('catid')) { $(this).show(); } }); $('.java-product-titles').text('Select Product'); delete filterObject['productIDs']; updateFilters(); } window.initMap = initMap;