我是 ESRI 和 javascript API 的新手。我正在嘗試實現打印任務,如下所示:https : //developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html我正在使用以下代碼創建打印功能,并且如圖所示正確顯示:require(["esri/widgets/Print"], function (Print) { var print = new Print({ view: view, printServiceUrl: "https://printserviceurl/services/PrintService/GPServer/Export%20Web%20Map" }); // Adds widget below other elements in the top left corner of the view view.ui.add(print, { position: "bottom-left" });});我遇到的問題是單擊“高級選項”、“導出”或某些其他功能會導致回發。這是一個 asp.net web 應用程序,地圖位于 asp.net 母版頁表單控件中。這導致整個頁面回發。有沒有人建議防止整頁回發并保留打印功能?如果我將它移到標簽外,它確實可以正常工作,但要在頁面中正確定位它,內容區域必須留在表單內。
ArcGIS JavaScript API 4.11 - 打印導致 asp.net 中的回發問題
忽然笑
2021-06-28 12:10:34