1(function ($) { 2 "use strict"; 3// When the window has finished loading create our google map below 4 $.fn.iwMap = function () { 5 $(this).each(function () { 6 var mapObj = this, 7 map_style = $(this).data('map_style'), 8 title = $(this).data('title'), 9 description = $(this).data('description'), 10 icon = $(this).data('marker_icon'), 11 image = $(this).data('image'), 12 lat = $(this).data('lat'), 13 long = $(this).data('long'), 14 width = $(this).data('width'), 15 height = $(this).data('height'), 16 panby_x = $(this).data('panby_x'), 17 panby_y = $(this).data('panby_y'); 18 var loc = new google.maps.LatLng(lat, long); 19 //$(this).addClass('map-rendered'); 20 21 if(!map_style){ 22 map_style = 'style1'; 23 } 24 25 var mapOptions = { 26 //zoomControl: false, 27 //scaleControl: false, 28 //panControl: false, 29 scrollwheel: false, 30 //disableDoubleClickZoom: true, 31 draggable: true, 32 // How zoomed in you want the map to start at (always required) 33 zoom: $(this).data('zoom'), 34 // The latitude and longitude to center the map (always required) 35 center: loc, 36 // How you would like to style the map. 37 // This is where you would paste any style found on Snazzy Maps. 38 styles: 39 [ 40 {"featureType": "landscape", "elementType": "labels", "stylers": [{"color": "#fbfbfb"},{"visibility": "off"}]}, 41 {"featureType": "transit", "elementType": "labels", "stylers": [{"visibility": "off"}]}, 42 {"featureType": "poi", "elementType": "labels", "stylers": [{"visibility": "off"}]}, 43 {"featureType": "water", "elementType": "labels", "stylers": [{"color": "#f6f6f6"},{"visibility": "off"}]}, 44 {"featureType": "road", "elementType": "labels.icon", "stylers": [{"visibility": "off"}]}, 45 {"stylers": [{"hue": "#00aaff"}, {"saturation": -100}, {"gamma": 2.15}, {"lightness": 12}]}, 46 {"featureType": "road", "elementType": "labels.text.fill", "stylers": [{"color": "#d3d3d3"},{"visibility": "on"}, 47 {"lightness": 24}]}, {"featureType": "road", "elementType": "geometry", "stylers": [{"lightness": 57}]} 48 ] 49 50 }; 51 52 /* if(map_style == 'style5' || map_style == 'style3'){ 53 var mapOptions = { 54 scrollwheel: false, 55 //disableDoubleClickZoom: true, 56 draggable: true, 57 // How zoomed in you want the map to start at (always required) 58 zoom: $(this).data('zoom'), 59 // The latitude and longitude to center the map (always required) 60 center: loc, 61 // How you would like to style the map. 62 // This is where you would paste any style found on Snazzy Maps. 63 styles: [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}] 64 }; 65 } 66 */ 67 68 var map = new google.maps.Map($(this).find('.map-view').get(0), mapOptions); 69 70 if(panby_x != '' || panby_y != ''){ 71 map.panBy(panby_x, panby_y); 72 } 73 74 var marker_options = { 75 position: loc, 76 map: map 77 }; 78 79 if(title){ 80 marker_options.title = title; 81 } 82 if(icon){ 83 marker_options.icon = icon; 84 //marker_options.icon.url = icon;
85 //marker_options.icon.anchor = new google.maps.Point(26, -160); 86 } 87 88 var marker = new google.maps.Marker(marker_options); 89 90 91 /* 92 switch(map_style){ 93 case 'style5': 94 case 'style5': 95 var content = ''; 96 if(title || description){ 97 content += '<div class="info">'; 98 if(description){ 99 content += '<p>'+description+'</p>'; 100 } 101 if(title){ 102 content += '<h3>'+title+'</h3>'; 103 } 104 content += '</div>'; 105 } 106 107 var infobox = new InfoBox({ 108 content: content, 109 disableAutoPan: false, 110 maxWidth: 150, 111 //pixelOffset: new google.maps.Size(-230, -450), 112 pixelOffset: new google.maps.Size(0 - (width/2) + 5, 0 - height - 25), 113 zIndex: null, 114 boxStyle: { 115 opacity: 1, 116 width: width+'px', 117 //height: height+'px', 118 }, 119 closeBoxMargin: "0 0 -15px 0", 120 closeBoxURL: false, 121 infoBoxClearance: new google.maps.Size(1, 1) 122 }); 123 124 //map.panBy(0, -160); 125 infobox.open(map, marker); 126 google.maps.event.addListener(marker, 'click', function () { 127 infobox.open(map, this); 128 //map.panTo(loc); 129 }); 130 131 break; 132 default : 133 if(image){ 134 var content = ''; 135 if(image){ 136 content += '<img src="'+image+'" alt="">'; 137 } 138 if(title || description){ 139 content += '<div class="info">'; 140 if(title){ 141 content += '<h3>'+title+'</h3>'; 142 } 143 if(description){ 144 content += '<p>'+description+'</p>'; 145 } 146 content += '</div>'; 147 } 148 149 var infobox = new InfoBox({ 150 content: content, 151 disableAutoPan: false, 152 maxWidth: 150, 153 //pixelOffset: new google.maps.Size(-230, -450), 154 pixelOffset: new google.maps.Size(0 - (width/2) + 5, 0 - height - 70), 155 zIndex: null, 156 boxStyle: { 157 opacity: 1, 158 width: width+'px', 159 //height: height+'px', 160 }, 161 closeBoxMargin: "0 0 -15px 0", 162 closeBoxURL: "http://www.google.com/intl/en_us/mapfiles/close.gif", 163 infoBoxClearance: new google.maps.Size(1, 1) 164 }); 165 //map.panBy(0, -160); 166 infobox.open(map, marker); 167 google.maps.event.addListener(marker, 'click', function () { 168 infobox.open(map, this); 169 //map.panTo(loc); 170 }); 171 } 172 else 173 { 174 var markerinfowindow = new google.maps.InfoWindow(); 175 markerinfowindow.setContent(description); 176 //map.panBy(-300, 0); 177 google.maps.event.addListener(marker, 'click', function () { 178 markerinfowindow.open(map, marker); 179 }); 180 } 181 break; 182 } */ 183 184 }); 185 }; 186 $(window).load(function(){$(".map-contain").iwMap();}); 187})(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.