Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.38 KB | None | 0 0
  1. var markerInfo = [
  2. //MONDAYS
  3. {
  4. "location": "City Hall Plaza - Fisher Park", "latitude": "42.360082",
  5. "longitude": "-71.058880",
  6. "day": "Mondays"
  7. },
  8. // TUESDAYS & THURSDAYS
  9. {
  10. "location": "South End - Harrison Avenue and East Concord Street by BMC",
  11. "latitude": "42.336209",
  12. "longitude": "-71.072912",
  13. "day": "Tuesdays & Thursdays"
  14. },
  15. // WEDNESDAYS & FRIDAYS
  16. {
  17. "location": "Back Bay - Trinity Place", "latitude": "42.348605",
  18. "longitude": "-71.075381",
  19. "day": "Wednesdays & Fridays"
  20. },
  21. //SATURDAYS
  22. {
  23. "location": "Dudley Square at Dudley Street", "latitude": "42.328354",
  24. "longitude": "-71.078709",
  25. "day": "Saturdays"
  26. }
  27. ];
  28.  
  29. var myLatlng1 = new google.maps.LatLng(42.360082, -71.058880);
  30. var myLatlng2 = new google.maps.LatLng(42.336209, -71.072912);
  31. var myLatlng3 = new google.maps.LatLng(42.348605, -71.075381);
  32. var myLatlng4 = new google.maps.LatLng(42.328354, -71.078709);
  33.  
  34. var mapOptions = {
  35. zoom: 13,
  36. center: myLatlng3,
  37. mapTypeId: google.maps.MapTypeId.ROADMAP,
  38. styles: [ {
  39. "featureType": "administrative",
  40. "elementType": "labels.text.fill",
  41. "stylers": [
  42. {
  43. "color": "#1e5631"
  44. }
  45. ]
  46. },
  47. {
  48. "featureType": "landscape",
  49. "elementType": "all",
  50. "stylers": [
  51. {
  52. "color": "#f2f2f2"
  53. }
  54. ]
  55. },
  56. {
  57. "featureType": "landscape",
  58. "elementType": "geometry.fill",
  59. "stylers": [
  60. {
  61. "color": "#eff6e3"
  62. }
  63. ]
  64. },
  65. {
  66. "featureType": "poi",
  67. "elementType": "all",
  68. "stylers": [
  69. {
  70. "visibility": "off"
  71. }
  72. ]
  73. },
  74. {
  75. "featureType": "poi.park",
  76. "elementType": "geometry.fill",
  77. "stylers": [
  78. {
  79. "color": "#D5EBC3"
  80. },
  81. {
  82. "visibility": "on"
  83. }
  84. ]
  85. },
  86. {
  87. "featureType": "road",
  88. "elementType": "all",
  89. "stylers": [
  90. {
  91. "saturation": -100
  92. },
  93. {
  94. "lightness": 45
  95. },
  96. {
  97. "visibility": "simplified"
  98. }
  99. ]
  100. },
  101. {
  102. "featureType": "road.highway",
  103. "elementType": "all",
  104. "stylers": [
  105. {
  106. "visibility": "simplified"
  107. }
  108. ]
  109. },
  110. {
  111. "featureType": "road.highway",
  112. "elementType": "geometry.fill",
  113. "stylers": [
  114. {
  115. "color": "#FFD478"
  116. },
  117. {
  118. "visibility": "simplified"
  119. }
  120. ]
  121. },
  122. {
  123. "featureType": "road.highway",
  124. "elementType": "labels.text",
  125. "stylers": [
  126. {
  127. "color": "#4e4e4e"
  128. }
  129. ]
  130. },
  131. {
  132. "featureType": "road.arterial",
  133. "elementType": "geometry.fill",
  134. "stylers": [
  135. {
  136. "color": "#f4f4f4"
  137. }
  138. ]
  139. },
  140. {
  141. "featureType": "road.arterial",
  142. "elementType": "labels.text.fill",
  143. "stylers": [
  144. {
  145. "color": "#787878"
  146. }
  147. ]
  148. },
  149. {
  150. "featureType": "road.arterial",
  151. "elementType": "labels.icon",
  152. "stylers": [
  153. {
  154. "visibility": "off"
  155. }
  156. ]
  157. },
  158. {
  159. "featureType": "transit",
  160. "elementType": "all",
  161. "stylers": [
  162. {
  163. "visibility": "off"
  164. }
  165. ]
  166. },
  167. {
  168. "featureType": "water",
  169. "elementType": "all",
  170. "stylers": [
  171. {
  172. "color": "#eaf6f8"
  173. },
  174. {
  175. "visibility": "on"
  176. }
  177. ]
  178. },
  179. {
  180. "featureType": "water",
  181. "elementType": "geometry.fill",
  182. "stylers": [
  183. {
  184. "color": "#eaf6f8"
  185. }
  186. ]
  187. }
  188. ]};
  189.  
  190. var map = new google.maps.Map(document.getElementById("map"), mapOptions);
  191.  
  192. var marker1 = new google.maps.Marker({
  193. position: myLatlng1,
  194. title: "Mondays"
  195. });
  196.  
  197. var marker2 = new google.maps.Marker({
  198. position: myLatlng2,
  199. title: "Tuesdays & Thursdays"
  200. });
  201.  
  202. var marker3 = new google.maps.Marker({
  203. position: myLatlng3,
  204. title: "Wednesdays & Fridays"
  205. });
  206.  
  207. var marker4 = new google.maps.Marker({
  208. position: myLatlng4,
  209. title: "Saturdays"
  210. });
  211.  
  212. // To add the marker to the map, call setMap();
  213. marker1.setMap(map);
  214. marker2.setMap(map);
  215. marker3.setMap(map);
  216. marker4.setMap(map);
  217.  
  218. var content1 = "<div style='font-family: LiSong Pro;'>" + "<h1>MONDAYS</h1>" + "<p style='font-size: 1.25em;'>" + "11AM - 3PM" + "</p>" + "<p style ='font-size: 1.5em;'>" + "City Hall Plaza - Fisher Park" + "<br />" + "</p></div>";
  219. var content2 = "<div style='font-family: LiSong Pro;'>" + "<h1>TUESDAYS & THURSDAYS</h1>" + "<p style='font-size: 1.25em;'>" + "11AM - 3PM" + "</p>" + "<p style='font-size: 1.5em;'>" + "South End - Harrison Avenue and East Concord Street by BMC" + "<br />" + "</p></div>";
  220. var content3 = "<div style='font-family: LiSong Pro;'>" + "<h1>WEDNESDAYS & FRIDAYS</h1>" + "<p style='font-size: 1.25em;'>" + "11AM - 3PM" + "</p>" + "<p style='font-size: 1.5em;'>" + "Back Bay - Trinity Place" + "<br />" + "</p></div>";
  221. var content4 = "<div style='font-family: LiSong Pro;'>" + "<h1>SATURDAYS</h1>" + "<p style='font-size: 1.25em;'>" + "11AM - 3PM" + "</p>" + "<p style='font-size: 1.5em;'>" + "Dudley Square at Dudley Street" + "<br />" + "</p></div>";
  222.  
  223. var infowindow1 = new google.maps.InfoWindow({
  224. content: content1
  225. });
  226.  
  227. var infowindow2 = new google.maps.InfoWindow({
  228. content: content2
  229. });
  230.  
  231. var infowindow3 = new google.maps.InfoWindow({
  232. content: content3
  233. });
  234.  
  235. var infowindow4 = new google.maps.InfoWindow({
  236. content: content4
  237. });
  238.  
  239. marker1.addListener('click', function() {
  240. infowindow1.open(map, marker1);
  241. });
  242.  
  243. marker2.addListener('click', function() {
  244. infowindow2.open(map, marker2);
  245. });
  246.  
  247. marker3.addListener('click', function() {
  248. infowindow3.open(map, marker3);
  249. });
  250.  
  251. marker4.addListener('click', function() {
  252. infowindow4.open(map, marker4);
  253. });
  254.  
  255. $("#mobile_menu").click(function() {
  256. $(this).toggleClass("menu-expanded");
  257. });
  258.  
  259. $(".menu-expanded").click(function() {
  260. $(this).toggleClass("menu-collapsed");
  261. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement