1 2"use strict"; // Start of use strict 3 4// 7. google map 5function gMap () { 6 if (jQuery('.google-map-home').length) { 7 jQuery('.google-map-home').each(function () { 8 // getting options from html 9 var mapName = jQuery(this).attr('id'); 10 var mapLat = jQuery(this).data('map-lat'); 11 var mapLng = jQuery(this).data('map-lng'); 12 var iconPath = jQuery(this).data('icon-path'); 13 var mapZoom = jQuery(this).data('map-zoom'); 14 var mapTitle = jQuery(this).data('map-title'); 15 16 // defined default style 17 var styles = [ 18 { 19 "featureType": "administrative", 20 "elementType": "labels.text.fill", 21 "stylers": [ 22 { 23 "color": "#444444" 24 } 25 ] 26 }, 27 { 28 "featureType": "landscape", 29 "elementType": "all", 30 "stylers": [ 31 { 32 "color": "#f2f2f2" 33 } 34 ] 35 }, 36 { 37 "featureType": "poi", 38 "elementType": "all", 39 "stylers": [ 40 { 41 "visibility": "off" 42 } 43 ] 44 }, 45 { 46 "featureType": "road", 47 "elementType": "all", 48 "stylers": [ 49 { 50 "saturation": -100 51 }, 52 { 53 "lightness": 45 54 } 55 ] 56 }, 57 { 58 "featureType": "road.highway", 59 "elementType": "all", 60 "stylers": [ 61 { 62 "visibility": "simplified" 63 } 64 ] 65 }, 66 { 67 "featureType": "road.arterial", 68 "elementType": "labels.icon", 69 "stylers": [ 70 { 71 "visibility": "off" 72 } 73 ] 74 }, 75 { 76 "featureType": "transit", 77 "elementType": "all", 78 "stylers": [ 79 { 80 "visibility": "off" 81 } 82 ] 83 }, 84 { 85 "featureType": "water", 86 "elementType": "all", 87 "stylers": [ 88 { 89 "color": "#999999" 90 }, 91 { 92 "visibility": "on" 93 } 94 ] 95 } 96 ]; 97 98 // defined skin-1 style 99 if (jQuery(this).hasClass('skin-1')) { 100 var iconPath = 'img/theme/map-marker.png'; 101 var styles = [ 102 { 103 "featureType": "administrative", 104 "elementType": "labels.text.fill", 105 "stylers": [ 106 { 107 "color": "#444444" 108 } 109 ] 110 }, 111 { 112 "featureType": "landscape", 113 "elementType": "all", 114 "stylers": [ 115 { 116 "color": "#f2f2f2" 117 } 118 ] 119 }, 120 { 121 "featureType": "poi", 122 "elementType": "all", 123 "stylers": [ 124 { 125 "visibility": "off" 126 } 127 ] 128 }, 129 { 130 "featureType": "road", 131 "elementType": "all", 132 "stylers": [ 133 { 134 "saturation": -100 135 }, 136 { 137 "lightness": 45 138 } 139 ] 140 }, 141 { 142 "featureType": "road.highway", 143 "elementType": "all", 144 "stylers": [ 145 { 146 "visibility": "simplified" 147 } 148 ] 149 }, 150 { 151 "featureType": "road.arterial", 152 "elementType": "labels.icon", 153 "stylers": [ 154 { 155 "visibility": "off" 156 } 157 ] 158 }, 159 { 160 "featureType": "transit", 161 "elementType": "all", 162 "stylers": [ 163 { 164 "visibility": "off" 165 } 166 ] 167 }, 168 { 169 "featureType": "water", 170 "elementType": "all", 171 "stylers": [ 172 { 173 "color": "#9999991" 174 }, 175 { 176 "visibility": "on" 177 } 178 ] 179 } 180 ]; 181 }; 182 183 184 // if zoom not defined the zoom value will be 15; 185 if (!mapZoom) { 186 var mapZoom = 15; 187 }; 188 // init map 189 var map; 190 map = new GMaps({ 191 div: '#'+mapName, 192 scrollwheel: false, 193 lat: mapLat, 194 lng: mapLng, 195 styles: styles, 196 zoom: mapZoom 197 }); 198 // if icon path setted then show marker 199 if(iconPath) { 200 map.addMarker({ 201 icon: iconPath, 202 lat: mapLat, 203 lng: mapLng, 204 title: mapTitle 205 }); 206 } 207 }); 208 }; 209} 210 211 212 213// instance of fuction while Document ready event 214jQuery(document).on('ready', function () { 215 (function ($) { 216 gMap(); 217 })(jQuery); 218}); 219 220 221 222 223 224 225 226
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.