JQVmap hover country display

Hi, I recently posted JQVmap from Github, and I am making a site like the old Carmen Sandiego game. I saw on some sites that use this map that they have country labels on hover. I read as far as I know how to do this in the files I received from the JQVmap github site, but without success.

Thanks ... I'm not sure if this is the correct code to enter, but here goes

jQuery(document).ready(function() {
    jQuery('#vmap').vectorMap({
        map: 'world_en',
        backgroundColor: '#333333',
        color: '#ffffff',
        hoverOpacity: 0.7,
        selectedColor: '#666666',
        enableZoom: true,
        showTooltip: true,
        values: sample_data,
        scaleColors: ['#a12200', '#343bbb'],
        normalizeFunction: 'polynomial',

    });
});

thank

+4
source share
2 answers

The code is correct, I think. Check the pen.

http://codepen.io/praveenvijayan/pen/XbMBRg

jQuery('#vmap').vectorMap({
   map: 'world_en',
   backgroundColor: null,
   color: '#ffffff',
   hoverOpacity: 0.7,
   selectedColor: '#666666',
   enableZoom: true,
   showTooltip: true,
   scaleColors: ['#C8EEFF', '#006491'],
   normalizeFunction: 'polynomial'
});

You must include: http://jqvmap.com/js/vmap/jquery.vmap.js?v=1.0 http://jqvmap.com/js/vmap/jquery.vmap.world.js?v=1.0

, .

http://jqvmap.com/js/vmap/jquery.vmap.sampledata.js?v=1.0

0

. , :

<link href="../dist/jqvmap.css" media="screen" rel="stylesheet" type="text/css">
+1

All Articles