Reputation: 3813
I am using jVectorMap
library and its working fine. But i don't want to show country name when mouse hover over the map.
// worldMap is the container
$('#worldMap').vectorMap({
map: 'world_mill_en',
backgroundColor : 'transparent',
zoomOnScroll: false,
zoomButtons : false
});
Currently its showing country name when we hover over the map. I want do disable this functionality.
http://jsfiddle.net/3xZ28/238/
Any help is greatly appreciated.
Upvotes: 1
Views: 8026
Reputation: 8049
Old post, but as of v2.0.3, the event, onRegionLabelShow
, has been changed to onRegionTipShow
. Same goes for onMarkerLabelShow
= onMarkerTipShow
onRegionTipShow: function (e, label, code) {
e.preventDefault();
}
Upvotes: 11
Reputation: 3813
After, taking help from @Mr.TK answer and further googling. I found the solution:
$('#worldMap').vectorMap({
map: 'world_mill_en',
backgroundColor: 'green',
normalizeFunction: 'polynomial',
zoomOnScroll: false,
zoomButtons: false,
regionStyle: {
hover: {
"fill-opacity": 1
}
},
onRegionLabelShow: function (e, el, code) {
e.preventDefault();
},
markers: [{
latLng: [37.7833, -122.4167],
name: 'San Francisco'
}]
});
This is what, i am looking for: http://jsfiddle.net/3xZ28/244/
Upvotes: 1
Reputation: 1836
http://jsfiddle.net/3xZ28/243/
onRegionLabelShow: function(e, el, code){
e.preventDefault();
}
Upvotes: 2