映射:如何在infotemplate中添加关闭按钮

Mapping : How to add a close button to infotemplate

本文关键字:添加 关闭按钮 infotemplate 映射      更新时间:2024-05-06

如何在信息模板中添加关闭按钮?

// My info template looks like this, 't' and 'Description' are variables
var infoTemplate1 = new esri.InfoTemplate(Title + ' - ' + t,"Description:" + "<br>" + Description);

添加:

<button dojoType='dijit.form.Button' onClick='javascript:window.close();''>Done</button>")

有关详细信息,请参阅此链接。

祝你好运!!