1//from http://jvectormap.com/ 2 3jQuery(document).ready(function($){ 4 5 if ($('#locations-map').length > 0){ 6 7 // var mdc_countries = { 8 9 // 'US' : 'Houston, NYC', 10 // 'CA' : 'Toronto, Montreal', 11 // 'BR' : 'Rio', 12 // 'RU' : 'Moscow', 13 // 'FR' : 'Paris, Nice, French Riviera' 14 // }; 15 16 17 18 var mdc_countries = { 19 'AR': 'Argentina', 20 'AU': 'Australia', 21 'BE': 'Belgium', 22 'BR': 'Brazil', 23 'CA': 'Canada', 24 'CN': 'China', 25 'FR': 'France', 26 'DE': 'Germany', 27 'IN': 'India', 28 'ID': 'Indonesia', 29 'IE': 'Ireland', 30 'IT': 'Italy', 31 'JP': 'Japan', 32 'SA': 'Saudi Arabia', 33 'LB': 'Lebanon', 34 'MY': 'Malaysia', 35 'MX': 'Mexico', 36 'NZ': 'New Zealand', 37 'PA': 'Panama', 38 'PE': 'Peru', 39 'PH': 'Philippines', 40 'PL': 'Poland', 41 'PT': 'Portugal', 42 'RO': 'Romania', 43 'ZA': 'South Africa', 44 'KR': 'South Korea', 45 'TW': 'Taiwan', 46 'TH': 'Thailand', 47 'AE': 'U.A.E.', 48 'GB': 'U.K.', 49 'US': 'United States', 50 }; 51 52 mdc_country_colors = {}; 53 54 Object.keys(mdc_countries).forEach(function(key,index) { 55 mdc_country_colors[key] = '#981b1e'; 56 }); 57 58 59 $('#locations-map').vectorMap({ 60 map: 'world_mill', 61 backgroundColor: '#fff', 62 regionStyle: { 63 initial: { 64 fill: '#e9e9e9', 65 "fill-opacity": 1, 66 stroke: 'none', 67 "stroke-width": 0, 68 "stroke-opacity": 1 69 }, 70 71 }, 72 series: { 73 regions: [{ 74 values: { 75 'US': '#e9e9e9', 76 77 }, 78 attribute: 'fill' 79 }] 80 }, 81 onRegionTipShow: function (e, el, code) { 82 83 if (mdc_countries.hasOwnProperty(code)){ 84 el.html(mdc_countries[code]); 85 } 86 else{ 87 e.preventDefault(); 88 } 89 90 }, 91 92 }); 93 94 var map = $('#locations-map').vectorMap('get', 'mapObject'); 95 96 Object.keys(mdc_countries).forEach(function(key,index) { 97 map.series.regions[0].setValues(mdc_country_colors); 98 }); 99 100 101 } 102 103});
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.