You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
5.1 KiB

7 years ago
  1. /*!
  2. * Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
  3. * Code licensed under the Apache License v2.0.
  4. * For details, see http://www.apache.org/licenses/LICENSE-2.0.
  5. */
  6. // jQuery to collapse the navbar on scroll
  7. function collapseNavbar() {
  8. if ($(".navbar").offset().top > 50) {
  9. $(".navbar-fixed-top").addClass("top-nav-collapse");
  10. } else {
  11. $(".navbar-fixed-top").removeClass("top-nav-collapse");
  12. }
  13. }
  14. $(window).scroll(collapseNavbar);
  15. $(document).ready(collapseNavbar);
  16. // jQuery for page scrolling feature - requires jQuery Easing plugin
  17. $(function() {
  18. $('a.page-scroll').bind('click', function(event) {
  19. var $anchor = $(this);
  20. $('html, body').stop().animate({
  21. scrollTop: $($anchor.attr('href')).offset().top
  22. }, 1500, 'easeInOutExpo');
  23. event.preventDefault();
  24. });
  25. });
  26. // Closes the Responsive Menu on Menu Item Click
  27. $('.navbar-collapse ul li a').click(function() {
  28. $(".navbar-collapse").collapse('hide');
  29. });
  30. function init() {
  31. // Basic options for a simple Google Map
  32. // For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
  33. var mapOptions = {
  34. // How zoomed in you want the map to start at (always required)
  35. zoom: 15,
  36. // The latitude and longitude to center the map (always required)
  37. center: new google.maps.LatLng(40.6700, -73.9400), // New York
  38. // Disables the default Google Maps UI components
  39. disableDefaultUI: true,
  40. scrollwheel: false,
  41. draggable: false,
  42. // How you would like to style the map.
  43. // This is where you would paste any style found on Snazzy Maps.
  44. styles: [{
  45. "featureType": "water",
  46. "elementType": "geometry",
  47. "stylers": [{
  48. "color": "#000000"
  49. }, {
  50. "lightness": 17
  51. }]
  52. }, {
  53. "featureType": "landscape",
  54. "elementType": "geometry",
  55. "stylers": [{
  56. "color": "#000000"
  57. }, {
  58. "lightness": 20
  59. }]
  60. }, {
  61. "featureType": "road.highway",
  62. "elementType": "geometry.fill",
  63. "stylers": [{
  64. "color": "#000000"
  65. }, {
  66. "lightness": 17
  67. }]
  68. }, {
  69. "featureType": "road.highway",
  70. "elementType": "geometry.stroke",
  71. "stylers": [{
  72. "color": "#000000"
  73. }, {
  74. "lightness": 29
  75. }, {
  76. "weight": 0.2
  77. }]
  78. }, {
  79. "featureType": "road.arterial",
  80. "elementType": "geometry",
  81. "stylers": [{
  82. "color": "#000000"
  83. }, {
  84. "lightness": 18
  85. }]
  86. }, {
  87. "featureType": "road.local",
  88. "elementType": "geometry",
  89. "stylers": [{
  90. "color": "#000000"
  91. }, {
  92. "lightness": 16
  93. }]
  94. }, {
  95. "featureType": "poi",
  96. "elementType": "geometry",
  97. "stylers": [{
  98. "color": "#000000"
  99. }, {
  100. "lightness": 21
  101. }]
  102. }, {
  103. "elementType": "labels.text.stroke",
  104. "stylers": [{
  105. "visibility": "on"
  106. }, {
  107. "color": "#000000"
  108. }, {
  109. "lightness": 16
  110. }]
  111. }, {
  112. "elementType": "labels.text.fill",
  113. "stylers": [{
  114. "saturation": 36
  115. }, {
  116. "color": "#000000"
  117. }, {
  118. "lightness": 40
  119. }]
  120. }, {
  121. "elementType": "labels.icon",
  122. "stylers": [{
  123. "visibility": "off"
  124. }]
  125. }, {
  126. "featureType": "transit",
  127. "elementType": "geometry",
  128. "stylers": [{
  129. "color": "#000000"
  130. }, {
  131. "lightness": 19
  132. }]
  133. }, {
  134. "featureType": "administrative",
  135. "elementType": "geometry.fill",
  136. "stylers": [{
  137. "color": "#000000"
  138. }, {
  139. "lightness": 20
  140. }]
  141. }, {
  142. "featureType": "administrative",
  143. "elementType": "geometry.stroke",
  144. "stylers": [{
  145. "color": "#000000"
  146. }, {
  147. "lightness": 17
  148. }, {
  149. "weight": 1.2
  150. }]
  151. }]
  152. };
  153. // Get the HTML DOM element that will contain your map
  154. // We are using a div with id="map" seen below in the <body>
  155. var mapElement = document.getElementById('map');
  156. // Create the Google Map using out element and options defined above
  157. map = new google.maps.Map(mapElement, mapOptions);
  158. // Custom Map Marker Icon - Customize the map-marker.png file to customize your icon
  159. var image = 'img/map-marker.png';
  160. var myLatLng = new google.maps.LatLng(40.6700, -73.9400);
  161. var beachMarker = new google.maps.Marker({
  162. position: myLatLng,
  163. map: map,
  164. icon: image
  165. });
  166. }