laptop and a wrench

不具合

A pop-up throws an invalid content type error when clicking the GraphicsLayer that does not have a PopupTemplate class defined.

最後に公開された状態: October 21, 2016 ArcGIS API for JavaScript
不具合 ID 番号 BUG-000097999
送信されましたJuly 23, 2016
最終更新日June 5, 2024
適用対象ArcGIS API for JavaScript
見つかったバージョン4.0
オペレーティング システムN/A
オペレーティング システムのバージョンN/A
ステータスWill Not Be Addressed

参考情報

Tested against 4.1 and can not reproduce.

対処法

Option A Define the graphics within the graphics collection of the view as shown in the sample at https://developers.arcgis.com/javascript/latest/sample-code/get-started-graphics/index.html The blank pop-up or the error is no longer displayed. Option B Wire into the view's click event. Perform a hit-test and check if the intersecting layer belongs to the layer that the user did not define a PopupTemplate against. If needed, hide the html for the pop-up from the user interface. An example of the code for this approach is shown below. Note that the pop-up does not appear, but the error still occurs. view.on("click", function(evt){ // Search for graphics at the clicked location view.hitTest(evt.screenPoint).then(function(response){ if(response.results[0].graphic){ console.log("Top graphic found! Here it is: ", response.results[0].graphic); document.getElementsByClassName("esri-popup")[0].style.display = response.results[0].graphic.layer.id == "layer-2" ? "none" : "block"; } }); });

再現の手順

不具合 ID: BUG-000097999

ソフトウェア:

  • ArcGIS API for JavaScript

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動