In this repo i store all my websites, each in a different branch
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

223 рядки
6.1 KiB

  1. // ---------------------------------------------------------------------------------------------------------------------------->
  2. // MAP ELEMENT ||-----------
  3. // ---------------------------------------------------------------------------------------------------------------------------->
  4. // When the window has finished loading create our google map below
  5. google.maps.event.addDomListener(window, 'load', init);
  6. function init() {
  7. // Basic options for a simple Google Map
  8. var mapOptions = {
  9. // How zoomed in you want the map to start at (always required)
  10. zoom: 15,
  11. scrollwheel: false, //set to true to enable mouse scrolling while inside the map area
  12. // The latitude and longitude to center the map (always required)
  13. center: new google.maps.LatLng(21.170240, 72.831061), // Surat
  14. // How you would like to style the map.
  15. // This is where you would paste any style found on Snazzy Maps.
  16. styles: [
  17. {
  18. "featureType": "water",
  19. "elementType": "geometry.fill",
  20. "stylers": [
  21. {
  22. "color": "#d3d3d3"
  23. }
  24. ]
  25. },
  26. {
  27. "featureType": "transit",
  28. "stylers": [
  29. {
  30. "color": "#808080"
  31. },
  32. {
  33. "visibility": "off"
  34. }
  35. ]
  36. },
  37. {
  38. "featureType": "road.highway",
  39. "elementType": "geometry.stroke",
  40. "stylers": [
  41. {
  42. "visibility": "on"
  43. },
  44. {
  45. "color": "#b3b3b3"
  46. }
  47. ]
  48. },
  49. {
  50. "featureType": "road.highway",
  51. "elementType": "geometry.fill",
  52. "stylers": [
  53. {
  54. "color": "#ffffff"
  55. }
  56. ]
  57. },
  58. {
  59. "featureType": "road.local",
  60. "elementType": "geometry.fill",
  61. "stylers": [
  62. {
  63. "visibility": "on"
  64. },
  65. {
  66. "color": "#ffffff"
  67. },
  68. {
  69. "weight": 1.8
  70. }
  71. ]
  72. },
  73. {
  74. "featureType": "road.local",
  75. "elementType": "geometry.stroke",
  76. "stylers": [
  77. {
  78. "color": "#d7d7d7"
  79. }
  80. ]
  81. },
  82. {
  83. "featureType": "poi",
  84. "elementType": "geometry.fill",
  85. "stylers": [
  86. {
  87. "visibility": "on"
  88. },
  89. {
  90. "color": "#ebebeb"
  91. }
  92. ]
  93. },
  94. {
  95. "featureType": "administrative",
  96. "elementType": "geometry",
  97. "stylers": [
  98. {
  99. "color": "#a7a7a7"
  100. }
  101. ]
  102. },
  103. {
  104. "featureType": "road.arterial",
  105. "elementType": "geometry.fill",
  106. "stylers": [
  107. {
  108. "color": "#ffffff"
  109. }
  110. ]
  111. },
  112. {
  113. "featureType": "road.arterial",
  114. "elementType": "geometry.fill",
  115. "stylers": [
  116. {
  117. "color": "#ffffff"
  118. }
  119. ]
  120. },
  121. {
  122. "featureType": "landscape",
  123. "elementType": "geometry.fill",
  124. "stylers": [
  125. {
  126. "visibility": "on"
  127. },
  128. {
  129. "color": "#efefef"
  130. }
  131. ]
  132. },
  133. {
  134. "featureType": "road",
  135. "elementType": "labels.text.fill",
  136. "stylers": [
  137. {
  138. "color": "#696969"
  139. }
  140. ]
  141. },
  142. {
  143. "featureType": "administrative",
  144. "elementType": "labels.text.fill",
  145. "stylers": [
  146. {
  147. "visibility": "on"
  148. },
  149. {
  150. "color": "#737373"
  151. }
  152. ]
  153. },
  154. {
  155. "featureType": "poi",
  156. "elementType": "labels.icon",
  157. "stylers": [
  158. {
  159. "visibility": "off"
  160. }
  161. ]
  162. },
  163. {
  164. "featureType": "poi",
  165. "elementType": "labels",
  166. "stylers": [
  167. {
  168. "visibility": "off"
  169. }
  170. ]
  171. },
  172. {
  173. "featureType": "road.arterial",
  174. "elementType": "geometry.stroke",
  175. "stylers": [
  176. {
  177. "color": "#d6d6d6"
  178. }
  179. ]
  180. },
  181. {
  182. "featureType": "road",
  183. "elementType": "labels.icon",
  184. "stylers": [
  185. {
  186. "visibility": "off"
  187. }
  188. ]
  189. },
  190. {},
  191. {
  192. "featureType": "poi",
  193. "elementType": "geometry.fill",
  194. "stylers": [
  195. {
  196. "color": "#dadada"
  197. }
  198. ]
  199. }
  200. ]
  201. };
  202. // Get the HTML DOM element that will contain your map
  203. // We are using a div with id="map" seen below in the <body>
  204. var mapElement = document.getElementById('map');
  205. // Create the Google Map using our element and options defined above
  206. var map = new google.maps.Map(mapElement, mapOptions);
  207. // Let's also add a marker while we're at it
  208. var marker = new google.maps.Marker({
  209. position: new google.maps.LatLng(21.170240, 72.831061),
  210. map: map,
  211. title: 'Nileforest',
  212. icon: 'img/map-marker.png'
  213. });
  214. };