1(function($) { 2 3"use strict"; // Start of use strict 4 5// 7. google map 6function gMap () { 7 if ($('.google-map').length) { 8 $('.google-map').each(function () { 9 // getting options from html 10 var mapName = $(this).attr('id'); 11 var mapLat = $(this).data('map-lat'); 12 var mapLng = $(this).data('map-lng'); 13 var iconPath = $(this).data('icon-path'); 14 var mapZoom = $(this).data('map-zoom'); 15 var mapTitle = $(this).data('map-title'); 16 17 // defined default style 18 var styles = [ 19 { 20 "featureType": "administrative", 21 "elementType": "labels.text.fill", 22 "stylers": [ 23 { 24 "color": "#444444" 25 } 26 ] 27 }, 28 { 29 "featureType": "landscape", 30 "elementType": "all", 31 "stylers": [ 32 { 33 "color": "#f2f2f2" 34 } 35 ] 36 }, 37 { 38 "featureType": "poi", 39 "elementType": "all", 40 "stylers": [ 41 { 42 "visibility": "off" 43 } 44 ] 45 }, 46 { 47 "featureType": "road", 48 "elementType": "all", 49 "stylers": [ 50 { 51 "saturation": -100 52 }, 53 { 54 "lightness": 45 55 } 56 ] 57 }, 58 { 59 "featureType": "road.highway", 60 "elementType": "all", 61 "stylers": [ 62 { 63 "visibility": "simplified" 64 } 65 ] 66 }, 67 { 68 "featureType": "road.arterial", 69 "elementType": "labels.icon", 70 "stylers": [ 71 { 72 "visibility": "off" 73 } 74 ] 75 }, 76 { 77 "featureType": "transit", 78 "elementType": "all", 79 "stylers": [ 80 { 81 "visibility": "off" 82 } 83 ] 84 }, 85 { 86 "featureType": "water", 87 "elementType": "all", 88 "stylers": [ 89 { 90 "color": "#f1f1f1" 91 }, 92 { 93 "visibility": "on" 94 } 95 ] 96 } 97 ]; 98 99 100 // if zoom not defined the zoom value will be 15; 101 if (!mapZoom) { 102 var mapZoom = 11; 103 }; 104 // init map 105 var map; 106 map = new GMaps({ 107 div: '#'+mapName, 108 scrollwheel: false, 109 lat: mapLat, 110 lng: mapLng, 111 styles: styles, 112 zoom: mapZoom 113 }); 114 // if icon path setted then show marker 115 if(iconPath) { 116 map.addMarker({ 117 icon: iconPath, 118 lat: mapLat, 119 lng: mapLng, 120 title: mapTitle 121 }); 122 map.addMarker({ 123 icon: iconPath, 124 lat: 40.700843, //you can 125 lng: 40.700843, 126 title: "New York" 127 }); 128 } 129 }); 130 }; 131} 132 133 134 135// instance of fuction while Document ready event
136jQuery(document).on('ready', function () { 137 (function ($) { 138 gMap(); 139 })(jQuery); 140}); 141 142})(window.jQuery);
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.