HERE-API如何向infobubble尾部添加元素

HERE-API如何向infobubble尾部添加元素,here-api,Here Api,我想在.nm\u bubble\u尾部添加一个SPAN元素 NokiaHere.prototype.createMap = function(container, callback) { var _callback = callback; var that = this; this.infoBubbles = new nokia.maps.map.component.InfoBubbles(); nokia.Settings.set("app_id", this.appId);

我想在.nm\u bubble\u尾部添加一个SPAN元素

NokiaHere.prototype.createMap = function(container, callback) {
  var _callback = callback;
  var that = this;
  this.infoBubbles = new nokia.maps.map.component.InfoBubbles();

  nokia.Settings.set("app_id", this.appId);
  nokia.Settings.set("app_code", this.appCode);
  (document.location.protocol == "https:") && nokia.Settings.set("secureConnection", "force");

  var map = new nokia.maps.map.Display(
    container, {
      components: [
            this.infoBubbles,
            new nokia.maps.map.component.Behavior(),
            new nokia.maps.map.component.ZoomBar(),
            new nokia.maps.map.component.Overview(),
            new nokia.maps.map.component.ScaleBar()
          ]
    }
  );
  this.group = new nokia.maps.map.Container();
  _callback(map);
};

我想用一个图像自定义我的infobubble尾部。

添加一个图像很容易,你可以使用CSS

示例(用您的化身替换内置尾巴):


.nm_气泡_尾{
/*把尾巴放在前面*/
z指数:1000!重要;
}
.nm_气泡_尾::之后{
/*添加所需的图像*/
内容:网址(https://www.gravatar.com/avatar/e0865f23aafa1793842a13e12ab443bd?s=32&d=identicon&r=PG&f=1);
}
.nm_泡泡_尾帆布{
/*隐藏原来的尾巴*/
显示:无;
}

添加图像很容易,您可以使用CSS

示例(用您的化身替换内置尾巴):


.nm_气泡_尾{
/*把尾巴放在前面*/
z指数:1000!重要;
}
.nm_气泡_尾::之后{
/*添加所需的图像*/
内容:网址(https://www.gravatar.com/avatar/e0865f23aafa1793842a13e12ab443bd?s=32&d=identicon&r=PG&f=1);
}
.nm_泡泡_尾帆布{
/*隐藏原来的尾巴*/
显示:无;
}
  <style>
  .nm_bubble_tail{
    /*bring the tail into front*/
    z-index:1000 !important;
  }
  .nm_bubble_tail::after{
    /*add the desired image*/
    content:url(https://www.gravatar.com/avatar/e0865f23aafa1793842a13e12ab443bd?s=32&d=identicon&r=PG&f=1);
  }
  .nm_bubble_tail canvas{
    /*hide the original tail*/
    display:none;
  }
  </style>