$(function () { var bounds = new google.maps.LatLngBounds(); if((/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))) { var mapOptions = { scrollwheel: false, draggable: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; } else { var mapOptions = { mapTypeId: google.maps.MapTypeId.ROADMAP }; } var deliveryArea; var polys=[]; var map = new google.maps.Map(document.getElementById('deliverymap'), mapOptions); var deliveryAreaCoords30 = new Array(); deliveryAreaCoords30.push(new google.maps.LatLng(53.808370968776, -1.8089485824309)); deliveryAreaCoords30.push(new google.maps.LatLng(53.814801804569, -1.7926999558092)); deliveryAreaCoords30.push(new google.maps.LatLng(53.817060245694, -1.773527)); deliveryAreaCoords30.push(new google.maps.LatLng(53.814801804569, -1.7543540441908)); deliveryAreaCoords30.push(new google.maps.LatLng(53.808370968776, -1.7381054175691)); deliveryAreaCoords30.push(new google.maps.LatLng(53.798748368145, -1.7272570653523)); deliveryAreaCoords30.push(new google.maps.LatLng(53.787400547727, -1.723458298401)); deliveryAreaCoords30.push(new google.maps.LatLng(53.776055767102, -1.727282027234)); deliveryAreaCoords30.push(new google.maps.LatLng(53.766440505188, -1.7381407190164)); deliveryAreaCoords30.push(new google.maps.LatLng(53.760017008114, -1.7543790060946)); deliveryAreaCoords30.push(new google.maps.LatLng(53.757761606788, -1.773527)); deliveryAreaCoords30.push(new google.maps.LatLng(53.760017008114, -1.7926749939054)); deliveryAreaCoords30.push(new google.maps.LatLng(53.766440505188, -1.8089132809836)); deliveryAreaCoords30.push(new google.maps.LatLng(53.776055767102, -1.819771972766)); deliveryAreaCoords30.push(new google.maps.LatLng(53.787400547727, -1.823595701599)); deliveryAreaCoords30.push(new google.maps.LatLng(53.798748368145, -1.8197969346477)); deliveryAreaCoords30.push(new google.maps.LatLng(53.808370968776, -1.8089485824309)); for (var i = 0; i < deliveryAreaCoords30.length; i++) { bounds.extend(deliveryAreaCoords30[i]); } polys.push(deliveryAreaCoords30); var deliveryAreaCoords31 = new Array(); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); deliveryAreaCoords31.push(new google.maps.LatLng(53.787411, -1.773527)); for (var i = 0; i < deliveryAreaCoords31.length; i++) { bounds.extend(deliveryAreaCoords31[i]); } polys.push(deliveryAreaCoords31); deliveryArea = new google.maps.Polygon({ paths: polys, strokeWeight: 0, fillColor: '#4f387e', fillOpacity: .3 }); deliveryArea.setMap(map); // Define the map styles (optional) var mapStyle = [{ stylers: [{ saturation: -65 }, { gamma: 1.52 }] }, { featureType: "administrative", stylers: [{ saturation: -95 }, { gamma: 1.26 }] }, { featureType: "water", elementType: "labels", stylers: [{ visibility: "off" }] }, { featureType: "poi", elementType: "labels", stylers: [{ visibility: "off" }] }, { featureType: "road.highway", elementType: "geometry.stroke", stylers: [{ color: '#3CA6CA' }] }, { featureType: "road.arterial", elementType: "geometry.stroke", stylers: [{ color: '#503980' }] }, { featureType: "poi", stylers: [{ saturation: -55 }] }]; map.setOptions({styles: mapStyle, mapTypeControl: false}); map.fitBounds(bounds); });