在 Jvectormap 中添加自定义按钮

Adding a custom button in Jvectormap

有什么方法可以在普通 Jvectormap 的左上角 添加自定义按钮吗? (类似于向下钻取图中的后退按钮)

创建一个 div 作为地图的子项,这样您就可以相对于地图容器定位它:

$("#map").append('<div id="map-action">Action</div>').click(function () {
  //do your action here
});

根据需要设置样式,这里重要的是设置 z 顺序,使其位于地图上方:

CSS:

#map-action {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 3px;
  z-index: 1000;
  background: #292929;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  line-height: 10px;
  padding: 6px;
  box-sizing: content-box;
}