var stations = [ ['14','1', 51.5719449,0.4586564, 'Station_52_Basildon', 1], ['15','1', 51.5748558,0.5974249, 'Station_35_Rayleigh_Weir', 2], ['16','1', 51.5198909,0.5817400, 'Station_54_Canvey', 3], ['17','1', 51.6207006,0.4165037, 'Station_68_Billericay', 4], ['18','1', 51.6102964,0.5187059, 'Station_69_Wickford', 5], ['20','1', 51.6434618,0.6199205, 'Station_32_South_Woodham_Ferrers', 6], ['21','1', 51.7192691,0.5035875, 'Station_33_Great_Baddow', 7], ['22','1', 51.7360830,0.4607602, 'Station_34_Chelmsford', 8], ['23','1', 51.6288683,0.8174172, 'Station_43_Burnham-on-Crouch', 9], ['24','1', 51.6985966,0.8797557, 'Station_44_Tillingham', 10], ['25','1', 51.7586676,0.8316364, 'Station_45_Tollesbury', 11], ['26','1', 51.7202594,0.6614278, 'Station_46_Maldon', 12], ['28','1', 51.8971460,0.9016588, 'Station_10_Colchester', 13], ['29','1', 51.9319072,1.2598740, 'Station_11_Dovercourt', 14], ['30','1', 51.8045435,1.1457777, 'Station_12_Clacton', 15], ['31','1', 51.9456907,1.0656492, 'Station_17_Manningtree', 16], ['32','1', 51.8375224,1.2477329, 'Station_18_Frinton', 17], ['33','1', 51.8433224,1.1257132, 'Station_19_Weeley', 18], ['34','1', 51.8107237,1.0237279, 'Station_20_Brightlingsea', 19], ['35','1', 51.8683736,0.9633942, 'Station_21_Wivenhoe', 20], ['36','1', 51.7779554,0.9149228, 'Station_22_West_Mersea', 21], ['37','1', 51.8122204,0.7496480, 'Station_23_Tiptree', 22], ['39','1', 51.7726360,0.0928258, 'Station_70_Harlow_Central', 23], ['40','1', 51.7023849,0.2438615, 'Station_71_Ongar', 24], ['41','1', 51.6437287,0.0528448, 'Station_72_Loughton', 25], ['42','1', 51.6836603,0.0015877, 'Station_73_Waltham_Abbey', 26], ['43','1', 51.7836700,0.1373107, 'Station_82_Old_Harlow', 27], ['44','1', 51.6975531,0.1100957, 'Station_89_Epping', 28], ['46','1', 51.5570444,0.7171000, 'Station_30_Southend', 29], ['47','1', 51.5553699,0.6666195, 'Station_31_Leigh', 30], ['48','1', 51.5324164,0.7971650, 'Station_42_Shoeburyness', 31], ['49','1', 51.5976217,0.6654835, 'Station_47_Hawkwell', 32], ['51','1', 51.5806359,0.7073628, 'Station_49_Rochford', 33], ['53','1', 51.4903760,0.3195246, 'Station_50_Grays', 34], ['54','1', 51.6229955,0.3014172, 'Station_51_Brentwood', 35], ['55','1', 51.5060288,0.3825754, 'Station_55_Orsett', 36], ['56','1', 51.5267315,0.4665426, 'Station_66_Corringham', 37], ['57','1', 51.6692808,0.3822214, 'Station_67_Ingatestone', 38], ['59','1', 51.8763107,0.6932154, 'Station_24_Coggeshall', 39], ['60','1', 51.7941545,0.6316933, 'Station_25_Witham', 40], ['61','1', 51.8787058,0.5585010, 'Station_78_Braintree', 41], ['62','1', 51.9537051,0.4842928, 'Station_79_Wethersfield', 42], ['63','1', 51.9793117,0.5868500, 'Station_80_Sible_Hedingham', 43], ['64','1', 51.9405335,0.6399240, 'Station_81_Halstead', 44], ['65','1', 51.9028129,0.1949175, 'Station_83_Stansted', 45], ['66','1', 51.9817359,0.2200641, 'Station_84_Newport', 46], ['67','1', 52.0230376,0.2419629, 'Station_85_Saffron_Walden', 47], ['68','1', 51.9523532,0.3513273, 'Station_86_Thaxted', 48], ['69','1', 51.8731004,0.3602939, 'Station_87_Dunmow', 49], ['70','1', 51.7971353,0.3115511, 'Station_88_Leaden_Roding', 50], ['71','1', 51.8904527,0.8532459, 'Urban_Search_and_Rescue_USAR', 51], ['72','1', 51.8206248,0.6769632, 'Service_Headquarters', 52], ]; function googleMap(mapID,sat,gam){ var mapStyles = [ { stylers: [ { saturation: sat }, { gamma:gam } ] } ]; var mapStylesType = new google.maps.StyledMapType(mapStyles, {name: "MapCSS"}); var myLatlng = new google.maps.LatLng(51.772737,0.578842); var myOptions = { zoom: 9, center: myLatlng, backgroundColor: '#ffffff', navigationControl: true, mapTypeControl: false, scaleControl: false, keyboardShortcuts: false, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById(mapID), myOptions); var schoolShadow = { url: '/_img/layup/marker_shadow.png', anchor: new google.maps.Point(10, 0) }; map.mapTypes.set('MapCSS', mapStylesType); map.setMapTypeId('MapCSS'); if(mapID=='cMap'){ marker = new google.maps.Marker({ position: new google.maps.LatLng(51.8206248,0.6769632), icon: '/_img/layup/marker1.png', shadow: schoolShadow, map: map }); google.maps.event.addListener(marker, 'click', function() { window.location = '/contact/' }); }else{ if(mapID=='sMap') { locations = stations } else { locations = incidents} var ua = navigator.userAgent; for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][2], locations[i][3]), icon: '/_img/layup/marker'+locations[i][1]+'.png', shadow: schoolShadow, optimized: true, zIndex: locations[i][5] , map: map }); google.maps.event.addDomListener(marker, 'click', (function(marker, i) { return function() { if(mapID=='sMap'){ thisID = stations[i][0]; thisLocation = '/locations/'+stations[i][4] } else {thisID = incidents[i][0]; thisLocation = '/incidents/i'+incidents[i][0] } if( $.cookie("browserSize") == 'mobileP' || $.cookie("browserSize") == 'mobileL' || ua.indexOf("BlackBerry") >= 0 ) { window.location = thisLocation ; }else { pingalaAjax.makeRequest('/content/ajax.asp?ajax=1&id='+thisID+'&area='+mapID,mapID+'info') } } })(marker, i)); } } }