/*========================================================================================= File Name: jqvmap.js Description: jQuery vector maps examples. ---------------------------------------------------------------------------------------- Item Name: Modern Admin - Clean Bootstrap 4 Dashboard HTML Template Author: PIXINVENT Author URL: http://www.themeforest.net/user/pixinvent ==========================================================================================*/ // jQuery vector maps // ----------------------------------- $(window).on("load", function(){ // Continents Vector Maps // ----------------------------------- $('.continent-tab').each(function () { $(this).on('click', function () { $('.tab-selected').removeClass('tab-selected'); $(this).addClass('tab-selected'); $('.continent-map').css('z-index', '0'); $('#continent-' + this.id).parent().css('z-index', '1'); }); }); $('.continent-tab:first').addClass('tab-selected'); $('.continent-map:first').css('z-index', '1'); // Asia jQuery('#continent-asia').vectorMap({ map: 'asia_en', backgroundColor: '#FFFFFF', borderColor: '#FFF', color: '#2A363B', hoverOpacity: 0.7, selectedColor: '#99B898', enableZoom: true, showTooltip: true, values: sample_data, scaleColors: ['#FECEA8', '#E84A5F'], normalizeFunction: 'polynomial' }); // Europe jQuery('#continent-europe').vectorMap({ map: 'europe_en', backgroundColor: '#FFFFFF', borderColor: '#FFF', color: '#2A363B', hoverOpacity: 0.7, selectedColor: '#99B898', enableZoom: true, showTooltip: true, values: sample_data, scaleColors: ['#FECEA8', '#E84A5F'], normalizeFunction: 'polynomial' }); // Australia jQuery('#continent-australia').vectorMap({ map: 'australia_en', backgroundColor: '#FFFFFF', borderColor: '#FFF', color: '#2A363B', hoverOpacity: 0.7, selectedColor: '#99B898', enableZoom: true, showTooltip: true, values: sample_data, scaleColors: ['#FECEA8', '#E84A5F'], normalizeFunction: 'polynomial' }); // Africa jQuery('#continent-africa').vectorMap({ map: 'africa_en', backgroundColor: '#FFFFFF', borderColor: '#FFF', color: '#2A363B', hoverOpacity: 0.7, selectedColor: '#99B898', enableZoom: true, showTooltip: true, values: sample_data, scaleColors: ['#FECEA8', '#E84A5F'], normalizeFunction: 'polynomial' }); // North America jQuery('#continent-northamerica').vectorMap({ map: 'north-america_en', backgroundColor: '#FFFFFF', borderColor: '#FFF', color: '#2A363B', hoverOpacity: 0.7, selectedColor: '#99B898', enableZoom: true, showTooltip: true, values: sample_data, scaleColors: ['#FECEA8', '#E84A5F'], normalizeFunction: 'polynomial' }); // South America jQuery('#continent-southamerica').vectorMap({ map: 'south-america_en', backgroundColor: '#FFFFFF', borderColor: '#FFF', color: '#2A363B', hoverOpacity: 0.7, selectedColor: '#99B898', enableZoom: true, showTooltip: true, values: sample_data, scaleColors: ['#FECEA8', '#E84A5F'], normalizeFunction: 'polynomial' }); // Multi Select Region // ----------------------------------- jQuery('#multi-select-region').vectorMap({ map: 'usa_en', backgroundColor: '#FFFFFF', borderColor: '#FFF', color: '#E84A5F', selectedColor: '#FECEA8', enableZoom: true, showTooltip: true, multiSelectRegion: true, selectedRegions: ['TX'] }); // Custom Pins // ----------------------------------- function escapeXml(string) { return string.replace(/[<>]/g, function (c) { switch (c) { case '<': return '\u003c'; case '>': return '\u003e'; } }); } var pins = { mo: escapeXml('