// Data for the markers consisting of a name, a LatLng and a zIndex for the // order in which these markers should display on top of each other. var soundings = [ ['ABE', 40.6499, -75.4477, 7], ['ACK', 41.2531, -70.0608, 8], ['ACY', 39.452, -74.567, 9], ['ALB', 42.7472, -73.7991, 10], ['BDL', 41.9381, -72.6825, 11], ['BDR', 41.1642, -73.1266, 13], ['BOS', 42.3606, -71.0097, 12], ['CHH', 41.6569, -69.9589, 6], ['DOV', 39.1295, -75.466, 14], ['EWR', 40.6827, -74.1693, 15], ['GON', 41.3279, -72.0489, 16], ['HPN', 41.0624, -73.7046, 17], ['HYA', 41.6693, -70.2804, 18], ['ILG', 39.6744, -75.6057, 19], ['ISP', 40.7939, -73.1017, 4], ['JFK', 40.6392, -73.7639, 5], ['MTP', 41.073, -71.9235, 20], ['NYC', 40.779, -73.9692, 3], ['OKX', 40.8656, -72.8647, 2], ['ORH', 42.2706, -71.8731, 21], ['PHL', 39.8733, -75.2268, 22], ['POU', 41.6257, -73.8816, 23], ['PVD', 41.7225, -71.4325, 24], ['SBU', 40.9045, -73.1183, 1], ['SWF', 41.5045, -74.0999, 25], ['TEB', 40.859, -74.0562, 26], ['TTN', 40.2768, -74.8159, 27], ['WRI', 40.0156, -74.5917, 28] ]; for (var i = 0; i < beaches.length; i++) { var sound = soundings[i]; var marker = new google.maps.Marker({ position: {lat: sound[1], lng: sound[2]}, map: map, title: sound[0], zIndex: sound[3] }); }