2016-07-29 46 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"); 
    } 
相關問題