2016-07-29 41 views
0

我正在使用JVector Map插件。我想要更改它显示的文本(在黑色工具提示中)后的区域名称的大小盘旋它们。JVector地图如何更改当鼠标光标在区域上时显示的工具提示的大小

这里是我的Javascript代码,如果nedded:

$('#world-map').vectorMap({ 
    map: 'world_mill', 
    backgroundColor: '#fff', 
    zoomOnScroll: false, 
    regionStyle:{ 
     initial: { 
      fill: '#878787', 
      "fill-opacity": 1, 
      stroke: '#fff', 
      "stroke-width": 1, 
      "stroke-opacity": 1 
     }, 
     hover: { 
      "fill-opacity": 1, 
      cursor: 'pointer', 
      fill: '#133060' 

     }, 
     selected: { 
      fill: 'yellow' 
     }, 
     selectedHover: { 

     } 
    }, 
      markerStyle: { 
     initial: { 
      fill: '#F8E23B', 
      stroke: '#383f47', 
      r:10 
     } 
    }, 

    markers: [ 
    { latLng: [61.524010, 105.318756], name: 'Russia' }, 
    { latLng: [60.128161, 18.643501], name: 'Sweden' }, 
    { latLng: [35.861660, 104.195397], name: 'China' }, 
    { latLng: [37.090240, -95.712891], name: 'USA(Neda Shine)' }, 
{ latLng: [56.130366, -106.346771], name: 'Canada' }, 
    { latLng: [-25.274398, 133.775136], name: 'Austrlia(Neda Shine)' }, 
    { latLng: [51.165691, 10.451526], name: 'Germany' }, 

    ], 
    onRegionTipShow: function (e, el, code) { 

     el.html(el.html() + ' (test)'); 
    } 

}); 

这里是我的地图我想改变风格为这个黑色的工具提示,在这张照片鼠标悬停于美国,它表明该地区的名称。

enter image description here

回答

0

它由加载CSS样式在此行中得到解决:

onRegionTipShow:功能(E,EL,代码){

 el.html(el.html() + '<p id="popop">test</p>').css("fontSize","25px"); 
    } 
相关问题