laptop and a wrench

不具合

The View.popup.open() method fails to display the pop-up when calling the method within the search class event.

最後に公開された状態: November 11, 2019 ArcGIS API for JavaScript
不具合 ID 番号 BUG-000124573
送信されましたAugust 16, 2019
最終更新日June 5, 2024
適用対象ArcGIS API for JavaScript
見つかったバージョン4.12
オペレーティング システムWindows OS
オペレーティング システムのバージョン10.0
ステータスNon-Reproducible

参考情報

This issue is fixed in ArcGIS API for JavaScript 4.13 and not reproducible in ArcGIS API for JavaScript 4.14 (Developer Edition).

対処法

Using a while loop with an iterator to prevent layerview.watch() from firing multiple queries causing the parcel pop-up glitch.

let t = 0;

 searchWidget.on("search-complete", (event) => {

  let resultGeometry = event.results[0].results[0].feature.geometry;

  mapView.whenLayerView(layer).then((layerView) => {

   console.log(layerView)

   layerView.watch("updating", (val) => {

    if (!val) { // wait for the layer view to finish updating

     while(t === 0){

     t++;

     layerView.queryFeatures({

      geometry: resultGeometry,

      returnGeometry: true

     }).then((results) => {

      console.log(results);

      layerView.highlight(results.features);

      console.log('opening popup');

      mapView.popup.open({

       features: [results.features[0]],

       location: results.features[0].geometry.centroid

      })

     });

  }

    }

   });

  });

 });

再現の手順

不具合 ID: BUG-000124573

ソフトウェア:

  • ArcGIS API for JavaScript

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

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

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

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

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

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

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