map.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. materialKitDemo = {
  2. initContactUs2Map: function(){
  3. var lat = 38.342138;
  4. var long = -122.715815;
  5. var centerLong = long - 0.025;
  6. var myLatlng = new google.maps.LatLng(lat,long);
  7. var centerPosition = new google.maps.LatLng(lat, centerLong);
  8. var mapOptions = {
  9. zoom: 9,
  10. center: {lat: 37.999138, lng: -123.415815},
  11. disableDefaultUI: true,
  12. styles:
  13. [
  14. {
  15. "featureType": "water",
  16. "stylers": [
  17. {
  18. "saturation": 100
  19. },
  20. {
  21. "lightness": 0
  22. },
  23. {
  24. "hue": "#4284c5"
  25. }
  26. ]
  27. },
  28. {
  29. "featureType": "road",
  30. "elementType": "geometry.fill",
  31. "stylers": [
  32. {
  33. "hue": "#ff0000"
  34. },
  35. {
  36. "saturation": -100
  37. },
  38. {
  39. "lightness": 99
  40. }
  41. ]
  42. },
  43. {
  44. "featureType": "road",
  45. "elementType": "geometry.stroke",
  46. "stylers": [
  47. {
  48. "color": "#808080"
  49. },
  50. {
  51. "lightness": 54
  52. }
  53. ]
  54. },
  55. {
  56. "featureType": "landscape.man_made",
  57. "elementType": "geometry.fill",
  58. "stylers": [
  59. {
  60. "color": "#ece2d9"
  61. },
  62. {
  63. "lightness": 54
  64. }
  65. ]
  66. },
  67. {
  68. "featureType": "poi.park",
  69. "elementType": "geometry.fill",
  70. "stylers": [
  71. {
  72. "color": "#ccdca1"
  73. },
  74. {
  75. "lightness": 54
  76. }
  77. ]
  78. },
  79. {
  80. "featureType": "road",
  81. "elementType": "labels.text.fill",
  82. "stylers": [
  83. {
  84. "color": "#767676"
  85. },
  86. {
  87. "lightness": 54
  88. }
  89. ]
  90. },
  91. {
  92. "featureType": "road",
  93. "elementType": "labels.text.stroke",
  94. "stylers": [
  95. {
  96. "color": "#ffffff"
  97. },
  98. {
  99. "lightness": 54
  100. }
  101. ]
  102. },
  103. {
  104. "featureType": "poi",
  105. "stylers": [
  106. {
  107. "visibility": "off"
  108. }
  109. ]
  110. },
  111. {
  112. "featureType": "landscape.natural",
  113. "elementType": "geometry.fill",
  114. "stylers": [
  115. {
  116. "visibility": "on"
  117. },
  118. {
  119. "color": "#6FC177"
  120. }
  121. ]
  122. },
  123. {
  124. "featureType": "poi.park",
  125. "stylers": [
  126. {
  127. "visibility": "on"
  128. }
  129. ]
  130. },
  131. {
  132. "featureType": "poi.sports_complex",
  133. "stylers": [
  134. {
  135. "visibility": "on"
  136. }
  137. ]
  138. },
  139. {
  140. "featureType": "poi.medical",
  141. "stylers": [
  142. {
  143. "visibility": "on"
  144. }
  145. ]
  146. },
  147. {
  148. "featureType": "poi.business",
  149. "stylers": [
  150. {
  151. "visibility": "off"
  152. }
  153. ]
  154. }
  155. ],
  156. scrollwheel: false,
  157. };
  158. var map = new google.maps.Map(document.getElementById("contactUs2Map"), mapOptions);
  159. var marker = new google.maps.Marker({
  160. position: myLatlng,
  161. title:"BioTherm"
  162. });
  163. marker.setMap(map);
  164. },
  165. presentationAnimations: function(){
  166. $(function() {
  167. var $window = $(window),
  168. isTouch = Modernizr.touch;
  169. if (isTouch) { $('.add-animation').addClass('animated'); }
  170. $window.on('scroll', revealAnimation);
  171. function revealAnimation() {
  172. // Showed...
  173. $(".add-animation:not(.animated)").each(function () {
  174. var $this = $(this),
  175. offsetTop = $this.offset().top,
  176. scrolled = $window.scrollTop(),
  177. win_height_padded = $window.height();
  178. if (scrolled + win_height_padded > offsetTop) {
  179. $this.addClass('animated');
  180. }
  181. });
  182. // Hidden...
  183. $(".add-animation.animated").each(function (index) {
  184. var $this = $(this),
  185. offsetTop = $this.offset().top;
  186. scrolled = $window.scrollTop(),
  187. windowHeight = $window.height();
  188. win_height_padded = windowHeight * 0.8;
  189. if (scrolled + win_height_padded < offsetTop) {
  190. $(this).removeClass('animated')
  191. }
  192. });
  193. }
  194. revealAnimation();
  195. });
  196. }
  197. };
  198. $(document).ready(function() {
  199. materialKitDemo.initContactUs2Map();
  200. });