1function guideMap(guider) { 2 3 var defaultZoomedIn = 10; 4 var defaultZoomedOut = 5; 5 6 var locations = []; 7 8 9 var location_array = []; 10 $.ajax({ 11 'type': 'get', 12 'contentType': 'application/x-www-form-urlencoded; charset=UTF-8', 13 'cache': false, 14 'url': '/guides/' + guider + '.json', 15 'dataType': 'json', 16 'timeout': 50000, 17 'async': false 18 }).done(function (response) { 19 var asd = response.data; 20 for (var i = 0; i < asd.length; i++) { 21 var guide = asd[i].guides_list[0]; 22 location_array.push(guide); 23 } 24 for (var j = 0; j < location_array.length; j++) { 25 var arr = Object.values(location_array[j]); // ['xxx', 1] 26 locations.push(arr) 27 } 28 29 }).fail(function (error) { 30 console.log(error); 31 }); 32 33 var map = new google.maps.Map(document.getElementById('gmap' + guider), { 34 zoom: 5, 35 center: new google.maps.LatLng(locations[0][0], locations[0][1]), 36 styles: [ 37 { 38 "featureType": "all", 39 "elementType": "labels.text.fill", 40 "stylers": [ 41 { 42 "saturation": 36 43 }, 44 { 45 "color": "#333333" 46 }, 47 { 48 "lightness": 40 49 } 50 ] 51 }, 52 { 53 "featureType": "all", 54 "elementType": "labels.text.stroke", 55 "stylers": [ 56 { 57 "visibility": "on" 58 }, 59 { 60 "color": "#ffffff" 61 }, 62 { 63 "lightness": 16 64 } 65 ] 66 }, 67 { 68 "featureType": "all", 69 "elementType": "labels.icon", 70 "stylers": [ 71 { 72 "visibility": "off" 73 } 74 ] 75 }, 76 { 77 "featureType": "administrative", 78 "elementType": "geometry", 79 "stylers": [ 80 { 81 "visibility": "on" 82 } 83 ] 84 }, 85 { 86 "featureType": "administrative", 87 "elementType": "geometry.fill", 88 "stylers": [ 89 { 90 "color": "#fefefe" 91 }, 92 { 93 "lightness": 20 94 } 95 ] 96 }, 97 { 98 "featureType": "administrative", 99 "elementType": "geometry.stroke", 100 "stylers": [ 101 { 102 "color": "#fefefe" 103 }, 104 { 105 "lightness": 17 106 }, 107 { 108 "weight": 1.2 109 } 110 ] 111 }, 112 { 113 "featureType": "landscape", 114 "elementType": "geometry", 115 "stylers": [ 116 { 117 "color": "#ebebeb" 118 }, 119 { 120 "lightness": 20 121 } 122 ] 123 }, 124 { 125 "featureType": "landscape", 126 "elementType": "geometry.fill", 127 "stylers": [ 128 { 129 "visibility": "on" 130 } 131 ] 132 }, 133 { 134 "featureType": "landscape", 135 "elementType": "labels.text", 136 "stylers": [ 137 { 138 "visibility": "off" 139 } 140 ] 141 }, 142 { 143 "featureType": "poi", 144 "elementType": "geometry", 145 "stylers": [ 146 { 147 "color": "#f5f5f5" 148 }, 149 { 150 "lightness": 21 151 } 152 ] 153 }, 154 { 155 "featureType": "poi.park", 156 "elementType": "geometry", 157 "stylers": [ 158 { 159 "color": "#dedede" 160 }, 161 { 162 "lightness": 21 163 } 164 ] 165 }, 166 { 167 "featureType": "road", 168 "elementType": "geometry", 169 "stylers": [ 170 { 171 "visibility": "on" 172 }, 173 { 174 "weight": "1.07" 175 } 176 ] 177 }, 178 { 179 "featureType": "road", 180 "elementType": "labels", 181 "stylers": [ 182 { 183 "visibility": "on" 184 } 185 ] 186 }, 187 { 188 "featureType": "road.highway", 189 "elementType": "geometry", 190 "stylers": [ 191 { 192 "visibility": "on" 193 } 194 ] 195 }, 196 { 197 "featureType": "road.highway", 198 "elementType": "geometry.fill", 199 "stylers": [ 200 { 201 "color": "#ffffff" 202 }, 203 { 204 "lightness": 17 205 }, 206 { 207 "visibility": "on" 208 } 209 ] 210 }, 211 { 212 "featureType": "road.highway", 213 "elementType": "geometry.stroke", 214 "stylers": [ 215 { 216 "color": "#ffffff" 217 }, 218 { 219 "lightness": 29 220 }, 221 { 222 "weight": 0.2 223 } 224 ] 225 }, 226 { 227 "featureType": "road.highway", 228 "elementType": "labels", 229 "stylers": [ 230 { 231 "visibility": "off" 232 } 233 ] 234 }, 235 { 236 "featureType": "road.arterial", 237 "elementType": "geometry", 238 "stylers": [ 239 { 240 "color": "#ffffff" 241 }, 242 { 243 "lightness": 18 244 }, 245 { 246 "visibility": "on" 247 } 248 ] 249 }, 250 { 251 "featureType": "road.local", 252 "elementType": "geometry", 253 "stylers": [ 254 { 255 "color": "#ffffff" 256 }, 257 { 258 "lightness": 16 259 } 260 ] 261 }, 262 { 263 "featureType": "transit", 264 "elementType": "geometry", 265 "stylers": [ 266 { 267 "color": "#f2f2f2" 268 }, 269 { 270 "lightness": 19 271 } 272 ] 273 }, 274 { 275 "featureType": "transit.line", 276 "elementType": "geometry", 277 "stylers": [ 278 { 279 "visibility": "off" 280 } 281 ] 282 }, 283 { 284 "featureType": "water", 285 "elementType": "geometry", 286 "stylers": [ 287 { 288 "color": "#a8ccd3" 289 }, 290 { 291 "lightness": 17 292 } 293 ] 294 } 295 ] 296 , 297 mapTypeId: google.maps.MapTypeId.ROADMAP 298 });
299 300 var infowindow = new google.maps.InfoWindow(); 301 var marker, asz, kd; 302 303 for (asz = 0; asz < locations.length; asz++) { 304 305 marker = new google.maps.Marker({ 306 position: new google.maps.LatLng(locations[asz][0], locations[asz][1]), 307 icon: '/assets/images/template/Map-Location-Icon.png', 308 map: map 309 }); 310 311 google.maps.event.addListener(marker, 'click', (function (marker, kd) { 312 313 return function () { 314 //locations1[i].infowindow1.open(map1, marker1); 315 map.panTo(marker.position); 316 map.setZoom(defaultZoomedIn); 317 } 318 319 })(marker, kd)); 320 321 makeInfoWindowEvent(map, infowindow, "<div style='color:#3f717a;font-size: 16px;font-weight: bold;'>" + locations[asz][2] + "</div><br> " + locations[asz][3] + "<br> " + locations[asz][4] + "<br> <a href='tel:" + locations[asz][5] + "'>" + locations[asz][5] + "</a>", marker); 322 323 324 } 325 326 window.map = map; 327 window.defaultZoomedOut = defaultZoomedOut; 328 329 function makeInfoWindowEvent(map, infowindow, contentString, marker) { 330 google.maps.event.addListener(marker, 'click', function () { 331 infowindow.setContent(contentString); 332 infowindow.open(map, marker); 333 }); 334 } 335 google.maps.event.addListener(map, 'zoom_changed', function () { 336 if (defaultZoomedIn > map.getZoom()) { 337 if (!locations.length) { 338 return; 339 } 340 for (i in locations) { 341 infowindow.close(); 342 } 343 } 344 345 }); 346 347 348} 349 350 351 352 353 354 355function stockistMap(stockist) { 356 357 358 var defaultZoomedIn = 10; 359 var defaultZoomedOut = 5; 360 var locations = []; 361 var location_array = []; 362 363 364 $.ajax({
365 'type': 'get', 366 'contentType': 'application/x-www-form-urlencoded; charset=UTF-8', 367 'cache': false, 368 'url': '/stockist/' + stockist + '.json', 369 'dataType': 'json', 370 beforeSend: function () { 371 $("#loading_stockist").fadeIn(300); 372 }, 373 complete: function () { 374 $("#loading_stockist").fadeOut(500); 375 }, 376 'timeout': 50000, 377 'async': false 378 }).done(function (response) { 379 var asd = response.data; 380 for (var i = 0; i < asd.length; i++) { 381 var stockist = asd[i].stockist_list[0]; 382 location_array.push(stockist); 383 } 384 for (var j = 0; j < location_array.length; j++) { 385 var arr = Object.values(location_array[j]); // ['xxx', 1] 386 console.log(arr); 387 if (arr[0] != null && arr[1] != null) { 388 locations.push(arr) 389 } 390 } 391 392 }).fail(function (error) { 393 console.log(error); 394 }); 395 396 397 var map = new google.maps.Map(document.getElementById('smap' + stockist), { 398 zoom: 5, 399 center: new google.maps.LatLng(locations[0][0], locations[0][1]), 400 styles: [ 401 { 402 "featureType": "all", 403 "elementType": "labels.text.fill", 404 "stylers": [ 405 { 406 "saturation": 36 407 }, 408 { 409 "color": "#333333" 410 }, 411 { 412 "lightness": 40 413 } 414 ] 415 }, 416 { 417 "featureType": "all", 418 "elementType": "labels.text.stroke", 419 "stylers": [ 420 { 421 "visibility": "on" 422 }, 423 { 424 "color": "#ffffff" 425 }, 426 { 427 "lightness": 16 428 } 429 ] 430 }, 431 { 432 "featureType": "all", 433 "elementType": "labels.icon", 434 "stylers": [ 435 { 436 "visibility": "off" 437 } 438 ] 439 }, 440 { 441 "featureType": "administrative", 442 "elementType": "geometry", 443 "stylers": [ 444 { 445 "visibility": "on" 446 } 447 ] 448 }, 449 { 450 "featureType": "administrative", 451 "elementType": "geometry.fill", 452 "stylers": [ 453 { 454 "color": "#fefefe" 455 }, 456 { 457 "lightness": 20 458 } 459 ] 460 }, 461 { 462 "featureType": "administrative", 463 "elementType": "geometry.stroke", 464 "stylers": [ 465 { 466 "color": "#fefefe" 467 }, 468 { 469 "lightness": 17 470 }, 471 { 472 "weight": 1.2 473 } 474 ] 475 }, 476 { 477 "featureType": "landscape", 478 "elementType": "geometry", 479 "stylers": [ 480 { 481 "color": "#ebebeb" 482 }, 483 { 484 "lightness": 20 485 } 486 ] 487 }, 488 { 489 "featureType": "landscape", 490 "elementType": "geometry.fill", 491 "stylers": [ 492 { 493 "visibility": "on" 494 } 495 ] 496 }, 497 { 498 "featureType": "landscape", 499 "elementType": "labels.text", 500 "stylers": [ 501 { 502 "visibility": "off" 503 } 504 ] 505 }, 506 { 507 "featureType": "poi", 508 "elementType": "geometry", 509 "stylers": [ 510 { 511 "color": "#f5f5f5" 512 }, 513 { 514 "lightness": 21 515 } 516 ] 517 }, 518 { 519 "featureType": "poi.park", 520 "elementType": "geometry", 521 "stylers": [ 522 { 523 "color": "#dedede" 524 }, 525 { 526 "lightness": 21 527 } 528 ] 529 }, 530 { 531 "featureType": "road", 532 "elementType": "geometry", 533 "stylers": [ 534 { 535 "visibility": "on" 536 }, 537 { 538 "weight": "1.07" 539 } 540 ] 541 }, 542 { 543 "featureType": "road", 544 "elementType": "labels", 545 "stylers": [ 546 { 547 "visibility": "on" 548 } 549 ] 550 }, 551 { 552 "featureType": "road.highway", 553 "elementType": "geometry", 554 "stylers": [ 555 { 556 "visibility": "on" 557 } 558 ] 559 }, 560 { 561 "featureType": "road.highway", 562 "elementType": "geometry.fill", 563 "stylers": [ 564 { 565 "color": "#ffffff" 566 }, 567 { 568 "lightness": 17 569 }, 570 { 571 "visibility": "on" 572 } 573 ] 574 }, 575 { 576 "featureType": "road.highway", 577 "elementType": "geometry.stroke", 578 "stylers": [ 579 { 580 "color": "#ffffff" 581 }, 582 { 583 "lightness": 29 584 }, 585 { 586 "weight": 0.2 587 } 588 ] 589 }, 590 { 591 "featureType": "road.highway", 592 "elementType": "labels", 593 "stylers": [ 594 { 595 "visibility": "off" 596 } 597 ] 598 }, 599 { 600 "featureType": "road.arterial", 601 "elementType": "geometry", 602 "stylers": [ 603 { 604 "color": "#ffffff" 605 }, 606 { 607 "lightness": 18 608 }, 609 { 610 "visibility": "on" 611 } 612 ] 613 }, 614 { 615 "featureType": "road.local", 616 "elementType": "geometry", 617 "stylers": [ 618 { 619 "color": "#ffffff" 620 }, 621 { 622 "lightness": 16 623 } 624 ] 625 }, 626 { 627 "featureType": "transit", 628 "elementType": "geometry", 629 "stylers": [ 630 { 631 "color": "#f2f2f2" 632 }, 633 { 634 "lightness": 19 635 } 636 ] 637 }, 638 { 639 "featureType": "transit.line", 640 "elementType": "geometry", 641 "stylers": [ 642 { 643 "visibility": "off" 644 } 645 ] 646 }, 647 { 648 "featureType": "water", 649 "elementType": "geometry", 650 "stylers": [ 651 { 652 "color": "#a8ccd3" 653 }, 654 { 655 "lightness": 17 656 } 657 ] 658 } 659 ] 660 , 661 mapTypeId: google.maps.MapTypeId.ROADMAP 662 });
663 664 var infowindow = new google.maps.InfoWindow(); 665 var marker, asz, kd; 666 667 for (asz = 0; asz < locations.length; asz++) { 668 669 marker = new google.maps.Marker({ 670 position: new google.maps.LatLng(locations[asz][0], locations[asz][1]), 671 icon: '/assets/images/template/Map-Location-Icon.png', 672 map: map 673 }); 674 675 google.maps.event.addListener(marker, 'click', (function (marker, kd) { 676 677 return function () { 678 //locations1[i].infowindow1.open(map1, marker1); 679 map.panTo(marker.position); 680 map.setZoom(defaultZoomedIn); 681 } 682 683 })(marker, kd)); 684 685 makeInfoWindowEvent(map, infowindow, "<div style='color:#3f717a;font-size: 16px;font-weight: bold;'>" + locations[asz][2] + "</div><br> " + locations[asz][3] + "<br> " + locations[asz][4] + "<br> <a href='tel:" + locations[asz][5] + "'>" + locations[asz][5] + "</a>", marker); 686 687 688 } 689 690 window.map = map; 691 window.defaultZoomedOut = defaultZoomedOut; 692 693 function makeInfoWindowEvent(map, infowindow, contentString, marker) { 694 google.maps.event.addListener(marker, 'click', function () { 695 infowindow.setContent(contentString); 696 infowindow.open(map, marker); 697 }); 698 } 699 google.maps.event.addListener(map, 'zoom_changed', function () { 700 if (defaultZoomedIn > map.getZoom()) { 701 if (!locations.length) { 702 return; 703 } 704 for (i in locations) { 705 infowindow.close(); 706 } 707 } 708 709 }); 710 711 712} 713 714 715function resetMapZoom() { 716 //alert(defaultZoomedIn); 717 window.map.setZoom(window.defaultZoomedOut); 718} 719 720function filterByAuthor(author) 721{ 722 var author = author.value; 723 $(".blog-filter-by-tag").removeClass("selected-tag"); 724 if ($(window).width() > 768) { 725 $(".blog-cleartag").hide(); 726 } else { 727 $(".blog-cleartag-sm").hide(); 728 } 729 if(author == "") 730 { 731 $(".author-all").show(100); 732 } 733 else 734 { 735 $(".author-all").hide(100); 736 varslug = $(".author-"+author); 737 $(varslug).show(100); 738 } 739 740} 741
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.