vectorCtrl.js 55.9 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086
"use strict";

angular.module('newApp')
  .controller('vectorCtrl', ['$scope', function ($scope) {
      $scope.$on('$viewContentLoaded', function () {


          /**** WORLD MAP ****/
          var latlong = {};
          latlong["AD"] = { "latitude": 42.5, "longitude": 1.5 };
          latlong["AE"] = { "latitude": 24, "longitude": 54 };
          latlong["AF"] = { "latitude": 33, "longitude": 65 };
          latlong["AG"] = { "latitude": 17.05, "longitude": -61.8 };
          latlong["AI"] = { "latitude": 18.25, "longitude": -63.1667 };
          latlong["AL"] = { "latitude": 41, "longitude": 20 };
          latlong["AM"] = { "latitude": 40, "longitude": 45 };
          latlong["AN"] = { "latitude": 12.25, "longitude": -68.75 };
          latlong["AO"] = { "latitude": -12.5, "longitude": 18.5 };
          latlong["AP"] = { "latitude": 35, "longitude": 105 };
          latlong["AQ"] = { "latitude": -90, "longitude": 0 };
          latlong["AR"] = { "latitude": -34, "longitude": -64 };
          latlong["AS"] = { "latitude": -14.3333, "longitude": -170 };
          latlong["AT"] = { "latitude": 47.3333, "longitude": 13.3333 };
          latlong["AU"] = { "latitude": -27, "longitude": 133 };
          latlong["AW"] = { "latitude": 12.5, "longitude": -69.9667 };
          latlong["AZ"] = { "latitude": 40.5, "longitude": 47.5 };
          latlong["BA"] = { "latitude": 44, "longitude": 18 };
          latlong["BB"] = { "latitude": 13.1667, "longitude": -59.5333 };
          latlong["BD"] = { "latitude": 24, "longitude": 90 };
          latlong["BE"] = { "latitude": 50.8333, "longitude": 4 };
          latlong["BF"] = { "latitude": 13, "longitude": -2 };
          latlong["BG"] = { "latitude": 43, "longitude": 25 };
          latlong["BH"] = { "latitude": 26, "longitude": 50.55 };
          latlong["BI"] = { "latitude": -3.5, "longitude": 30 };
          latlong["BJ"] = { "latitude": 9.5, "longitude": 2.25 };
          latlong["BM"] = { "latitude": 32.3333, "longitude": -64.75 };
          latlong["BN"] = { "latitude": 4.5, "longitude": 114.6667 };
          latlong["BO"] = { "latitude": -17, "longitude": -65 };
          latlong["BR"] = { "latitude": -10, "longitude": -55 };
          latlong["BS"] = { "latitude": 24.25, "longitude": -76 };
          latlong["BT"] = { "latitude": 27.5, "longitude": 90.5 };
          latlong["BV"] = { "latitude": -54.4333, "longitude": 3.4 };
          latlong["BW"] = { "latitude": -22, "longitude": 24 };
          latlong["BY"] = { "latitude": 53, "longitude": 28 };
          latlong["BZ"] = { "latitude": 17.25, "longitude": -88.75 };
          latlong["CA"] = { "latitude": 54, "longitude": -100 };
          latlong["CC"] = { "latitude": -12.5, "longitude": 96.8333 };
          latlong["CD"] = { "latitude": 0, "longitude": 25 };
          latlong["CF"] = { "latitude": 7, "longitude": 21 };
          latlong["CG"] = { "latitude": -1, "longitude": 15 };
          latlong["CH"] = { "latitude": 47, "longitude": 8 };
          latlong["CI"] = { "latitude": 8, "longitude": -5 };
          latlong["CK"] = { "latitude": -21.2333, "longitude": -159.7667 };
          latlong["CL"] = { "latitude": -30, "longitude": -71 };
          latlong["CM"] = { "latitude": 6, "longitude": 12 };
          latlong["CN"] = { "latitude": 35, "longitude": 105 };
          latlong["CO"] = { "latitude": 4, "longitude": -72 };
          latlong["CR"] = { "latitude": 10, "longitude": -84 };
          latlong["CU"] = { "latitude": 21.5, "longitude": -80 };
          latlong["CV"] = { "latitude": 16, "longitude": -24 };
          latlong["CX"] = { "latitude": -10.5, "longitude": 105.6667 };
          latlong["CY"] = { "latitude": 35, "longitude": 33 };
          latlong["CZ"] = { "latitude": 49.75, "longitude": 15.5 };
          latlong["DE"] = { "latitude": 51, "longitude": 9 };
          latlong["DJ"] = { "latitude": 11.5, "longitude": 43 };
          latlong["DK"] = { "latitude": 56, "longitude": 10 };
          latlong["DM"] = { "latitude": 15.4167, "longitude": -61.3333 };
          latlong["DO"] = { "latitude": 19, "longitude": -70.6667 };
          latlong["DZ"] = { "latitude": 28, "longitude": 3 };
          latlong["EC"] = { "latitude": -2, "longitude": -77.5 };
          latlong["EE"] = { "latitude": 59, "longitude": 26 };
          latlong["EG"] = { "latitude": 27, "longitude": 30 };
          latlong["EH"] = { "latitude": 24.5, "longitude": -13 };
          latlong["ER"] = { "latitude": 15, "longitude": 39 };
          latlong["ES"] = { "latitude": 40, "longitude": -4 };
          latlong["ET"] = { "latitude": 8, "longitude": 38 };
          latlong["EU"] = { "latitude": 47, "longitude": 8 };
          latlong["FI"] = { "latitude": 62, "longitude": 26 };
          latlong["FJ"] = { "latitude": -18, "longitude": 175 };
          latlong["FK"] = { "latitude": -51.75, "longitude": -59 };
          latlong["FM"] = { "latitude": 6.9167, "longitude": 158.25 };
          latlong["FO"] = { "latitude": 62, "longitude": -7 };
          latlong["FR"] = { "latitude": 46, "longitude": 2 };
          latlong["GA"] = { "latitude": -1, "longitude": 11.75 };
          latlong["GB"] = { "latitude": 54, "longitude": -2 };
          latlong["GD"] = { "latitude": 12.1167, "longitude": -61.6667 };
          latlong["GE"] = { "latitude": 42, "longitude": 43.5 };
          latlong["GF"] = { "latitude": 4, "longitude": -53 };
          latlong["GH"] = { "latitude": 8, "longitude": -2 };
          latlong["GI"] = { "latitude": 36.1833, "longitude": -5.3667 };
          latlong["GL"] = { "latitude": 72, "longitude": -40 };
          latlong["GM"] = { "latitude": 13.4667, "longitude": -16.5667 };
          latlong["GN"] = { "latitude": 11, "longitude": -10 };
          latlong["GP"] = { "latitude": 16.25, "longitude": -61.5833 };
          latlong["GQ"] = { "latitude": 2, "longitude": 10 };
          latlong["GR"] = { "latitude": 39, "longitude": 22 };
          latlong["GS"] = { "latitude": -54.5, "longitude": -37 };
          latlong["GT"] = { "latitude": 15.5, "longitude": -90.25 };
          latlong["GU"] = { "latitude": 13.4667, "longitude": 144.7833 };
          latlong["GW"] = { "latitude": 12, "longitude": -15 };
          latlong["GY"] = { "latitude": 5, "longitude": -59 };
          latlong["HK"] = { "latitude": 22.25, "longitude": 114.1667 };
          latlong["HM"] = { "latitude": -53.1, "longitude": 72.5167 };
          latlong["HN"] = { "latitude": 15, "longitude": -86.5 };
          latlong["HR"] = { "latitude": 45.1667, "longitude": 15.5 };
          latlong["HT"] = { "latitude": 19, "longitude": -72.4167 };
          latlong["HU"] = { "latitude": 47, "longitude": 20 };
          latlong["ID"] = { "latitude": -5, "longitude": 120 };
          latlong["IE"] = { "latitude": 53, "longitude": -8 };
          latlong["IL"] = { "latitude": 31.5, "longitude": 34.75 };
          latlong["IN"] = { "latitude": 20, "longitude": 77 };
          latlong["IO"] = { "latitude": -6, "longitude": 71.5 };
          latlong["IQ"] = { "latitude": 33, "longitude": 44 };
          latlong["IR"] = { "latitude": 32, "longitude": 53 };
          latlong["IS"] = { "latitude": 65, "longitude": -18 };
          latlong["IT"] = { "latitude": 42.8333, "longitude": 12.8333 };
          latlong["JM"] = { "latitude": 18.25, "longitude": -77.5 };
          latlong["JO"] = { "latitude": 31, "longitude": 36 };
          latlong["JP"] = { "latitude": 36, "longitude": 138 };
          latlong["KE"] = { "latitude": 1, "longitude": 38 };
          latlong["KG"] = { "latitude": 41, "longitude": 75 };
          latlong["KH"] = { "latitude": 13, "longitude": 105 };
          latlong["KI"] = { "latitude": 1.4167, "longitude": 173 };
          latlong["KM"] = { "latitude": -12.1667, "longitude": 44.25 };
          latlong["KN"] = { "latitude": 17.3333, "longitude": -62.75 };
          latlong["KP"] = { "latitude": 40, "longitude": 127 };
          latlong["KR"] = { "latitude": 37, "longitude": 127.5 };
          latlong["KW"] = { "latitude": 29.3375, "longitude": 47.6581 };
          latlong["KY"] = { "latitude": 19.5, "longitude": -80.5 };
          latlong["KZ"] = { "latitude": 48, "longitude": 68 };
          latlong["LA"] = { "latitude": 18, "longitude": 105 };
          latlong["LB"] = { "latitude": 33.8333, "longitude": 35.8333 };
          latlong["LC"] = { "latitude": 13.8833, "longitude": -61.1333 };
          latlong["LI"] = { "latitude": 47.1667, "longitude": 9.5333 };
          latlong["LK"] = { "latitude": 7, "longitude": 81 };
          latlong["LR"] = { "latitude": 6.5, "longitude": -9.5 };
          latlong["LS"] = { "latitude": -29.5, "longitude": 28.5 };
          latlong["LT"] = { "latitude": 55, "longitude": 24 };
          latlong["LU"] = { "latitude": 49.75, "longitude": 6 };
          latlong["LV"] = { "latitude": 57, "longitude": 25 };
          latlong["LY"] = { "latitude": 25, "longitude": 17 };
          latlong["MA"] = { "latitude": 32, "longitude": -5 };
          latlong["MC"] = { "latitude": 43.7333, "longitude": 7.4 };
          latlong["MD"] = { "latitude": 47, "longitude": 29 };
          latlong["ME"] = { "latitude": 42.5, "longitude": 19.4 };
          latlong["MG"] = { "latitude": -20, "longitude": 47 };
          latlong["MH"] = { "latitude": 9, "longitude": 168 };
          latlong["MK"] = { "latitude": 41.8333, "longitude": 22 };
          latlong["ML"] = { "latitude": 17, "longitude": -4 };
          latlong["MM"] = { "latitude": 22, "longitude": 98 };
          latlong["MN"] = { "latitude": 46, "longitude": 105 };
          latlong["MO"] = { "latitude": 22.1667, "longitude": 113.55 };
          latlong["MP"] = { "latitude": 15.2, "longitude": 145.75 };
          latlong["MQ"] = { "latitude": 14.6667, "longitude": -61 };
          latlong["MR"] = { "latitude": 20, "longitude": -12 };
          latlong["MS"] = { "latitude": 16.75, "longitude": -62.2 };
          latlong["MT"] = { "latitude": 35.8333, "longitude": 14.5833 };
          latlong["MU"] = { "latitude": -20.2833, "longitude": 57.55 };
          latlong["MV"] = { "latitude": 3.25, "longitude": 73 };
          latlong["MW"] = { "latitude": -13.5, "longitude": 34 };
          latlong["MX"] = { "latitude": 23, "longitude": -102 };
          latlong["MY"] = { "latitude": 2.5, "longitude": 112.5 };
          latlong["MZ"] = { "latitude": -18.25, "longitude": 35 };
          latlong["NA"] = { "latitude": -22, "longitude": 17 };
          latlong["NC"] = { "latitude": -21.5, "longitude": 165.5 };
          latlong["NE"] = { "latitude": 16, "longitude": 8 };
          latlong["NF"] = { "latitude": -29.0333, "longitude": 167.95 };
          latlong["NG"] = { "latitude": 10, "longitude": 8 };
          latlong["NI"] = { "latitude": 13, "longitude": -85 };
          latlong["NL"] = { "latitude": 52.5, "longitude": 5.75 };
          latlong["NO"] = { "latitude": 62, "longitude": 10 };
          latlong["NP"] = { "latitude": 28, "longitude": 84 };
          latlong["NR"] = { "latitude": -0.5333, "longitude": 166.9167 };
          latlong["NU"] = { "latitude": -19.0333, "longitude": -169.8667 };
          latlong["NZ"] = { "latitude": -41, "longitude": 174 };
          latlong["OM"] = { "latitude": 21, "longitude": 57 };
          latlong["PA"] = { "latitude": 9, "longitude": -80 };
          latlong["PE"] = { "latitude": -10, "longitude": -76 };
          latlong["PF"] = { "latitude": -15, "longitude": -140 };
          latlong["PG"] = { "latitude": -6, "longitude": 147 };
          latlong["PH"] = { "latitude": 13, "longitude": 122 };
          latlong["PK"] = { "latitude": 30, "longitude": 70 };
          latlong["PL"] = { "latitude": 52, "longitude": 20 };
          latlong["PM"] = { "latitude": 46.8333, "longitude": -56.3333 };
          latlong["PR"] = { "latitude": 18.25, "longitude": -66.5 };
          latlong["PS"] = { "latitude": 32, "longitude": 35.25 };
          latlong["PT"] = { "latitude": 39.5, "longitude": -8 };
          latlong["PW"] = { "latitude": 7.5, "longitude": 134.5 };
          latlong["PY"] = { "latitude": -23, "longitude": -58 };
          latlong["QA"] = { "latitude": 25.5, "longitude": 51.25 };
          latlong["RE"] = { "latitude": -21.1, "longitude": 55.6 };
          latlong["RO"] = { "latitude": 46, "longitude": 25 };
          latlong["RS"] = { "latitude": 44, "longitude": 21 };
          latlong["RU"] = { "latitude": 60, "longitude": 100 };
          latlong["RW"] = { "latitude": -2, "longitude": 30 };
          latlong["SA"] = { "latitude": 25, "longitude": 45 };
          latlong["SB"] = { "latitude": -8, "longitude": 159 };
          latlong["SC"] = { "latitude": -4.5833, "longitude": 55.6667 };
          latlong["SD"] = { "latitude": 15, "longitude": 30 };
          latlong["SE"] = { "latitude": 62, "longitude": 15 };
          latlong["SG"] = { "latitude": 1.3667, "longitude": 103.8 };
          latlong["SH"] = { "latitude": -15.9333, "longitude": -5.7 };
          latlong["SI"] = { "latitude": 46, "longitude": 15 };
          latlong["SJ"] = { "latitude": 78, "longitude": 20 };
          latlong["SK"] = { "latitude": 48.6667, "longitude": 19.5 };
          latlong["SL"] = { "latitude": 8.5, "longitude": -11.5 };
          latlong["SM"] = { "latitude": 43.7667, "longitude": 12.4167 };
          latlong["SN"] = { "latitude": 14, "longitude": -14 };
          latlong["SO"] = { "latitude": 10, "longitude": 49 };
          latlong["SR"] = { "latitude": 4, "longitude": -56 };
          latlong["ST"] = { "latitude": 1, "longitude": 7 };
          latlong["SV"] = { "latitude": 13.8333, "longitude": -88.9167 };
          latlong["SY"] = { "latitude": 35, "longitude": 38 };
          latlong["SZ"] = { "latitude": -26.5, "longitude": 31.5 };
          latlong["TC"] = { "latitude": 21.75, "longitude": -71.5833 };
          latlong["TD"] = { "latitude": 15, "longitude": 19 };
          latlong["TF"] = { "latitude": -43, "longitude": 67 };
          latlong["TG"] = { "latitude": 8, "longitude": 1.1667 };
          latlong["TH"] = { "latitude": 15, "longitude": 100 };
          latlong["TJ"] = { "latitude": 39, "longitude": 71 };
          latlong["TK"] = { "latitude": -9, "longitude": -172 };
          latlong["TM"] = { "latitude": 40, "longitude": 60 };
          latlong["TN"] = { "latitude": 34, "longitude": 9 };
          latlong["TO"] = { "latitude": -20, "longitude": -175 };
          latlong["TR"] = { "latitude": 39, "longitude": 35 };
          latlong["TT"] = { "latitude": 11, "longitude": -61 };
          latlong["TV"] = { "latitude": -8, "longitude": 178 };
          latlong["TW"] = { "latitude": 23.5, "longitude": 121 };
          latlong["TZ"] = { "latitude": -6, "longitude": 35 };
          latlong["UA"] = { "latitude": 49, "longitude": 32 };
          latlong["UG"] = { "latitude": 1, "longitude": 32 };
          latlong["UM"] = { "latitude": 19.2833, "longitude": 166.6 };
          latlong["US"] = { "latitude": 38, "longitude": -97 };
          latlong["UY"] = { "latitude": -33, "longitude": -56 };
          latlong["UZ"] = { "latitude": 41, "longitude": 64 };
          latlong["VA"] = { "latitude": 41.9, "longitude": 12.45 };
          latlong["VC"] = { "latitude": 13.25, "longitude": -61.2 };
          latlong["VE"] = { "latitude": 8, "longitude": -66 };
          latlong["VG"] = { "latitude": 18.5, "longitude": -64.5 };
          latlong["VI"] = { "latitude": 18.3333, "longitude": -64.8333 };
          latlong["VN"] = { "latitude": 16, "longitude": 106 };
          latlong["VU"] = { "latitude": -16, "longitude": 167 };
          latlong["WF"] = { "latitude": -13.3, "longitude": -176.2 };
          latlong["WS"] = { "latitude": -13.5833, "longitude": -172.3333 };
          latlong["YE"] = { "latitude": 15, "longitude": 48 };
          latlong["YT"] = { "latitude": -12.8333, "longitude": 45.1667 };
          latlong["ZA"] = { "latitude": -29, "longitude": 24 };
          latlong["ZM"] = { "latitude": -15, "longitude": 30 };
          latlong["ZW"] = { "latitude": -20, "longitude": 30 };

          var mapData = [
              { "code": "AF", "name": "Afghanistan", "value": 32358260, "color": "#eea638" },
              { "code": "AL", "name": "Albania", "value": 3215988, "color": "#d8854f" },
              { "code": "DZ", "name": "Algeria", "value": 35980193, "color": "#de4c4f" },
              { "code": "AO", "name": "Angola", "value": 19618432, "color": "#de4c4f" },
              { "code": "AR", "name": "Argentina", "value": 40764561, "color": "#86a965" },
              { "code": "AM", "name": "Armenia", "value": 3100236, "color": "#d8854f" },
              { "code": "AU", "name": "Australia", "value": 22605732, "color": "#8aabb0" },
              { "code": "AT", "name": "Austria", "value": 8413429, "color": "#d8854f" },
              { "code": "AZ", "name": "Azerbaijan", "value": 9306023, "color": "#d8854f" },
              { "code": "BH", "name": "Bahrain", "value": 1323535, "color": "#eea638" },
              { "code": "BD", "name": "Bangladesh", "value": 150493658, "color": "#eea638" },
              { "code": "BY", "name": "Belarus", "value": 9559441, "color": "#d8854f" },
              { "code": "BE", "name": "Belgium", "value": 10754056, "color": "#d8854f" },
              { "code": "BJ", "name": "Benin", "value": 9099922, "color": "#de4c4f" },
              { "code": "BT", "name": "Bhutan", "value": 738267, "color": "#eea638" },
              { "code": "BO", "name": "Bolivia", "value": 10088108, "color": "#86a965" },
              { "code": "BA", "name": "Bosnia and Herzegovina", "value": 3752228, "color": "#d8854f" },
              { "code": "BW", "name": "Botswana", "value": 2030738, "color": "#de4c4f" },
              { "code": "BR", "name": "Brazil", "value": 196655014, "color": "#86a965" },
              { "code": "BN", "name": "Brunei", "value": 405938, "color": "#eea638" },
              { "code": "BG", "name": "Bulgaria", "value": 7446135, "color": "#d8854f" },
              { "code": "BF", "name": "Burkina Faso", "value": 16967845, "color": "#de4c4f" },
              { "code": "BI", "name": "Burundi", "value": 8575172, "color": "#de4c4f" },
              { "code": "KH", "name": "Cambodia", "value": 14305183, "color": "#eea638" },
              { "code": "CM", "name": "Cameroon", "value": 20030362, "color": "#de4c4f" },
              { "code": "CA", "name": "Canada", "value": 34349561, "color": "#a7a737" },
              { "code": "CV", "name": "Cape Verde", "value": 500585, "color": "#de4c4f" },
              { "code": "CF", "name": "Central African Rep.", "value": 4486837, "color": "#de4c4f" },
              { "code": "TD", "name": "Chad", "value": 11525496, "color": "#de4c4f" },
              { "code": "CL", "name": "Chile", "value": 17269525, "color": "#86a965" },
              { "code": "CN", "name": "China", "value": 1347565324, "color": "#eea638" },
              { "code": "CO", "name": "Colombia", "value": 46927125, "color": "#86a965" },
              { "code": "KM", "name": "Comoros", "value": 753943, "color": "#de4c4f" },
              { "code": "CD", "name": "Congo, Dem. Rep.", "value": 67757577, "color": "#de4c4f" },
              { "code": "CG", "name": "Congo, Rep.", "value": 4139748, "color": "#de4c4f" },
              { "code": "CR", "name": "Costa Rica", "value": 4726575, "color": "#a7a737" },
              { "code": "CI", "name": "Cote d'Ivoire", "value": 20152894, "color": "#de4c4f" },
              { "code": "HR", "name": "Croatia", "value": 4395560, "color": "#d8854f" },
              { "code": "CU", "name": "Cuba", "value": 11253665, "color": "#a7a737" },
              { "code": "CY", "name": "Cyprus", "value": 1116564, "color": "#d8854f" },
              { "code": "CZ", "name": "Czech Rep.", "value": 10534293, "color": "#d8854f" },
              { "code": "DK", "name": "Denmark", "value": 5572594, "color": "#d8854f" },
              { "code": "DJ", "name": "Djibouti", "value": 905564, "color": "#de4c4f" },
              { "code": "DO", "name": "Dominican Rep.", "value": 10056181, "color": "#a7a737" },
              { "code": "EC", "name": "Ecuador", "value": 14666055, "color": "#86a965" },
              { "code": "EG", "name": "Egypt", "value": 82536770, "color": "#de4c4f" },
              { "code": "SV", "name": "El Salvador", "value": 6227491, "color": "#a7a737" },
              { "code": "GQ", "name": "Equatorial Guinea", "value": 720213, "color": "#de4c4f" },
              { "code": "ER", "name": "Eritrea", "value": 5415280, "color": "#de4c4f" },
              { "code": "EE", "name": "Estonia", "value": 1340537, "color": "#d8854f" },
              { "code": "ET", "name": "Ethiopia", "value": 84734262, "color": "#de4c4f" },
              { "code": "FJ", "name": "Fiji", "value": 868406, "color": "#8aabb0" },
              { "code": "FI", "name": "Finland", "value": 5384770, "color": "#d8854f" },
              { "code": "FR", "name": "France", "value": 63125894, "color": "#d8854f" },
              { "code": "GA", "name": "Gabon", "value": 1534262, "color": "#de4c4f" },
              { "code": "GM", "name": "Gambia", "value": 1776103, "color": "#de4c4f" },
              { "code": "GE", "name": "Georgia", "value": 4329026, "color": "#d8854f" },
              { "code": "DE", "name": "Germany", "value": 82162512, "color": "#d8854f" },
              { "code": "GH", "name": "Ghana", "value": 24965816, "color": "#de4c4f" },
              { "code": "GR", "name": "Greece", "value": 11390031, "color": "#d8854f" },
              { "code": "GT", "name": "Guatemala", "value": 14757316, "color": "#a7a737" },
              { "code": "GN", "name": "Guinea", "value": 10221808, "color": "#de4c4f" },
              { "code": "GW", "name": "Guinea-Bissau", "value": 1547061, "color": "#de4c4f" },
              { "code": "GY", "name": "Guyana", "value": 756040, "color": "#86a965" },
              { "code": "HT", "name": "Haiti", "value": 10123787, "color": "#a7a737" },
              { "code": "HN", "name": "Honduras", "value": 7754687, "color": "#a7a737" },
              { "code": "HK", "name": "Hong Kong, China", "value": 7122187, "color": "#eea638" },
              { "code": "HU", "name": "Hungary", "value": 9966116, "color": "#d8854f" },
              { "code": "IS", "name": "Iceland", "value": 324366, "color": "#d8854f" },
              { "code": "IN", "name": "India", "value": 1241491960, "color": "#eea638" },
              { "code": "ID", "name": "Indonesia", "value": 242325638, "color": "#eea638" },
              { "code": "IR", "name": "Iran", "value": 74798599, "color": "#eea638" },
              { "code": "IQ", "name": "Iraq", "value": 32664942, "color": "#eea638" },
              { "code": "IE", "name": "Ireland", "value": 4525802, "color": "#d8854f" },
              { "code": "IL", "name": "Israel", "value": 7562194, "color": "#eea638" },
              { "code": "IT", "name": "Italy", "value": 60788694, "color": "#d8854f" },
              { "code": "JM", "name": "Jamaica", "value": 2751273, "color": "#a7a737" },
              { "code": "JP", "name": "Japan", "value": 126497241, "color": "#eea638" },
              { "code": "JO", "name": "Jordan", "value": 6330169, "color": "#eea638" },
              { "code": "KZ", "name": "Kazakhstan", "value": 16206750, "color": "#eea638" },
              { "code": "KE", "name": "Kenya", "value": 41609728, "color": "#de4c4f" },
              { "code": "KR", "name": "Korea, Dem. Rep.", "value": 24451285, "color": "#eea638" },
              { "code": "KP", "name": "Korea, Rep.", "value": 48391343, "color": "#eea638" },
              { "code": "KW", "name": "Kuwait", "value": 2818042, "color": "#eea638" },
              { "code": "KG", "name": "Kyrgyzstan", "value": 5392580, "color": "#eea638" },
              { "code": "LA", "name": "Laos", "value": 6288037, "color": "#eea638" },
              { "code": "LV", "name": "Latvia", "value": 2243142, "color": "#d8854f" },
              { "code": "LB", "name": "Lebanon", "value": 4259405, "color": "#eea638" },
              { "code": "LS", "name": "Lesotho", "value": 2193843, "color": "#de4c4f" },
              { "code": "LR", "name": "Liberia", "value": 4128572, "color": "#de4c4f" },
              { "code": "LY", "name": "Libya", "value": 6422772, "color": "#de4c4f" },
              { "code": "LT", "name": "Lithuania", "value": 3307481, "color": "#d8854f" },
              { "code": "LU", "name": "Luxembourg", "value": 515941, "color": "#d8854f" },
              { "code": "MK", "name": "Macedonia, FYR", "value": 2063893, "color": "#d8854f" },
              { "code": "MG", "name": "Madagascar", "value": 21315135, "color": "#de4c4f" },
              { "code": "MW", "name": "Malawi", "value": 15380888, "color": "#de4c4f" },
              { "code": "MY", "name": "Malaysia", "value": 28859154, "color": "#eea638" },
              { "code": "ML", "name": "Mali", "value": 15839538, "color": "#de4c4f" },
              { "code": "MR", "name": "Mauritania", "value": 3541540, "color": "#de4c4f" },
              { "code": "MU", "name": "Mauritius", "value": 1306593, "color": "#de4c4f" },
              { "code": "MX", "name": "Mexico", "value": 114793341, "color": "#a7a737" },
              { "code": "MD", "name": "Moldova", "value": 3544864, "color": "#d8854f" },
              { "code": "MN", "name": "Mongolia", "value": 2800114, "color": "#eea638" },
              { "code": "ME", "name": "Montenegro", "value": 632261, "color": "#d8854f" },
              { "code": "MA", "name": "Morocco", "value": 32272974, "color": "#de4c4f" },
              { "code": "MZ", "name": "Mozambique", "value": 23929708, "color": "#de4c4f" },
              { "code": "MM", "name": "Myanmar", "value": 48336763, "color": "#eea638" },
              { "code": "NA", "name": "Namibia", "value": 2324004, "color": "#de4c4f" },
              { "code": "NP", "name": "Nepal", "value": 30485798, "color": "#eea638" },
              { "code": "NL", "name": "Netherlands", "value": 16664746, "color": "#d8854f" },
              { "code": "NZ", "name": "New Zealand", "value": 4414509, "color": "#8aabb0" },
              { "code": "NI", "name": "Nicaragua", "value": 5869859, "color": "#a7a737" },
              { "code": "NE", "name": "Niger", "value": 16068994, "color": "#de4c4f" },
              { "code": "NG", "name": "Nigeria", "value": 162470737, "color": "#de4c4f" },
              { "code": "NO", "name": "Norway", "value": 4924848, "color": "#d8854f" },
              { "code": "OM", "name": "Oman", "value": 2846145, "color": "#eea638" },
              { "code": "PK", "name": "Pakistan", "value": 176745364, "color": "#eea638" },
              { "code": "PA", "name": "Panama", "value": 3571185, "color": "#a7a737" },
              { "code": "PG", "name": "Papua New Guinea", "value": 7013829, "color": "#8aabb0" },
              { "code": "PY", "name": "Paraguay", "value": 6568290, "color": "#86a965" },
              { "code": "PE", "name": "Peru", "value": 29399817, "color": "#86a965" },
              { "code": "PH", "name": "Philippines", "value": 94852030, "color": "#eea638" },
              { "code": "PL", "name": "Poland", "value": 38298949, "color": "#d8854f" },
              { "code": "PT", "name": "Portugal", "value": 10689663, "color": "#d8854f" },
              { "code": "PR", "name": "Puerto Rico", "value": 3745526, "color": "#a7a737" },
              { "code": "QA", "name": "Qatar", "value": 1870041, "color": "#eea638" },
              { "code": "RO", "name": "Romania", "value": 21436495, "color": "#d8854f" },
              { "code": "RU", "name": "Russia", "value": 142835555, "color": "#d8854f" },
              { "code": "RW", "name": "Rwanda", "value": 10942950, "color": "#de4c4f" },
              { "code": "SA", "name": "Saudi Arabia", "value": 28082541, "color": "#eea638" },
              { "code": "SN", "name": "Senegal", "value": 12767556, "color": "#de4c4f" },
              { "code": "RS", "name": "Serbia", "value": 9853969, "color": "#d8854f" },
              { "code": "SL", "name": "Sierra Leone", "value": 5997486, "color": "#de4c4f" },
              { "code": "SG", "name": "Singapore", "value": 5187933, "color": "#eea638" },
              { "code": "SK", "name": "Slovak Republic", "value": 5471502, "color": "#d8854f" },
              { "code": "SI", "name": "Slovenia", "value": 2035012, "color": "#d8854f" },
              { "code": "SB", "name": "Solomon Islands", "value": 552267, "color": "#8aabb0" },
              { "code": "SO", "name": "Somalia", "value": 9556873, "color": "#de4c4f" },
              { "code": "ZA", "name": "South Africa", "value": 50459978, "color": "#de4c4f" },
              { "code": "ES", "name": "Spain", "value": 46454895, "color": "#d8854f" },
              { "code": "LK", "name": "Sri Lanka", "value": 21045394, "color": "#eea638" },
              { "code": "SD", "name": "Sudan", "value": 34735288, "color": "#de4c4f" },
              { "code": "SR", "name": "Suriname", "value": 529419, "color": "#86a965" },
              { "code": "SZ", "name": "Swaziland", "value": 1203330, "color": "#de4c4f" },
              { "code": "SE", "name": "Sweden", "value": 9440747, "color": "#d8854f" },
              { "code": "CH", "name": "Switzerland", "value": 7701690, "color": "#d8854f" },
              { "code": "SY", "name": "Syria", "value": 20766037, "color": "#eea638" },
              { "code": "TW", "name": "Taiwan", "value": 23072000, "color": "#eea638" },
              { "code": "TJ", "name": "Tajikistan", "value": 6976958, "color": "#eea638" },
              { "code": "TZ", "name": "Tanzania", "value": 46218486, "color": "#de4c4f" },
              { "code": "TH", "name": "Thailand", "value": 69518555, "color": "#eea638" },
              { "code": "TG", "name": "Togo", "value": 6154813, "color": "#de4c4f" },
              { "code": "TT", "name": "Trinidad and Tobago", "value": 1346350, "color": "#a7a737" },
              { "code": "TN", "name": "Tunisia", "value": 10594057, "color": "#de4c4f" },
              { "code": "TR", "name": "Turkey", "value": 73639596, "color": "#d8854f" },
              { "code": "TM", "name": "Turkmenistan", "value": 5105301, "color": "#eea638" },
              { "code": "UG", "name": "Uganda", "value": 34509205, "color": "#de4c4f" },
              { "code": "UA", "name": "Ukraine", "value": 45190180, "color": "#d8854f" },
              { "code": "AE", "name": "United Arab Emirates", "value": 7890924, "color": "#eea638" },
              { "code": "GB", "name": "United Kingdom", "value": 62417431, "color": "#d8854f" },
              { "code": "US", "name": "United States", "value": 313085380, "color": "#a7a737" },
              { "code": "UY", "name": "Uruguay", "value": 3380008, "color": "#86a965" },
              { "code": "UZ", "name": "Uzbekistan", "value": 27760267, "color": "#eea638" },
              { "code": "VE", "name": "Venezuela", "value": 29436891, "color": "#86a965" },
              { "code": "PS", "name": "West Bank and Gaza", "value": 4152369, "color": "#eea638" },
              { "code": "VN", "name": "Vietnam", "value": 88791996, "color": "#eea638" },
              { "code": "YE", "name": "Yemen, Rep.", "value": 24799880, "color": "#eea638" },
              { "code": "ZM", "name": "Zambia", "value": 13474959, "color": "#de4c4f" },
              { "code": "ZW", "name": "Zimbabwe", "value": 12754378, "color": "#de4c4f" }];
          var map;
          var minBulletSize = 3;
          var maxBulletSize = 70;
          var min = Infinity;
          var max = -Infinity;
          AmCharts.theme = AmCharts.themes.black;
          // get min and max values
          for (var i = 0; i < mapData.length; i++) {
              var value = mapData[i].value;
              if (value < min) {
                  min = value;
              }
              if (value > max) {
                  max = value;
              }
          }
          // build map
          map = new AmCharts.AmMap();
          map.pathToImages = "../../../assets/global/plugins/maps-amcharts/ammap/images/";
          map.areasSettings = {
              unlistedAreasColor: "#FFFFFF",
              unlistedAreasAlpha: 0.1
          };
          map.imagesSettings = {
              balloonText: "<span style='font-size:14px;'><b>[[title]]</b>: [[value]]</span>",
              alpha: 0.6
          }
          map.zoomControl = {
              "buttonFillColor": "#39B0CA",
              top: 60
          }
          var dataProvider = {
              mapVar: AmCharts.maps.worldLow,
              images: []
          }
          // create circle for each country
          for (var i = 0; i < mapData.length; i++) {
              var dataItem = mapData[i];
              var value = dataItem.value;
              // calculate size of a bubble
              var size = (value - min) / (max - min) * (maxBulletSize - minBulletSize) + minBulletSize;
              if (size < minBulletSize) {
                  size = minBulletSize;
              }
              var id = dataItem.code;
              dataProvider.images.push({
                  type: "circle",
                  width: size,
                  height: size,
                  color: dataItem.color,
                  longitude: latlong[id].longitude,
                  latitude: latlong[id].latitude,
                  title: dataItem.name,
                  value: value
              });
          }
          map.dataProvider = dataProvider;
          map.write("world-map");

          $(document).on("click", ".panel-header .panel-maximize", function (event) {
              var panel = $(this).parents(".panel:first");
              if (panel.hasClass("maximized")) {
                  map.invalidateSize();
              }
              else {
                  map.invalidateSize();
              }
          });




          /**** USA Map ****/
          var map = AmCharts.makeChart("usa-map", {
              type: "map",
              theme: 'none',
              pathToImages: "http://www.amcharts.com/lib/3/images/",
              imagesSettings: {
                  rollOverColor: "#9371CC",
                  rollOverScale: 3,
                  selectedScale: 3,
                  selectedColor: "#9371CC",
                  color: "#13564e"
              },
              zoomControl: {
                  buttonFillColor: "#39B0CA",
                  top: 60
              },
              areasSettings: {
                  unlistedAreasColor: "#B59CDC",
                  autoZoom: true,
                  rollOverColor: "#56BCD1",
                  color: '#319DB5'
              },
              colorSteps: 10,
              dataProvider: {
                  map: "usaLow",
                  images: [{
                      zoomLevel: 5,
                      scale: 0.5,
                      title: "Brussels",
                      latitude: 50.8371,
                      longitude: 4.3676,
                      rollOverColor: "#9371CC",
                  }, {
                      zoomLevel: 5,
                      scale: 0.5,
                      title: "Moscow",
                      latitude: 55.7558,
                      longitude: 37.6176
                  }, {
                      zoomLevel: 5,
                      scale: 0.5,
                      title: "Madrid",
                      latitude: 40.4167,
                      longitude: -3.7033
                  }, {
                      zoomLevel: 5,
                      scale: 0.5,
                      title: "Peking",
                      latitude: 39.9056,
                      longitude: 116.3958
                  }, {
                      zoomLevel: 5,
                      scale: 0.5,
                      title: "New Delhi",
                      latitude: 28.6353,
                      longitude: 77.2250
                  }],
                  areas: [{
                      id: "US-AL",
                      value: 4447100
                  }, {
                      id: "US-AK",
                      value: 626932
                  }, {
                      id: "US-AZ",
                      value: 5130632
                  }, {
                      id: "US-AR",
                      value: 2673400
                  }, {
                      id: "US-CA",
                      value: 33871648
                  }, {
                      id: "US-CO",
                      value: 4301261
                  }, {
                      id: "US-CT",
                      value: 3405565
                  }, {
                      id: "US-DE",
                      value: 783600
                  }, {
                      id: "US-FL",
                      value: 15982378
                  }, {
                      id: "US-GA",
                      value: 8186453
                  }, {
                      id: "US-HI",
                      value: 1211537
                  }, {
                      id: "US-ID",
                      value: 1293953
                  }, {
                      id: "US-IL",
                      value: 12419293
                  }, {
                      id: "US-IN",
                      value: 6080485
                  }, {
                      id: "US-IA",
                      value: 2926324
                  }, {
                      id: "US-KS",
                      value: 2688418
                  }, {
                      id: "US-KY",
                      value: 4041769
                  }, {
                      id: "US-LA",
                      value: 4468976
                  }, {
                      id: "US-ME",
                      value: 1274923
                  }, {
                      id: "US-MD",
                      value: 5296486
                  }, {
                      id: "US-MA",
                      value: 6349097
                  }, {
                      id: "US-MI",
                      value: 9938444
                  }, {
                      id: "US-MN",
                      value: 4919479
                  }, {
                      id: "US-MS",
                      value: 2844658
                  }, {
                      id: "US-MO",
                      value: 5595211
                  }, {
                      id: "US-MT",
                      value: 902195
                  }, {
                      id: "US-NE",
                      value: 1711263
                  }, {
                      id: "US-NV",
                      value: 1998257
                  }, {
                      id: "US-NH",
                      value: 1235786
                  }, {
                      id: "US-NJ",
                      value: 8414350
                  }, {
                      id: "US-NM",
                      value: 1819046
                  }, {
                      id: "US-NY",
                      value: 18976457
                  }, {
                      id: "US-NC",
                      value: 8049313
                  }, {
                      id: "US-ND",
                      value: 642200
                  }, {
                      id: "US-OH",
                      value: 11353140
                  }, {
                      id: "US-OK",
                      value: 3450654
                  }, {
                      id: "US-OR",
                      value: 3421399
                  }, {
                      id: "US-PA",
                      value: 12281054
                  }, {
                      id: "US-RI",
                      value: 1048319
                  }, {
                      id: "US-SC",
                      value: 4012012
                  }, {
                      id: "US-SD",
                      value: 754844
                  }, {
                      id: "US-TN",
                      value: 5689283
                  }, {
                      id: "US-TX",
                      value: 20851820
                  }, {
                      id: "US-UT",
                      value: 2233169
                  }, {
                      id: "US-VT",
                      value: 608827
                  }, {
                      id: "US-VA",
                      value: 7078515
                  }, {
                      id: "US-WA",
                      value: 5894121
                  }, {
                      id: "US-WV",
                      value: 1808344
                  }, {
                      id: "US-WI",
                      value: 5363675
                  }, {
                      id: "US-WY",
                      value: 493782
                  }]
              }
          });
          // add events to recalculate map position when the map is moved or zoomed
          map.addListener("positionChanged", updateCustomMarkers);
          // this function will take current images on the map and create HTML elements for them
          function updateCustomMarkers(event) {
              // get map object
              var map = event.chart;
              // go through all of the images
              for (var x in map.dataProvider.images) {
                  // get MapImage object
                  var image = map.dataProvider.images[x];

                  // check if it has corresponding HTML element
                  if ('undefined' == typeof image.externalElement)
                      image.externalElement = createCustomMarker(image);

                  // reposition the element accoridng to coordinates
                  image.externalElement.style.top = map.latitudeToY(image.latitude) + 'px';
                  image.externalElement.style.left = map.longitudeToX(image.longitude) + 'px';
              }
          }
          // this function creates and returns a new marker element
          function createCustomMarker(image) {
              // create holder
              var holder = document.createElement('div');
              holder.className = 'map-marker';
              holder.title = image.title;
              holder.style.position = 'absolute';

              // maybe add a link to it?
              if (undefined != image.url) {
                  holder.onclick = function () {
                      window.location.href = image.url;
                  };
                  holder.className += ' map-clickable';
              }
              // create dot
              var dot = document.createElement('div');
              dot.className = 'dot-map';
              holder.appendChild(dot);
              // create pulse
              var pulse = document.createElement('div');
              pulse.className = 'pulse-map';
              holder.appendChild(pulse);
              // append the marker to the map container
              image.chart.chartDiv.appendChild(holder);
              return holder;
          }




          /**** FLIGHT MAP ****/
          // svg path for target icon
          var targetSVG = "M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z";
          // svg path for plane icon
          var planeSVG = "M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z";

          AmCharts.makeChart("flight-map", {
              type: "map",
              pathToImages: "http://www.amcharts.com/lib/3/images/",
              addClassNames: true,
              zoomControl: {
                  "buttonFillColor": "#333333",
                  top: 60
              },
              dataProvider: {
                  map: "worldLow",
                  getAreasFromMap: true,
                  linkToObject: "london",
                  images: [{
                      id: "london",
                      color: "#000000",
                      type: "circle",
                      title: "London",
                      latitude: 51.5002,
                      longitude: -0.1262,
                      scale: 1.5,
                      zoomLevel: 2.74,
                      zoomLongitude: -20.1341,
                      zoomLatitude: 49.1712,
                      lines: [{
                          latitudes: [51.5002, 50.4422],
                          longitudes: [-0.1262, 30.5367]
                      }, {
                          latitudes: [51.5002, 46.9480],
                          longitudes: [-0.1262, 7.4481]
                      }, {
                          latitudes: [51.5002, 59.3328],
                          longitudes: [-0.1262, 18.0645]
                      }, {
                          latitudes: [51.5002, 40.4167],
                          longitudes: [-0.1262, -3.7033]
                      }, {
                          latitudes: [51.5002, 46.0514],
                          longitudes: [-0.1262, 14.5060]
                      }, {
                          latitudes: [51.5002, 48.2116],
                          longitudes: [-0.1262, 17.1547]
                      }, {
                          latitudes: [51.5002, 44.8048],
                          longitudes: [-0.1262, 20.4781]
                      }, {
                          latitudes: [51.5002, 55.7558],
                          longitudes: [-0.1262, 37.6176]
                      }, {
                          latitudes: [51.5002, 38.7072],
                          longitudes: [-0.1262, -9.1355]
                      }, {
                          latitudes: [51.5002, 54.6896],
                          longitudes: [-0.1262, 25.2799]
                      }, {
                          latitudes: [51.5002, 64.1353],
                          longitudes: [-0.1262, -21.8952]
                      }, {
                          latitudes: [51.5002, 40.4300],
                          longitudes: [-0.1262, -74.0000]
                      }],
                      images: [{
                          label: "Flights from London",
                          svgPath: planeSVG,
                          left: 100,
                          top: 45,
                          labelShiftY: 5,
                          color: "#2E2E2E",
                          labelColor: "#2E2E2E",
                          labelRollOverColor: "#2E2E2E",
                          labelFontSize: 20
                      }, {
                          label: "show flights from Vilnius",
                          left: 106,
                          top: 70,
                          labelColor: "#000000",
                          labelRollOverColor: "#2E2E2E",
                          labelFontSize: 11,
                          linkToObject: "vilnius"
                      }]
                  },
                      {
                          id: "vilnius",
                          color: "#000000",
                          svgPath: targetSVG,
                          title: "Vilnius",
                          latitude: 54.6896,
                          longitude: 25.2799,
                          scale: 1.5,
                          zoomLevel: 4.92,
                          zoomLongitude: 15.4492,
                          zoomLatitude: 50.2631,
                          lines: [{
                              latitudes: [54.6896, 50.8371],
                              longitudes: [25.2799, 4.3676]
                          }, {
                              latitudes: [54.6896, 59.9138],
                              longitudes: [25.2799, 10.7387]
                          }, {
                              latitudes: [54.6896, 40.4167],
                              longitudes: [25.2799, -3.7033]
                          }, {
                              latitudes: [54.6896, 50.0878],
                              longitudes: [25.2799, 14.4205]
                          }, {
                              latitudes: [54.6896, 48.2116],
                              longitudes: [25.2799, 17.1547]
                          }, {
                              latitudes: [54.6896, 44.8048],
                              longitudes: [25.2799, 20.4781]
                          }, {
                              latitudes: [54.6896, 55.7558],
                              longitudes: [25.2799, 37.6176]
                          }, {
                              latitudes: [54.6896, 37.9792],
                              longitudes: [25.2799, 23.7166]
                          }, {
                              latitudes: [54.6896, 54.6896],
                              longitudes: [25.2799, 25.2799]
                          }, {
                              latitudes: [54.6896, 51.5002],
                              longitudes: [25.2799, -0.1262]
                          }, {
                              latitudes: [54.6896, 53.3441],
                              longitudes: [25.2799, -6.2675]
                          }],

                          images: [{
                              label: "Flights from Vilnius",
                              svgPath: planeSVG,
                              left: 100,
                              top: 45,
                              labelShiftY: 5,
                              color: "#2E2E2E",
                              labelColor: "#2E2E2E",
                              labelRollOverColor: "#2E2E2E",
                              labelFontSize: 20
                          }, {
                              label: "show flights from London",
                              left: 106,
                              top: 70,
                              labelColor: "#000000",
                              labelRollOverColor: "#2E2E2E",
                              labelFontSize: 11,
                              linkToObject: "london"
                          }]
                      }, {
                          svgPath: targetSVG,
                          title: "Brussels",
                          latitude: 50.8371,
                          longitude: 4.3676
                      }, {
                          svgPath: targetSVG,
                          title: "Prague",
                          latitude: 50.0878,
                          longitude: 14.4205
                      }, {
                          svgPath: targetSVG,
                          title: "Athens",
                          latitude: 37.9792,
                          longitude: 23.7166
                      }, {
                          svgPath: targetSVG,
                          title: "Reykjavik",
                          latitude: 64.1353,
                          longitude: -21.8952
                      }, {
                          svgPath: targetSVG,
                          title: "Dublin",
                          latitude: 53.3441,
                          longitude: -6.2675
                      }, {
                          svgPath: targetSVG,
                          title: "Oslo",
                          latitude: 59.9138,
                          longitude: 10.7387
                      }, {
                          svgPath: targetSVG,
                          title: "Lisbon",
                          latitude: 38.7072,
                          longitude: -9.1355
                      }, {
                          svgPath: targetSVG,
                          title: "Moscow",
                          latitude: 55.7558,
                          longitude: 37.6176
                      }, {
                          svgPath: targetSVG,
                          title: "Belgrade",
                          latitude: 44.8048,
                          longitude: 20.4781
                      }, {
                          svgPath: targetSVG,
                          title: "Bratislava",
                          latitude: 48.2116,
                          longitude: 17.1547
                      }, {
                          svgPath: targetSVG,
                          title: "Ljubljana",
                          latitude: 46.0514,
                          longitude: 14.5060
                      }, {
                          svgPath: targetSVG,
                          title: "Madrid",
                          latitude: 40.4167,
                          longitude: -3.7033
                      }, {
                          svgPath: targetSVG,
                          title: "Stockholm",
                          latitude: 59.3328,
                          longitude: 18.0645
                      }, {
                          svgPath: targetSVG,
                          title: "Bern",
                          latitude: 46.9480,
                          longitude: 7.4481
                      }, {
                          svgPath: targetSVG,
                          title: "Kiev",
                          latitude: 50.4422,
                          longitude: 30.5367
                      }, {
                          svgPath: targetSVG,
                          title: "Paris",
                          latitude: 48.8567,
                          longitude: 2.3510
                      }, {
                          svgPath: targetSVG,
                          title: "New York",
                          latitude: 40.43,
                          longitude: -74
                      }
                  ]
              },
              areasSettings: {
                  unlistedAreasColor: "#FFCC00"
              },
              imagesSettings: {
                  color: "#2E2E2E",
                  rollOverColor: "#2E2E2E",
                  selectedColor: "#000000"
              },
              linesSettings: {
                  color: "#2E2E2E",
                  alpha: 0.4
              },
              backgroundZoomsToTop: true,
              linesAboveImages: true
          });



          /**** PATTERN MAP *****/
          var map;
          map = new AmCharts.AmMap();
          map.handDrawn = true;
          map.dragMap = false;
          map.color = "#FFFFFF";
          map.areasSettings = {
              autoZoom: false,
              rollOverOutlineColor: "#FFFFFF",
              selectedColor: "#FFFFFF",
              rollOverColor: "#FFFFFF",
              outlineAlpha: 1,
              outlineColor: "#FFFFFF",
              outlineThickness: 1,
              color: "#000000"
          };
          map.dataProvider = {
              mapVar: AmCharts.maps.continentsLow,

              areas: [{
                  "id": "africa",
                  "title": "Africa",
                  "pattern": {
                      "url": "../../../assets/global/plugins/maps-amcharts/ammap/patterns/white/pattern1.png",
                      width: 4,
                      height: 4
                  }
              }, {
                  "id": "asia",
                  "title": "Asia",
                  "pattern": {
                      "url": "../../../assets/global/plugins/maps-amcharts/ammap/patterns/white/pattern2.png",
                      width: 4,
                      height: 4
                  }
              }, {
                  "id": "australia",
                  "title": "Australia",
                  "pattern": {
                      "url": "../../../assets/global/plugins/maps-amcharts/ammap/patterns/white/pattern3.png",
                      width: 4,
                      height: 4
                  }
              }, {
                  "id": "europe",
                  "title": "Europe",
                  "pattern": {
                      "url": "../../../assets/global/plugins/maps-amcharts/ammap/patterns/white/pattern4.png",
                      width: 4,
                      height: 4
                  }
              }, {
                  "id": "north_america",
                  "title": "North America",
                  "pattern": {
                      "url": "../../../assets/global/plugins/maps-amcharts/ammap/patterns/white/pattern5.png",
                      width: 4,
                      height: 4
                  }
              }, {
                  "id": "south_america",
                  "title": "South America",
                  "pattern": {
                      "url": "../../../assets/global/plugins/maps-amcharts/ammap/patterns/white/pattern6.png",
                      width: 4,
                      height: 4
                  }
              }]
          };
          var zoomControl = map.zoomControl;
          zoomControl.panControlEnabled = false;
          zoomControl.zoomControlEnabled = false;
          map.write("pattern-map");

      });
  }]);