{"version":3,"sources":["_animations.js","_banner.js","_loadMore.js","_map.js","_mobNav.js","_sliders.js","_video.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"wossp_gbl.js","sourcesContent":["$(function(){\r\n\r\n if('IntersectionObserver' in window && $('.remove2animate').length){\r\n\r\n var animatedElements = document.querySelectorAll('.remove2animate');\r\n\r\n var animationObserver = new IntersectionObserver(function(animatedElements){\r\n \r\n for(var i = 0; i < animatedElements.length; i++){\r\n var scope = $(animatedElements[i].target);\r\n \r\n if(animatedElements[i]['isIntersecting'] === true){ //when element comes into viewport\r\n\r\n //bump in sections\r\n if(scope.hasClass('remove2animate')){\r\n scope.removeClass('remove2animate');\r\n }\r\n\r\n if(scope.hasClass('locationStats')){\r\n $('.counter').each(function() {\r\n var $this = $(this),\r\n countTo = $this.attr('data-count');\r\n countTo = countTo.split(',').join('').split('+').join('');\r\n \r\n $({countNum: $this.text()}).animate({\r\n countNum: countTo\r\n },\r\n {\r\n duration: 2000,\r\n easing:'linear',\r\n step: function() {\r\n $this.text(Math.floor(this.countNum));\r\n },\r\n complete: function() {\r\n $this.text($this.attr('data-count'));\r\n }\r\n });\r\n });\r\n }\r\n \r\n //once element is in view, we don't have to observe it anymore\r\n animationObserver.unobserve(animatedElements[i].target);\r\n }\r\n }\r\n\r\n }, {threshold:0.1}); //show element when 10% of it's height enters viewport\r\n\r\n //init observer on all animatable elements\r\n for(var i = 0; i < animatedElements.length; i++){\r\n animationObserver.observe(animatedElements[i]);\r\n }\r\n\r\n //check if the first animatable section is above the fold. if it is - animate it straight away without the requirement of scrolling\r\n //The 200 value is the transformed offset applied by .remove2animate\r\n //This isn't required within the IE fallback as this will only ever run on tablet/mobile\r\n if(($('section.remove2animate').first().offset().top - 149) < $(window).height()){\r\n $('section.remove2animate').first().removeClass('remove2animate');\r\n }\r\n\r\n }else{ //if intersectionObserver is not supported in browser, use scroll method for checking when elements come into view\r\n\r\n $('body').scroll(function(){\r\n \r\n var windowBottom = $('body').scrollTop() + $(window).height(),\r\n animateScrollPoint = $(window).height()*0.15;\r\n \r\n $('.remove2animate').each(function(){\r\n \r\n if($(this).offset().top + animateScrollPoint < windowBottom){\r\n \r\n //bump in sections\r\n if($(this).hasClass('remove2animate')){\r\n $(this).removeClass('remove2animate');\r\n }\r\n\r\n if($(this).hasClass('locationStats')){\r\n $('.counter').each(function() {\r\n var $this = $(this),\r\n countTo = $this.attr('data-count');\r\n countTo = countTo.split(',').join('').split('+').join('');\r\n \r\n $({countNum: $this.text()}).animate({\r\n countNum: countTo\r\n },\r\n {\r\n duration: 2000,\r\n easing:'linear',\r\n step: function() {\r\n $this.text(Math.floor(this.countNum));\r\n },\r\n complete: function() {\r\n $this.text($this.attr('data-count'));\r\n }\r\n });\r\n });\r\n }\r\n }\r\n \r\n });\r\n \r\n //if scroll gets to page bottom, force remove2animate on all remaining elements that still have class.\r\n //This is required when there is very short content meaning the animateScrollPoint cannot be reached to trigger animation\r\n if(windowBottom == $(document).height()){\r\n $('.remove2animate').removeClass('remove2animate');\r\n }\r\n \r\n }).scroll();\r\n }\r\n \r\n});","$(function(){\r\n $('section.hero-banner .down').click(function(){\r\n $('html,body').animate({\r\n scrollTop : $('section.hero-banner').offset().top + $('section.hero-banner').height()\r\n }, 1000);\r\n\r\n //fallback for arrow working in Edge browser. This may not be required when Edge starts using Chromium\r\n if(window.navigator.userAgent.indexOf(\"Edge\") > -1){\r\n window.location.hash = 'intro';\r\n window.location.hash = '';\r\n }\r\n });\r\n});","$(function () {\r\n\r\n\tif($('section.caseStudies ul.studies li').length > 3){\r\n\t\t$('#load-more').show();\r\n\t}else{\r\n\t\t$('#load-more').hide();\r\n }\r\n \r\n //Show first 6 blocks on page load\r\n $('section.caseStudies ul.studies li').slice(0, 6).show();\r\n\r\n $('#load-more').on('click', function (e) {\r\n e.preventDefault();\r\n $('section.caseStudies ul.studies li:hidden').slice(0, 3).slideDown();\r\n if ($('section.caseStudies ul.studies li:hidden').length == 0) {\r\n $('#load-more').fadeOut('slow');\r\n }\r\n });\r\n});","//As initMap is a callback on an async/defer script tag. This will be called after the elements on the page have been loaded. Therefore no requirement for a document.ready check\r\nvar initMap = function(){\r\n\r\n //map style, buildings and boundary polygons\r\n if($('section.directory-map').length || $('section.contact-map').length || $('section.aoi-map').length){\r\n\r\n //different zoom level dependent on screen size\r\n //zoom to bounds is not working robustly, zoomLevel is therefore set like this\r\n if($(window).width() < 1366 || $('section.contact-map').length){\r\n var zoomLevel = 15;\r\n }else{\r\n var zoomLevel = 16;\r\n }\r\n\r\n map = new google.maps.Map(document.getElementById('map'), {\r\n center: {\r\n lat: 55.903500,\r\n lng: -4.308783\r\n },\r\n zoom: zoomLevel,\r\n scrollwheel: false,\r\n disableDefaultUI: true,\r\n zoomControl:true,\r\n zoomControlOptions:{\r\n position:google.maps.ControlPosition.LEFT_BOTTOM\r\n },\r\n streetViewControl:true,\r\n streetViewControlOptions:{\r\n position:google.maps.ControlPosition.LEFT_BOTTOM\r\n },\r\n gestureHandling: 'cooperative', //enable holding Ctrl to zoom whilst scrolling past map element\r\n styles:basemap\r\n });\r\n\r\n google.maps.event.addListenerOnce(map, 'idle', function(){ //idle event with addListenerOnce acts as a googleMaps.ready event\r\n\r\n map.data.addGeoJson(campus_boundaries);\r\n\r\n if($('section.directory-map').length || $('section.contact-map').length){\r\n // map.data.loadGeoJson('data/buildings.json', null, function(features){ //localhost file\r\n map.data.loadGeoJson('/umbraco/surface/json/Building?pageId=1269', null, function(features){\r\n \r\n if($('section.directory-map').length){\r\n //tooltip on hover\r\n google.maps.event.addListener(map.data, 'mouseover', function(event){\r\n if(event.feature.getProperty('building') == 'true'){ //only show tooltip if hovering over a building polygon\r\n mapTooltip(event.feature.getProperty('name') + ', ' + event.feature.getProperty('campus'));\r\n }\r\n });\r\n \r\n google.maps.event.addListener(map.data, 'mouseout', function(){\r\n if($mapTooltip != undefined){\r\n $mapTooltip.remove();\r\n }\r\n });\r\n \r\n google.maps.event.addListener(map.data, 'click', function(event){\r\n if(event.feature.getProperty('building') == 'true'){\r\n map.data.revertStyle(); //remove any 'click overwritten styles'\r\n map.data.overrideStyle(event.feature, { //overwrite style of clicked (selected) building\r\n fillColor: '#303030',\r\n strokeColor:'#F12A66',\r\n strokeWeight:1\r\n });\r\n \r\n var id = event.feature.getProperty('id'); //0 based index\r\n map_slider.flickity('select', id + 1);\r\n }\r\n });\r\n }\r\n \r\n });\r\n\r\n kelvin_marker = new google.maps.Marker({\r\n position: {\r\n lat: 55.903500, \r\n lng: -4.311700\r\n },\r\n map: map,\r\n optimized:false, //ensure svg marker renders in IE\r\n icon:{\r\n url:'images/kelvin_label.png'\r\n },\r\n zIndex: 1,\r\n title:\"Kelvin Campus\"\r\n });\r\n\r\n todd_marker = new google.maps.Marker({\r\n position: {\r\n lat: 55.905900,\r\n lng: -4.303600\r\n },\r\n map: map,\r\n optimized:false, //ensure svg marker renders in IE\r\n icon:{\r\n url:'images/todd_label.png'\r\n },\r\n zIndex: 1,\r\n title:\"Todd Campus\"\r\n });\r\n }\r\n \r\n });\r\n\r\n map.data.setStyle(function(feature) {\r\n\r\n if(feature.getProperty('name') == 'Todd Campus'){\r\n var color = '#72C62A',\r\n weight = 2,\r\n opacity = 0,\r\n zeeIndex = 1;\r\n }\r\n\r\n if(feature.getProperty('name') == 'Kelvin Campus'){\r\n var color = '#11A2E8',\r\n weight = 2,\r\n opacity = 0,\r\n zeeIndex = 1;\r\n }\r\n\r\n if(feature.getProperty('building') == 'true'){\r\n var weight = 1,\r\n color = '#d5d5d5',\r\n opacity = 1,\r\n zeeIndex = 10;\r\n }\r\n\r\n return{\r\n strokeColor:color,\r\n strokeWeight:weight,\r\n fillOpacity:opacity,\r\n fillColor:'#888888',\r\n zIndex:zeeIndex\r\n };\r\n });\r\n\r\n $('#map').mousedown(function(){\r\n $('section.contact-map .map-card').addClass('fade');\r\n });\r\n \r\n $('#map').mouseup(function(){\r\n $('section.contact-map .map-card').removeClass('fade');\r\n });\r\n\r\n }\r\n\r\n //directory map page functionality\r\n if($('section.directory-map').length){\r\n\r\n //populate map cards with json data\r\n // $.getJSON(\"data/buildings.json\", function(data){ //localhost file\r\n $.getJSON(\"/umbraco/surface/json/Building?pageId=1269\", function(data){\r\n $.each(data.features, function(i){\r\n var tenantsList = '';\r\n\r\n if(data.features[i].properties.tenants.length > 0){ //loop through tenants for each building, and add to string array before appending to ul.companies\r\n for(var x = 0; x < data.features[i].properties.tenants.length; x++){\r\n var buildingNameFormatted = data.features[i].properties.tenants[x].Name.trim().split(' ').join('-').replace(\"'\", \"\").toLowerCase(); //building name data attribute used for 'click to table row' functionality\r\n tenantsList += '
' + data.features[i].properties.desc + '
\\\r\n Who\\'s here\\\r\nReception building
'\r\n }).open(map, reception_marker);\r\n }\r\n\r\n //add AOI markers to the map\r\n if($('section.aoi-map').length){\r\n\r\n map.data.setStyle(function(feature) {\r\n\r\n if(feature.getProperty('name') == 'Todd Campus'){\r\n var color = '#F12A66',\r\n weight = 2,\r\n opacity = 0,\r\n zeeIndex = 1;\r\n }\r\n\r\n if(feature.getProperty('name') == 'Kelvin Campus'){\r\n var color = '#F12A66',\r\n weight = 2,\r\n opacity = 0,\r\n zeeIndex = 1;\r\n }\r\n\r\n return{\r\n strokeColor:color,\r\n strokeWeight:weight,\r\n fillOpacity:opacity,\r\n fillColor:'#888888',\r\n zIndex:zeeIndex\r\n };\r\n });\r\n\r\n map.set('styles',\r\n [\r\n {\r\n \"featureType\": \"all\",\r\n \"elementType\": \"labels\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"on\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"labels\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit.station\",\r\n \"elementType\": \"labels\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n }\r\n ]\r\n );\r\n \r\n aoi_markers = [];\r\n info_windows = [];\r\n // $.getJSON(\"data/aoi_markers.json\", function(data){ //localhost\r\n $.getJSON(\"/umbraco/surface/json/AOIMarkers?pageId=1267\", function(data){\r\n $.each(data, function(i){\r\n aoi_marker = new google.maps.Marker({\r\n position: {\r\n lat: data[i].lat,\r\n lng: data[i].lng\r\n },\r\n map: map,\r\n optimized:false, //ensure svg marker renders in IE\r\n icon:{\r\n url:'images/map/icon-' + data[i].category + '.png',\r\n anchor: new google.maps.Point(15, 17)\r\n },\r\n zIndex: 1,\r\n title:data[i].name\r\n });\r\n\r\n aoi_markers[i] = aoi_marker;\r\n\r\n google.maps.event.addListener(aoi_marker, 'mouseover', function(event){\r\n if(!infowindow.opened){ //only show mouseover if infowindow not open\r\n mapTooltip(data[i].name);\r\n }\r\n });\r\n\r\n google.maps.event.addListener(aoi_marker, 'mouseout', function(){\r\n if($mapTooltip != undefined){\r\n $mapTooltip.remove();\r\n }\r\n });\r\n\r\n //used where mouseover is not available. i.e. touch screens\r\n var infowindow = new google.maps.InfoWindow({\r\n content: '' + data[i].name + '
',\r\n opened:false //add custom property to use for checking if infowindow is open\r\n });\r\n\r\n info_windows[i] = infowindow;\r\n\r\n //Required for touch devices, where hover is not available\r\n google.maps.event.addListener(aoi_marker, 'click', function(event){\r\n\r\n if($mapTooltip != undefined){ //remove mouseover tooltip when clicking to show infowindow\r\n $mapTooltip.remove();\r\n }\r\n\r\n //if clicked marker infowindow is open, closed all marker windows\r\n if(infowindow.opened){\r\n info_windows.forEach(function(item){\r\n item.close();\r\n item.opened = false;\r\n });\r\n\r\n //if the clicked marker infowindow is not open, close all marker windows and then open the clicked marker window\r\n }else{\r\n info_windows.forEach(function(item){\r\n item.close();\r\n item.opened = false;\r\n });\r\n \r\n infowindow.open(map, this);\r\n infowindow.opened = true;\r\n }\r\n\r\n });\r\n\r\n });\r\n\r\n //fit markers to map\r\n $(window).resize(function(){\r\n var bounds = new google.maps.LatLngBounds();\r\n for (var i = 0; i < aoi_markers.length; i++) {\r\n bounds.extend(aoi_markers[i].getPosition());\r\n }\r\n map.fitBounds(bounds);\r\n }).resize();\r\n\r\n });\r\n }\r\n}\r\n\r\n//default styling with POI business and government labels turned off. map lightened a bit to make the geojson pop more\r\n//These are the only labels that overlap with the science park buildings\r\nvar basemap = [\r\n {\r\n \"featureType\": \"all\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"on\"\r\n },\r\n {\r\n \"lightness\": \"10\"\r\n },\r\n {\r\n \"gamma\": \"1.4\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.business\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.government\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n }\r\n]\r\n\r\nvar campus_boundaries = {\r\n \"type\": \"FeatureCollection\",\r\n \"name\": \"campus_boundaries_2\",\r\n \"crs\": {\r\n \"type\": \"name\",\r\n \"properties\": {\r\n \"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\"\r\n }\r\n },\r\n \"features\": [{\r\n \"type\": \"Feature\",\r\n \"properties\": {\r\n \"id\": 1,\r\n \"name\": \"Kelvin Campus\"\r\n },\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [\r\n [\r\n [-4.308396244434717, 55.901077195862605],\r\n [-4.309051961845626, 55.900414023999431],\r\n [-4.309660028436651, 55.900494722471393],\r\n [-4.310238061925528, 55.900434100218142],\r\n [-4.310971080264604, 55.900384303297336],\r\n [-4.311736174339771, 55.900285317634832],\r\n [-4.312398274981741, 55.900186331719731],\r\n [-4.313075088971312, 55.900178082882071],\r\n [-4.313722476265683, 55.900153336358564],\r\n [-4.314281583474458, 55.900079096693339],\r\n [-4.314783241603672, 55.90002990769181],\r\n [-4.315364849701941, 55.900035669373494],\r\n [-4.315792079356964, 55.900209986727546],\r\n [-4.316109389773088, 55.900329657238238],\r\n [-4.31642615761457, 55.900436587373882],\r\n [-4.316885845999544, 55.900656512566869],\r\n [-4.317194826299131, 55.90082148695209],\r\n [-4.317503806598718, 55.900928719926249],\r\n [-4.3179010669839, 55.900994709301465],\r\n [-4.318357180759481, 55.901110190437961],\r\n [-4.317533233293916, 55.902009281814024],\r\n [-4.315944191753186, 55.901374146030435],\r\n [-4.315620498106, 55.901506123153119],\r\n [-4.315193811025619, 55.901572111546066],\r\n [-4.314693557207241, 55.901638099826769],\r\n [-4.314237443431661, 55.901687590963618],\r\n [-4.314105023303267, 55.901679342445199],\r\n [-4.31403145656527, 55.90175357904787],\r\n [-4.314105023303267, 55.901794821543525],\r\n [-4.314266870126859, 55.901976288003432],\r\n [-4.314222730084061, 55.902372211878301],\r\n [-4.314134449998465, 55.902528930629018],\r\n [-4.313943176479674, 55.902619662247915],\r\n [-4.313722476265683, 55.902669152132411],\r\n [-4.313251649142503, 55.902735138546838],\r\n [-4.312942668842918, 55.90281762140701],\r\n [-4.312780822019325, 55.902999083081994],\r\n [-4.312574835152933, 55.903427989120907],\r\n [-4.312589548500533, 55.903469229836247],\r\n [-4.313045662276114, 55.90393937089182],\r\n [-4.313678336222885, 55.904557968861759],\r\n [-4.314266870126859, 55.90515181363098],\r\n [-4.314605277121644, 55.905506466587077],\r\n [-4.313868205430843, 55.90591248057892],\r\n [-4.312471841719738, 55.904607456273155],\r\n [-4.310265924729115, 55.90260778182099],\r\n [-4.309234905247879, 55.901704087995192],\r\n [-4.308396244434717, 55.901077195862605]\r\n ]\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {\r\n \"id\": 2,\r\n \"name\": \"Todd Campus\"\r\n },\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [\r\n [\r\n [-4.300817625690991, 55.903944738378186],\r\n [-4.301466257715419, 55.904087835304374],\r\n [-4.302010651576596, 55.904195059248927],\r\n [-4.302893452432557, 55.904252795096284],\r\n [-4.303452559641332, 55.904277539004553],\r\n [-4.304114660283304, 55.904252795096284],\r\n [-4.304982747791666, 55.904211555214083],\r\n [-4.305262301396054, 55.904203307232379],\r\n [-4.305409434872047, 55.904417754186603],\r\n [-4.305644848433637, 55.904533225132383],\r\n [-4.305924402038024, 55.904582712575333],\r\n [-4.306233382337611, 55.904491985548354],\r\n [-4.306380515813604, 55.904401258309136],\r\n [-4.30714560988877, 55.904508481387218],\r\n [-4.307631150359549, 55.90461570416889],\r\n [-4.307895990616338, 55.904714678781176],\r\n [-4.308190257568325, 55.904854892382922],\r\n [-4.308911211600694, 55.904813653140906],\r\n [-4.309485032157068, 55.904681687271811],\r\n [-4.309808725804254, 55.904582712575333],\r\n [-4.309970572627847, 55.904475489702463],\r\n [-4.309632165633063, 55.903972363032601],\r\n [-4.310794520093411, 55.903906378722958],\r\n [-4.3110593603502, 55.903997107119785],\r\n [-4.311338913954587, 55.903988859092479],\r\n [-4.31353120274689, 55.90615802984496],\r\n [-4.312868782943367, 55.906491509207328],\r\n [-4.312096220487857, 55.906170642717022],\r\n [-4.31157627440165, 55.905796101304439],\r\n [-4.311064881845069, 55.905676519252843],\r\n [-4.310926940221806, 55.906257000521421],\r\n [-4.310832276905145, 55.906885508518009],\r\n [-4.310250126232235, 55.906860462134304],\r\n [-4.309728775835195, 55.906853610155629],\r\n [-4.309314855216939, 55.906839602063023],\r\n [-4.308955351643492, 55.906718860338835],\r\n [-4.308646371343905, 55.906570405997371],\r\n [-4.308293251001521, 55.906347723419657],\r\n [-4.307910703963937, 55.906042563736534],\r\n [-4.307636991015972, 55.905839951551243],\r\n [-4.30724557128721, 55.905689615303601],\r\n [-4.306846364016556, 55.905553770102792],\r\n [-4.306471923682421, 55.90560059049961],\r\n [-4.30567057285482, 55.905694410044156],\r\n [-4.304977641206816, 55.905782951564987],\r\n [-4.304576391302218, 55.905841955327908],\r\n [-4.303835202427383, 55.905924127421919],\r\n [-4.303571447319874, 55.905963182828216],\r\n [-4.303311809396402, 55.905904537099488],\r\n [-4.302790458999361, 55.905770088127795],\r\n [-4.302290205180984, 55.905654925001144],\r\n [-4.301583964496214, 55.905506466587077],\r\n [-4.300608064215203, 55.905397761314923],\r\n [-4.300267119886073, 55.90549409503614],\r\n [-4.299908861042683, 55.90542468717728],\r\n [-4.300224402193416, 55.905268747836899],\r\n [-4.300817625690991, 55.903944738378186]\r\n ]\r\n ]\r\n }\r\n }\r\n ]\r\n}\r\n\r\n//custom tooltip\r\nvar $mapTooltip;\r\nfunction mapTooltip(info){\r\n $mapTooltip = $('